forked from nix-community/lorri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ninja
30 lines (20 loc) · 889 Bytes
/
build.ninja
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
builddir = .ninja
build all : phony .github/workflows/ci.yml
# show the graph of ninja build dependencies in zathura
rule show-ninja-deps
command = ninja -t graph | dot -Tpdf | zathura -
build show-ninja-deps: show-ninja-deps | build.ninja
# run all check as would be run on CI
rule run-ci-checks
command = execlineb -c "nix-run { $in -A ci.testsuite }"
build run-ci-checks : run-ci-checks ./shell.nix
pool = console
# create the ci.yml file for github actions
rule build-ci-files
command = eval $$(nix-build $in -A writeConfig)
build .github/workflows/ci.yml : build-ci-files ./.github/workflows/ci.nix | ./Cargo.nix
# update Cargo.nix from Cargo.toml
rule update-cargo-nix
command = crate2nix generate --cargo-toml $in --output $out
build update-cargo-nix : phony ./Cargo.nix
build ./Cargo.nix : update-cargo-nix ./Cargo.toml | ./Cargo.lock ./nix/nixpkgs-stable.json