Skip to content

Commit 879a8a3

Browse files
committed
[CI] Update Nix toolbox
1 parent 89503cd commit 879a8a3

File tree

5 files changed

+270
-126
lines changed

5 files changed

+270
-126
lines changed

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

Lines changed: 18 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
1010
}}\" >> $GITHUB_ENV\nfi\n"
1111
- name: Git checkout
12-
uses: actions/checkout@v4
12+
uses: actions/checkout@v6
1313
with:
1414
fetch-depth: 0
1515
ref: ${{ env.target_commit }}
@@ -23,7 +23,7 @@ jobs:
2323
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
2424
\ fi\nfi\n"
2525
- name: Git checkout
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v6
2727
with:
2828
fetch-depth: 0
2929
ref: ${{ env.tested_commit }}
@@ -52,12 +52,12 @@ jobs:
5252
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
5353
- if: steps.stepCheck.outputs.status != 'fetched'
5454
name: 'Building/fetching previous CI target: rocq-core'
55-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
56-
job "rocq-core"
55+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1"
56+
--argstr job "rocq-core"
5757
- if: steps.stepCheck.outputs.status != 'fetched'
5858
name: Building/fetching current CI target
59-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
60-
job "coq"
59+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1"
60+
--argstr job "coq"
6161
odd-order:
6262
needs:
6363
- coq
@@ -68,7 +68,7 @@ jobs:
6868
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
6969
}}\" >> $GITHUB_ENV\nfi\n"
7070
- name: Git checkout
71-
uses: actions/checkout@v4
71+
uses: actions/checkout@v6
7272
with:
7373
fetch-depth: 0
7474
ref: ${{ env.target_commit }}
@@ -82,7 +82,7 @@ jobs:
8282
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
8383
\ fi\nfi\n"
8484
- name: Git checkout
85-
uses: actions/checkout@v4
85+
uses: actions/checkout@v6
8686
with:
8787
fetch-depth: 0
8888
ref: ${{ env.tested_commit }}
@@ -111,40 +111,16 @@ jobs:
111111
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
112112
- if: steps.stepCheck.outputs.status != 'fetched'
113113
name: 'Building/fetching previous CI target: coq'
114-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
115-
job "coq"
114+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1"
115+
--argstr job "coq"
116116
- if: steps.stepCheck.outputs.status != 'fetched'
117117
name: 'Building/fetching previous CI target: mathcomp-character'
118-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
119-
job "mathcomp-character"
120-
- if: steps.stepCheck.outputs.status != 'fetched'
121-
name: 'Building/fetching previous CI target: mathcomp-boot'
122-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
123-
job "mathcomp-boot"
124-
- if: steps.stepCheck.outputs.status != 'fetched'
125-
name: 'Building/fetching previous CI target: mathcomp-fingroup'
126-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
127-
job "mathcomp-fingroup"
128-
- if: steps.stepCheck.outputs.status != 'fetched'
129-
name: 'Building/fetching previous CI target: mathcomp-algebra'
130-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
131-
job "mathcomp-algebra"
132-
- if: steps.stepCheck.outputs.status != 'fetched'
133-
name: 'Building/fetching previous CI target: mathcomp-solvable'
134-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
135-
job "mathcomp-solvable"
136-
- if: steps.stepCheck.outputs.status != 'fetched'
137-
name: 'Building/fetching previous CI target: mathcomp-field'
138-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
139-
job "mathcomp-field"
140-
- if: steps.stepCheck.outputs.status != 'fetched'
141-
name: 'Building/fetching previous CI target: mathcomp'
142-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
143-
job "mathcomp"
118+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1"
119+
--argstr job "mathcomp-character"
144120
- if: steps.stepCheck.outputs.status != 'fetched'
145121
name: Building/fetching current CI target
146-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
147-
job "odd-order"
122+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1"
123+
--argstr job "odd-order"
148124
rocq-core:
149125
needs: []
150126
runs-on: ubuntu-latest
@@ -154,7 +130,7 @@ jobs:
154130
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
155131
}}\" >> $GITHUB_ENV\nfi\n"
156132
- name: Git checkout
157-
uses: actions/checkout@v4
133+
uses: actions/checkout@v6
158134
with:
159135
fetch-depth: 0
160136
ref: ${{ env.target_commit }}
@@ -168,7 +144,7 @@ jobs:
168144
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
169145
\ fi\nfi\n"
170146
- name: Git checkout
171-
uses: actions/checkout@v4
147+
uses: actions/checkout@v6
172148
with:
173149
fetch-depth: 0
174150
ref: ${{ env.tested_commit }}
@@ -197,8 +173,8 @@ jobs:
197173
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
198174
- if: steps.stepCheck.outputs.status != 'fetched'
199175
name: Building/fetching current CI target
200-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
201-
job "rocq-core"
176+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1"
177+
--argstr job "rocq-core"
202178
name: Nix CI for bundle 9.1
203179
on:
204180
pull_request:
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
jobs:
2+
coq:
3+
needs:
4+
- rocq-core
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Determine which commit to initially checkout
8+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
9+
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
10+
}}\" >> $GITHUB_ENV\nfi\n"
11+
- name: Git checkout
12+
uses: actions/checkout@v6
13+
with:
14+
fetch-depth: 0
15+
ref: ${{ env.target_commit }}
16+
- name: Determine which commit to test
17+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{
18+
github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
19+
}} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
20+
merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
21+
2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\
22+
\ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha
23+
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
24+
\ fi\nfi\n"
25+
- name: Git checkout
26+
uses: actions/checkout@v6
27+
with:
28+
fetch-depth: 0
29+
ref: ${{ env.tested_commit }}
30+
- name: Cachix install
31+
uses: cachix/install-nix-action@v31
32+
with:
33+
nix_path: nixpkgs=channel:nixpkgs-unstable
34+
- name: Cachix setup math-comp
35+
uses: cachix/cachix-action@v16
36+
with:
37+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
38+
extraPullNames: coq, coq-community
39+
name: math-comp
40+
- id: stepGetDerivation
41+
name: Getting derivation for current job (coq)
42+
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
43+
\"9.2\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail;
44+
true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
45+
failed\"; exit 1; fi\n"
46+
- id: stepCheck
47+
name: Checking presence of CI target for current job
48+
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
49+
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
50+
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
51+
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
52+
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
53+
- if: steps.stepCheck.outputs.status != 'fetched'
54+
name: 'Building/fetching previous CI target: rocq-core'
55+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
56+
--argstr job "rocq-core"
57+
- if: steps.stepCheck.outputs.status != 'fetched'
58+
name: Building/fetching current CI target
59+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
60+
--argstr job "coq"
61+
odd-order:
62+
needs:
63+
- coq
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Determine which commit to initially checkout
67+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
68+
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
69+
}}\" >> $GITHUB_ENV\nfi\n"
70+
- name: Git checkout
71+
uses: actions/checkout@v6
72+
with:
73+
fetch-depth: 0
74+
ref: ${{ env.target_commit }}
75+
- name: Determine which commit to test
76+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{
77+
github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
78+
}} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
79+
merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
80+
2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\
81+
\ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha
82+
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
83+
\ fi\nfi\n"
84+
- name: Git checkout
85+
uses: actions/checkout@v6
86+
with:
87+
fetch-depth: 0
88+
ref: ${{ env.tested_commit }}
89+
- name: Cachix install
90+
uses: cachix/install-nix-action@v31
91+
with:
92+
nix_path: nixpkgs=channel:nixpkgs-unstable
93+
- name: Cachix setup math-comp
94+
uses: cachix/cachix-action@v16
95+
with:
96+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
97+
extraPullNames: coq, coq-community
98+
name: math-comp
99+
- id: stepGetDerivation
100+
name: Getting derivation for current job (odd-order)
101+
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
102+
\"9.2\" --argstr job \"odd-order\" \\\n --dry-run 2> err > out || (touch
103+
fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
104+
failed\"; exit 1; fi\n"
105+
- id: stepCheck
106+
name: Checking presence of CI target for current job
107+
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
108+
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
109+
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
110+
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
111+
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
112+
- if: steps.stepCheck.outputs.status != 'fetched'
113+
name: 'Building/fetching previous CI target: coq'
114+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
115+
--argstr job "coq"
116+
- if: steps.stepCheck.outputs.status != 'fetched'
117+
name: Building/fetching current CI target
118+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
119+
--argstr job "odd-order"
120+
rocq-core:
121+
needs: []
122+
runs-on: ubuntu-latest
123+
steps:
124+
- name: Determine which commit to initially checkout
125+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
126+
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
127+
}}\" >> $GITHUB_ENV\nfi\n"
128+
- name: Git checkout
129+
uses: actions/checkout@v6
130+
with:
131+
fetch-depth: 0
132+
ref: ${{ env.target_commit }}
133+
- name: Determine which commit to test
134+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{
135+
github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
136+
}} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
137+
merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
138+
2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\
139+
\ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha
140+
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
141+
\ fi\nfi\n"
142+
- name: Git checkout
143+
uses: actions/checkout@v6
144+
with:
145+
fetch-depth: 0
146+
ref: ${{ env.tested_commit }}
147+
- name: Cachix install
148+
uses: cachix/install-nix-action@v31
149+
with:
150+
nix_path: nixpkgs=channel:nixpkgs-unstable
151+
- name: Cachix setup math-comp
152+
uses: cachix/cachix-action@v16
153+
with:
154+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
155+
extraPullNames: coq, coq-community
156+
name: math-comp
157+
- id: stepGetDerivation
158+
name: Getting derivation for current job (rocq-core)
159+
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
160+
\"9.2\" --argstr job \"rocq-core\" \\\n --dry-run 2> err > out || (touch
161+
fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
162+
failed\"; exit 1; fi\n"
163+
- id: stepCheck
164+
name: Checking presence of CI target for current job
165+
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
166+
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
167+
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
168+
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
169+
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
170+
- if: steps.stepCheck.outputs.status != 'fetched'
171+
name: Building/fetching current CI target
172+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
173+
--argstr job "rocq-core"
174+
name: Nix CI for bundle 9.2
175+
on:
176+
pull_request:
177+
paths:
178+
- .github/workflows/nix-action-9.2.yml
179+
pull_request_target:
180+
paths-ignore:
181+
- .github/workflows/nix-action-9.2.yml
182+
types:
183+
- opened
184+
- synchronize
185+
- reopened
186+
push:
187+
branches:
188+
- master

0 commit comments

Comments
 (0)