-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathJustfile
More file actions
55 lines (42 loc) · 1.77 KB
/
Justfile
File metadata and controls
55 lines (42 loc) · 1.77 KB
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
system := `nix-instantiate --eval --raw -E builtins.currentSystem`
help:
just -l
check-all:
nix-build ./templates/noflake --no-out-link -A flake.nixosConfigurations.igloo
just all check
just unit
update-all:
cd templates/noflake && npins update den flake-aspects
just all update
docs:
cd docs && pnpm run dev
ci test="":
just nix-unit ci "{{test}}"
bogus:
just nix-unit bogus ""
nix-unit template test:
nix-unit --override-input den . --flake ./templates/{{template}}#.tests.systems.{{system}}.system-agnostic.{{test}}
check template:
nix flake check --override-input den . ./templates/{{template}}
update template:
nix flake update --flake ./templates/{{template}} den flake-aspects
all task:
just {{task}} minimal
just {{task}} example
just {{task}} default
just {{task}} ci
just {{task}} bogus
just {{task}} microvm
fmt:
nix run github:vic/checkmate#fmt --override-input target .
unit:
nix flake check --override-input target . github:vic/checkmate
[arg("tmpdir",long="tmpdir"), arg("head",long="head",short="h"), arg("base",long="base",short="b"), arg("warm",long="warm",short="w"), arg("runs",long="runs",short="r")]
bench tmpdir="/tmp" head="HEAD" base="refs/remotes/origin/main" warm="10" runs="20":
rm -rf "{{tmpdir}}/den-head" "{{tmpdir}}/den-base"
git clone --local --depth 1 --revision "$(git rev-list -n1 {{head}})" .git "{{tmpdir}}/den-head" 2>/dev/null
git clone --local --depth 1 --revision "$(git rev-list -n1 {{base}})" .git "{{tmpdir}}/den-base" 2>/dev/null
hyperfine -m "{{runs}}" -w "{{warm}}" --show-output \
-n head "cd {{tmpdir}}/den-head && nix-shell ./shell.nix --run 'just ci'" \
-n base "cd {{tmpdir}}/den-base && nix-shell ./shell.nix --run 'just ci'"
rm -rf "{{tmpdir}}/den-head" "{{tmpdir}}/den-base"