Skip to content

Commit 35693ae

Browse files
authored
Merge pull request #64 from proux01/ci-update
[CI] Update Nix toolbox
2 parents 39154ba + ebbad77 commit 35693ae

File tree

9 files changed

+872
-349
lines changed

9 files changed

+872
-349
lines changed

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

Lines changed: 82 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,30 @@ jobs:
44
runs-on: ubuntu-latest
55
steps:
66
- name: Determine which commit to initially checkout
7-
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
8-
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
9-
\ }}\" >> $GITHUB_ENV\nfi\n"
7+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
8+
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
9+
}}\" >> $GITHUB_ENV\nfi\n"
1010
- name: Git checkout
1111
uses: actions/checkout@v4
1212
with:
1313
fetch-depth: 0
1414
ref: ${{ env.target_commit }}
1515
- name: Determine which commit to test
16-
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
17-
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
18-
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
19-
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
20-
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
21-
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
22-
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
23-
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
16+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{
17+
github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
18+
}} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
19+
merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
20+
2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\
21+
\ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha
22+
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
23+
\ fi\nfi\n"
2424
- name: Git checkout
2525
uses: actions/checkout@v4
2626
with:
2727
fetch-depth: 0
2828
ref: ${{ env.tested_commit }}
2929
- name: Cachix install
30-
uses: cachix/install-nix-action@v27
30+
uses: cachix/install-nix-action@v30
3131
with:
3232
nix_path: nixpkgs=channel:nixpkgs-unstable
3333
- name: Cachix setup math-comp
@@ -36,12 +36,18 @@ jobs:
3636
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
3737
extraPullNames: coq, coq-community
3838
name: math-comp
39+
- id: stepGetDerivation
40+
name: Getting derivation for current job (coq)
41+
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
42+
\"8.16\" --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;
3948
- id: stepCheck
40-
name: Checking presence of CI target coq
41-
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
42-
\ bundle \"8.16\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n\
43-
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
44-
s/.*/built/\") >> $GITHUB_OUTPUT\n"
49+
name: Checking presence of CI target for current job
50+
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
4551
- if: steps.stepCheck.outputs.status == 'built'
4652
name: Building/fetching current CI target
4753
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.16" --argstr
@@ -52,30 +58,30 @@ jobs:
5258
runs-on: ubuntu-latest
5359
steps:
5460
- name: Determine which commit to initially checkout
55-
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
56-
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
57-
\ }}\" >> $GITHUB_ENV\nfi\n"
61+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
62+
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
63+
}}\" >> $GITHUB_ENV\nfi\n"
5864
- name: Git checkout
5965
uses: actions/checkout@v4
6066
with:
6167
fetch-depth: 0
6268
ref: ${{ env.target_commit }}
6369
- name: Determine which commit to test
64-
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
65-
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
66-
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
67-
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
68-
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
69-
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
70-
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
71-
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
70+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{
71+
github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
72+
}} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
73+
merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
74+
2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\
75+
\ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha
76+
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
77+
\ fi\nfi\n"
7278
- name: Git checkout
7379
uses: actions/checkout@v4
7480
with:
7581
fetch-depth: 0
7682
ref: ${{ env.tested_commit }}
7783
- name: Cachix install
78-
uses: cachix/install-nix-action@v27
84+
uses: cachix/install-nix-action@v30
7985
with:
8086
nix_path: nixpkgs=channel:nixpkgs-unstable
8187
- name: Cachix setup math-comp
@@ -84,16 +90,26 @@ jobs:
8490
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
8591
extraPullNames: coq, coq-community
8692
name: math-comp
93+
- id: stepGetDerivation
94+
name: Getting derivation for current job (mathcomp)
95+
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
96+
\"8.16\" --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;
87102
- id: stepCheck
88-
name: Checking presence of CI target mathcomp
89-
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
90-
\ bundle \"8.16\" --argstr job \"mathcomp\" \\\n --dry-run 2>&1 > /dev/null)\n\
91-
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
92-
s/.*/built/\") >> $GITHUB_OUTPUT\n"
103+
name: Checking presence of CI target for current job
104+
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
93105
- if: steps.stepCheck.outputs.status == 'built'
94106
name: 'Building/fetching previous CI target: coq'
95107
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.16" --argstr
96108
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.16" --argstr
112+
job "stdlib"
97113
- if: steps.stepCheck.outputs.status == 'built'
98114
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
99115
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.16" --argstr
@@ -122,6 +138,10 @@ jobs:
122138
name: 'Building/fetching previous CI target: hierarchy-builder'
123139
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.16" --argstr
124140
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.16" --argstr
144+
job "stdlib"
125145
- if: steps.stepCheck.outputs.status == 'built'
126146
name: Building/fetching current CI target
127147
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.16" --argstr
@@ -133,30 +153,30 @@ jobs:
133153
runs-on: ubuntu-latest
134154
steps:
135155
- name: Determine which commit to initially checkout
136-
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
137-
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
138-
\ }}\" >> $GITHUB_ENV\nfi\n"
156+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
157+
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
158+
}}\" >> $GITHUB_ENV\nfi\n"
139159
- name: Git checkout
140160
uses: actions/checkout@v4
141161
with:
142162
fetch-depth: 0
143163
ref: ${{ env.target_commit }}
144164
- name: Determine which commit to test
145-
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
146-
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
147-
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
148-
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
149-
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
150-
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
151-
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
152-
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
165+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{
166+
github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
167+
}} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
168+
merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
169+
2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\
170+
\ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha
171+
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
172+
\ fi\nfi\n"
153173
- name: Git checkout
154174
uses: actions/checkout@v4
155175
with:
156176
fetch-depth: 0
157177
ref: ${{ env.tested_commit }}
158178
- name: Cachix install
159-
uses: cachix/install-nix-action@v27
179+
uses: cachix/install-nix-action@v30
160180
with:
161181
nix_path: nixpkgs=channel:nixpkgs-unstable
162182
- name: Cachix setup math-comp
@@ -165,12 +185,18 @@ jobs:
165185
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
166186
extraPullNames: coq, coq-community
167187
name: math-comp
188+
- id: stepGetDerivation
189+
name: Getting derivation for current job (odd-order)
190+
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
191+
\"8.16\" --argstr job \"odd-order\" \\\n --dry-run 2> err > out || (touch
192+
fail; true)\n"
193+
- name: Error reporting
194+
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
195+
- name: Failure check
196+
run: if [ -e fail ]; then exit 1; else exit 0; fi;
168197
- id: stepCheck
169-
name: Checking presence of CI target odd-order
170-
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
171-
\ bundle \"8.16\" --argstr job \"odd-order\" \\\n --dry-run 2>&1 > /dev/null)\n\
172-
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
173-
s/.*/built/\") >> $GITHUB_OUTPUT\n"
198+
name: Checking presence of CI target for current job
199+
run: (echo -n status=; cat out err | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
174200
- if: steps.stepCheck.outputs.status == 'built'
175201
name: 'Building/fetching previous CI target: coq'
176202
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.16" --argstr
@@ -203,12 +229,16 @@ jobs:
203229
name: 'Building/fetching previous CI target: mathcomp'
204230
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.16" --argstr
205231
job "mathcomp"
232+
- if: steps.stepCheck.outputs.status == 'built'
233+
name: 'Building/fetching previous CI target: stdlib'
234+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.16" --argstr
235+
job "stdlib"
206236
- if: steps.stepCheck.outputs.status == 'built'
207237
name: Building/fetching current CI target
208238
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.16" --argstr
209239
job "odd-order"
210240
name: Nix CI for bundle 8.16
211-
'on':
241+
on:
212242
pull_request:
213243
paths:
214244
- .github/workflows/nix-action-8.16.yml

0 commit comments

Comments
 (0)