Skip to content

Commit 63bb79c

Browse files
committed
[CI] Update Nix toolbox
1 parent d9ffee5 commit 63bb79c

File tree

5 files changed

+327
-304
lines changed

5 files changed

+327
-304
lines changed

.github/workflows/nix-action-8.20.yml

Lines changed: 55 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
fetch-depth: 0
2828
ref: ${{ env.tested_commit }}
2929
- name: Cachix install
30-
uses: cachix/install-nix-action@v30
30+
uses: cachix/install-nix-action@v31
3131
with:
3232
nix_path: nixpkgs=channel:nixpkgs-unstable
3333
- name: Cachix setup math-comp
34-
uses: cachix/cachix-action@v15
34+
uses: cachix/cachix-action@v16
3535
with:
3636
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
3737
extraPullNames: coq, coq-community
@@ -40,15 +40,16 @@ jobs:
4040
name: Getting derivation for current job (coq)
4141
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
4242
\"8.20\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail;
43-
true)\n"
44-
- name: Error reporting
45-
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
46-
- name: Failure check
47-
run: if [ -e fail ]; then exit 1; else exit 0; fi;
43+
true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
44+
failed\"; exit 1; fi\n"
4845
- id: stepCheck
4946
name: Checking presence of CI target for current job
50-
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
51-
- if: steps.stepCheck.outputs.status == 'built'
47+
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
48+
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
49+
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
50+
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
51+
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
52+
- if: steps.stepCheck.outputs.status != 'fetched'
5253
name: Building/fetching current CI target
5354
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
5455
job "coq"
@@ -81,11 +82,11 @@ jobs:
8182
fetch-depth: 0
8283
ref: ${{ env.tested_commit }}
8384
- name: Cachix install
84-
uses: cachix/install-nix-action@v30
85+
uses: cachix/install-nix-action@v31
8586
with:
8687
nix_path: nixpkgs=channel:nixpkgs-unstable
8788
- name: Cachix setup math-comp
88-
uses: cachix/cachix-action@v15
89+
uses: cachix/cachix-action@v16
8990
with:
9091
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
9192
extraPullNames: coq, coq-community
@@ -94,55 +95,28 @@ jobs:
9495
name: Getting derivation for current job (mathcomp)
9596
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
9697
\"8.20\" --argstr job \"mathcomp\" \\\n --dry-run 2> err > out || (touch
97-
fail; true)\n"
98-
- name: Error reporting
99-
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
100-
- name: Failure check
101-
run: if [ -e fail ]; then exit 1; else exit 0; fi;
98+
fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
99+
failed\"; exit 1; fi\n"
102100
- id: stepCheck
103101
name: Checking presence of CI target for current job
104-
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
105-
- if: steps.stepCheck.outputs.status == 'built'
102+
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
103+
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
104+
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
105+
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
106+
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
107+
- if: steps.stepCheck.outputs.status != 'fetched'
106108
name: 'Building/fetching previous CI target: coq'
107109
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
108110
job "coq"
109-
- if: steps.stepCheck.outputs.status == 'built'
110-
name: 'Building/fetching previous CI target: stdlib'
111-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
112-
job "stdlib"
113-
- if: steps.stepCheck.outputs.status == 'built'
114-
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
115-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
116-
job "mathcomp-ssreflect"
117-
- if: steps.stepCheck.outputs.status == 'built'
118-
name: 'Building/fetching previous CI target: mathcomp-fingroup'
119-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
120-
job "mathcomp-fingroup"
121-
- if: steps.stepCheck.outputs.status == 'built'
122-
name: 'Building/fetching previous CI target: mathcomp-algebra'
123-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
124-
job "mathcomp-algebra"
125-
- if: steps.stepCheck.outputs.status == 'built'
126-
name: 'Building/fetching previous CI target: mathcomp-solvable'
127-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
128-
job "mathcomp-solvable"
129-
- if: steps.stepCheck.outputs.status == 'built'
130-
name: 'Building/fetching previous CI target: mathcomp-field'
131-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
132-
job "mathcomp-field"
133-
- if: steps.stepCheck.outputs.status == 'built'
111+
- if: steps.stepCheck.outputs.status != 'fetched'
134112
name: 'Building/fetching previous CI target: mathcomp-character'
135113
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
136114
job "mathcomp-character"
137-
- if: steps.stepCheck.outputs.status == 'built'
115+
- if: steps.stepCheck.outputs.status != 'fetched'
138116
name: 'Building/fetching previous CI target: hierarchy-builder'
139117
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
140118
job "hierarchy-builder"
141-
- if: steps.stepCheck.outputs.status == 'built'
142-
name: 'Building/fetching previous CI target: stdlib'
143-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
144-
job "stdlib"
145-
- if: steps.stepCheck.outputs.status == 'built'
119+
- if: steps.stepCheck.outputs.status != 'fetched'
146120
name: Building/fetching current CI target
147121
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
148122
job "mathcomp"
@@ -175,11 +149,11 @@ jobs:
175149
fetch-depth: 0
176150
ref: ${{ env.tested_commit }}
177151
- name: Cachix install
178-
uses: cachix/install-nix-action@v30
152+
uses: cachix/install-nix-action@v31
179153
with:
180154
nix_path: nixpkgs=channel:nixpkgs-unstable
181155
- name: Cachix setup math-comp
182-
uses: cachix/cachix-action@v15
156+
uses: cachix/cachix-action@v16
183157
with:
184158
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
185159
extraPullNames: coq, coq-community
@@ -188,27 +162,24 @@ jobs:
188162
name: Getting derivation for current job (mathcomp-finmap)
189163
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
190164
\"8.20\" --argstr job \"mathcomp-finmap\" \\\n --dry-run 2> err > out ||
191-
(touch fail; true)\n"
192-
- name: Error reporting
193-
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
194-
- name: Failure check
195-
run: if [ -e fail ]; then exit 1; else exit 0; fi;
165+
(touch fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting
166+
derivation failed\"; exit 1; fi\n"
196167
- id: stepCheck
197168
name: Checking presence of CI target for current job
198-
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
199-
- if: steps.stepCheck.outputs.status == 'built'
169+
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
170+
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
171+
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
172+
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
173+
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
174+
- if: steps.stepCheck.outputs.status != 'fetched'
200175
name: 'Building/fetching previous CI target: coq'
201176
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
202177
job "coq"
203-
- if: steps.stepCheck.outputs.status == 'built'
204-
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
205-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
206-
job "mathcomp-ssreflect"
207-
- if: steps.stepCheck.outputs.status == 'built'
208-
name: 'Building/fetching previous CI target: stdlib'
178+
- if: steps.stepCheck.outputs.status != 'fetched'
179+
name: 'Building/fetching previous CI target: mathcomp-boot'
209180
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
210-
job "stdlib"
211-
- if: steps.stepCheck.outputs.status == 'built'
181+
job "mathcomp-boot"
182+
- if: steps.stepCheck.outputs.status != 'fetched'
212183
name: Building/fetching current CI target
213184
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
214185
job "mathcomp-finmap"
@@ -242,11 +213,11 @@ jobs:
242213
fetch-depth: 0
243214
ref: ${{ env.tested_commit }}
244215
- name: Cachix install
245-
uses: cachix/install-nix-action@v30
216+
uses: cachix/install-nix-action@v31
246217
with:
247218
nix_path: nixpkgs=channel:nixpkgs-unstable
248219
- name: Cachix setup math-comp
249-
uses: cachix/cachix-action@v15
220+
uses: cachix/cachix-action@v16
250221
with:
251222
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
252223
extraPullNames: coq, coq-community
@@ -255,39 +226,40 @@ jobs:
255226
name: Getting derivation for current job (multinomials)
256227
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
257228
\"8.20\" --argstr job \"multinomials\" \\\n --dry-run 2> err > out || (touch
258-
fail; true)\n"
259-
- name: Error reporting
260-
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
261-
- name: Failure check
262-
run: if [ -e fail ]; then exit 1; else exit 0; fi;
229+
fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
230+
failed\"; exit 1; fi\n"
263231
- id: stepCheck
264232
name: Checking presence of CI target for current job
265-
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
266-
- if: steps.stepCheck.outputs.status == 'built'
233+
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
234+
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
235+
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
236+
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
237+
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
238+
- if: steps.stepCheck.outputs.status != 'fetched'
267239
name: 'Building/fetching previous CI target: coq'
268240
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
269241
job "coq"
270-
- if: steps.stepCheck.outputs.status == 'built'
271-
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
242+
- if: steps.stepCheck.outputs.status != 'fetched'
243+
name: 'Building/fetching previous CI target: mathcomp-boot'
272244
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
273-
job "mathcomp-ssreflect"
274-
- if: steps.stepCheck.outputs.status == 'built'
245+
job "mathcomp-boot"
246+
- if: steps.stepCheck.outputs.status != 'fetched'
275247
name: 'Building/fetching previous CI target: mathcomp-algebra'
276248
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
277249
job "mathcomp-algebra"
278-
- if: steps.stepCheck.outputs.status == 'built'
250+
- if: steps.stepCheck.outputs.status != 'fetched'
279251
name: 'Building/fetching previous CI target: mathcomp-finmap'
280252
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
281253
job "mathcomp-finmap"
282-
- if: steps.stepCheck.outputs.status == 'built'
254+
- if: steps.stepCheck.outputs.status != 'fetched'
283255
name: 'Building/fetching previous CI target: mathcomp-fingroup'
284256
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
285257
job "mathcomp-fingroup"
286-
- if: steps.stepCheck.outputs.status == 'built'
258+
- if: steps.stepCheck.outputs.status != 'fetched'
287259
name: 'Building/fetching previous CI target: mathcomp-bigenough'
288260
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
289261
job "mathcomp-bigenough"
290-
- if: steps.stepCheck.outputs.status == 'built'
262+
- if: steps.stepCheck.outputs.status != 'fetched'
291263
name: Building/fetching current CI target
292264
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
293265
job "multinomials"

0 commit comments

Comments
 (0)