-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
66 lines (55 loc) · 1.58 KB
/
Makefile.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[tasks.format]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt", "--", "--emit=files"]
[tasks.check]
install_crate = "clippy"
command = "cargo"
args = ["clippy", "--all-features"]
[tasks.test]
command = "cargo"
args = ["test", "--", "--include-ignored"]
dependencies = ["check"]
[tasks.test.env]
HYDRA_PUBLIC_URL="http://localhost:8080/"
[tasks.run]
command = "cargo"
args = ["run"]
[tasks.run.env]
RUST_BACKTRACE = 1
RUST_LOG = "info,hydra=trace"
HYDRA_PUBLIC_URL="http://localhost:8080/"
[tasks.release]
command = "cargo"
args = ["build", "--release"]
dependencies = ["check"]
[tasks.tls-image]
script_runner = "@duckscript"
script = '''
flake = set "(builtins.getFlake \"git+file://\${toString ./.}\")"
system = set "\"\${builtins.currentSystem}\""
attr = set "${flake}.packages.${system}.docker-image"
overrides = set "{ certs = { cert = ${1}; key = ${2}; }; }"
exec nix build --impure --expr "${attr}.override ${overrides}"
'''
[tasks.build-ci]
script_runner = "@duckscript"
script = '''
header = set "# DO NOT EDIT THIS FILE! Edit /workflows/<name>.ncl and run cargo make build-ci intead.\n"
inputs = glob_array ./workflows/*.ncl
for input in ${inputs}
yaml = exec --fail-on-error nickel -f ${input} export --format yaml
input_filename = basename ${input}
out_filename = replace ${input_filename} .ncl .yml
out_path = join_path .github/workflows ${out_filename}
writefile ${out_path} ${header}
appendfile ${out_path} ${yaml.stdout}
end
'''
[tasks.test-ci]
command = "act"
args = [
"--artifact-server-path", "./target/artifacts",
"${@}",
]
dependencies = ["build-ci"]