Skip to content

Commit 9637497

Browse files
committed
Update Nix CI
1 parent aad7f69 commit 9637497

13 files changed

+2514
-114
lines changed

.github/workflows/nix-action-9.0.yml renamed to .github/workflows/nix-action-8.19-2.3.0.yml

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
99
}}\" >> $GITHUB_ENV\nfi\n"
1010
- name: Git checkout
11-
uses: actions/checkout@v4
11+
uses: actions/checkout@v6
1212
with:
1313
fetch-depth: 0
1414
ref: ${{ env.target_commit }}
@@ -22,7 +22,7 @@ jobs:
2222
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
2323
\ fi\nfi\n"
2424
- name: Git checkout
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v6
2626
with:
2727
fetch-depth: 0
2828
ref: ${{ env.tested_commit }}
@@ -38,8 +38,8 @@ jobs:
3838
- id: stepGetDerivation
3939
name: Getting derivation for current job (coq)
4040
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
41-
\"9.0\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail;
42-
true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
41+
\"8.19-2.3.0\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch
42+
fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
4343
failed\"; exit 1; fi\n"
4444
- id: stepCheck
4545
name: Checking presence of CI target for current job
@@ -50,9 +50,9 @@ jobs:
5050
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
5151
- if: steps.stepCheck.outputs.status != 'fetched'
5252
name: Building/fetching current CI target
53-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
54-
job "coq"
55-
paramcoq:
53+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
54+
"8.19-2.3.0" --argstr job "coq"
55+
mathcomp:
5656
needs:
5757
- coq
5858
runs-on: ubuntu-latest
@@ -62,7 +62,7 @@ jobs:
6262
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
6363
}}\" >> $GITHUB_ENV\nfi\n"
6464
- name: Git checkout
65-
uses: actions/checkout@v4
65+
uses: actions/checkout@v6
6666
with:
6767
fetch-depth: 0
6868
ref: ${{ env.target_commit }}
@@ -76,7 +76,7 @@ jobs:
7676
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
7777
\ fi\nfi\n"
7878
- name: Git checkout
79-
uses: actions/checkout@v4
79+
uses: actions/checkout@v6
8080
with:
8181
fetch-depth: 0
8282
ref: ${{ env.tested_commit }}
@@ -90,11 +90,11 @@ jobs:
9090
extraPullNames: coq-community, math-comp
9191
name: coq
9292
- id: stepGetDerivation
93-
name: Getting derivation for current job (paramcoq)
93+
name: Getting derivation for current job (mathcomp)
9494
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
95-
\"9.0\" --argstr job \"paramcoq\" \\\n --dry-run 2> err > out || (touch
96-
fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
97-
failed\"; exit 1; fi\n"
95+
\"8.19-2.3.0\" --argstr job \"mathcomp\" \\\n --dry-run 2> err > out ||
96+
(touch fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting
97+
derivation failed\"; exit 1; fi\n"
9898
- id: stepCheck
9999
name: Checking presence of CI target for current job
100100
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
@@ -104,24 +104,27 @@ jobs:
104104
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
105105
- if: steps.stepCheck.outputs.status != 'fetched'
106106
name: 'Building/fetching previous CI target: coq'
107-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
108-
job "coq"
107+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
108+
"8.19-2.3.0" --argstr job "coq"
109+
- if: steps.stepCheck.outputs.status != 'fetched'
110+
name: 'Building/fetching previous CI target: mathcomp-character'
111+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
112+
"8.19-2.3.0" --argstr job "mathcomp-character"
109113
- if: steps.stepCheck.outputs.status != 'fetched'
110114
name: Building/fetching current CI target
111-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
112-
job "paramcoq"
115+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
116+
"8.19-2.3.0" --argstr job "mathcomp"
113117
stablesort:
114118
needs:
115119
- coq
116-
- paramcoq
117120
runs-on: ubuntu-latest
118121
steps:
119122
- name: Determine which commit to initially checkout
120123
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
121124
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
122125
}}\" >> $GITHUB_ENV\nfi\n"
123126
- name: Git checkout
124-
uses: actions/checkout@v4
127+
uses: actions/checkout@v6
125128
with:
126129
fetch-depth: 0
127130
ref: ${{ env.target_commit }}
@@ -135,7 +138,7 @@ jobs:
135138
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
136139
\ fi\nfi\n"
137140
- name: Git checkout
138-
uses: actions/checkout@v4
141+
uses: actions/checkout@v6
139142
with:
140143
fetch-depth: 0
141144
ref: ${{ env.tested_commit }}
@@ -151,9 +154,9 @@ jobs:
151154
- id: stepGetDerivation
152155
name: Getting derivation for current job (stablesort)
153156
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
154-
\"9.0\" --argstr job \"stablesort\" \\\n --dry-run 2> err > out || (touch
155-
fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
156-
failed\"; exit 1; fi\n"
157+
\"8.19-2.3.0\" --argstr job \"stablesort\" \\\n --dry-run 2> err > out ||
158+
(touch fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting
159+
derivation failed\"; exit 1; fi\n"
157160
- id: stepCheck
158161
name: Checking presence of CI target for current job
159162
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
@@ -163,36 +166,36 @@ jobs:
163166
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
164167
- if: steps.stepCheck.outputs.status != 'fetched'
165168
name: 'Building/fetching previous CI target: coq'
166-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
167-
job "coq"
169+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
170+
"8.19-2.3.0" --argstr job "coq"
168171
- if: steps.stepCheck.outputs.status != 'fetched'
169-
name: 'Building/fetching previous CI target: mathcomp'
170-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
171-
job "mathcomp"
172+
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
173+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
174+
"8.19-2.3.0" --argstr job "mathcomp-ssreflect"
172175
- if: steps.stepCheck.outputs.status != 'fetched'
173176
name: 'Building/fetching previous CI target: paramcoq'
174-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
175-
job "paramcoq"
177+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
178+
"8.19-2.3.0" --argstr job "paramcoq"
176179
- if: steps.stepCheck.outputs.status != 'fetched'
177180
name: 'Building/fetching previous CI target: mathcomp-zify'
178-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
179-
job "mathcomp-zify"
181+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
182+
"8.19-2.3.0" --argstr job "mathcomp-zify"
180183
- if: steps.stepCheck.outputs.status != 'fetched'
181184
name: 'Building/fetching previous CI target: equations'
182-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
183-
job "equations"
185+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
186+
"8.19-2.3.0" --argstr job "equations"
184187
- if: steps.stepCheck.outputs.status != 'fetched'
185188
name: Building/fetching current CI target
186-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
187-
job "stablesort"
188-
name: Nix CI for bundle 9.0
189+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
190+
"8.19-2.3.0" --argstr job "stablesort"
191+
name: Nix CI for bundle 8.19-2.3.0
189192
on:
190193
pull_request:
191194
paths:
192-
- .github/workflows/nix-action-9.0.yml
195+
- .github/workflows/nix-action-8.19-2.3.0.yml
193196
pull_request_target:
194197
paths-ignore:
195-
- .github/workflows/nix-action-9.0.yml
198+
- .github/workflows/nix-action-8.19-2.3.0.yml
196199
types:
197200
- opened
198201
- synchronize

.github/workflows/nix-action-8.19.yml renamed to .github/workflows/nix-action-8.20-2.3.0.yml

Lines changed: 89 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
99
}}\" >> $GITHUB_ENV\nfi\n"
1010
- name: Git checkout
11-
uses: actions/checkout@v4
11+
uses: actions/checkout@v6
1212
with:
1313
fetch-depth: 0
1414
ref: ${{ env.target_commit }}
@@ -22,7 +22,7 @@ jobs:
2222
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
2323
\ fi\nfi\n"
2424
- name: Git checkout
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v6
2626
with:
2727
fetch-depth: 0
2828
ref: ${{ env.tested_commit }}
@@ -38,8 +38,8 @@ jobs:
3838
- id: stepGetDerivation
3939
name: Getting derivation for current job (coq)
4040
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
41-
\"8.19\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail;
42-
true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
41+
\"8.20-2.3.0\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch
42+
fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
4343
failed\"; exit 1; fi\n"
4444
- id: stepCheck
4545
name: Checking presence of CI target for current job
@@ -50,8 +50,70 @@ jobs:
5050
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
5151
- if: steps.stepCheck.outputs.status != 'fetched'
5252
name: Building/fetching current CI target
53-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
54-
job "coq"
53+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
54+
"8.20-2.3.0" --argstr job "coq"
55+
mathcomp:
56+
needs:
57+
- coq
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Determine which commit to initially checkout
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"
64+
- name: Git checkout
65+
uses: actions/checkout@v6
66+
with:
67+
fetch-depth: 0
68+
ref: ${{ env.target_commit }}
69+
- name: Determine which commit to test
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"
78+
- name: Git checkout
79+
uses: actions/checkout@v6
80+
with:
81+
fetch-depth: 0
82+
ref: ${{ env.tested_commit }}
83+
- name: Cachix install
84+
uses: cachix/install-nix-action@v31
85+
with:
86+
nix_path: nixpkgs=channel:nixpkgs-unstable
87+
- name: Cachix setup coq
88+
uses: cachix/cachix-action@v16
89+
with:
90+
extraPullNames: coq-community, math-comp
91+
name: coq
92+
- id: stepGetDerivation
93+
name: Getting derivation for current job (mathcomp)
94+
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
95+
\"8.20-2.3.0\" --argstr job \"mathcomp\" \\\n --dry-run 2> err > out ||
96+
(touch fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting
97+
derivation failed\"; exit 1; fi\n"
98+
- id: stepCheck
99+
name: Checking presence of CI target for current job
100+
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
101+
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
102+
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
103+
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
104+
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
105+
- if: steps.stepCheck.outputs.status != 'fetched'
106+
name: 'Building/fetching previous CI target: coq'
107+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
108+
"8.20-2.3.0" --argstr job "coq"
109+
- if: steps.stepCheck.outputs.status != 'fetched'
110+
name: 'Building/fetching previous CI target: mathcomp-character'
111+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
112+
"8.20-2.3.0" --argstr job "mathcomp-character"
113+
- if: steps.stepCheck.outputs.status != 'fetched'
114+
name: Building/fetching current CI target
115+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
116+
"8.20-2.3.0" --argstr job "mathcomp"
55117
stablesort:
56118
needs:
57119
- coq
@@ -62,7 +124,7 @@ jobs:
62124
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
63125
}}\" >> $GITHUB_ENV\nfi\n"
64126
- name: Git checkout
65-
uses: actions/checkout@v4
127+
uses: actions/checkout@v6
66128
with:
67129
fetch-depth: 0
68130
ref: ${{ env.target_commit }}
@@ -76,7 +138,7 @@ jobs:
76138
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
77139
\ fi\nfi\n"
78140
- name: Git checkout
79-
uses: actions/checkout@v4
141+
uses: actions/checkout@v6
80142
with:
81143
fetch-depth: 0
82144
ref: ${{ env.tested_commit }}
@@ -92,9 +154,9 @@ jobs:
92154
- id: stepGetDerivation
93155
name: Getting derivation for current job (stablesort)
94156
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
95-
\"8.19\" --argstr job \"stablesort\" \\\n --dry-run 2> err > out || (touch
96-
fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
97-
failed\"; exit 1; fi\n"
157+
\"8.20-2.3.0\" --argstr job \"stablesort\" \\\n --dry-run 2> err > out ||
158+
(touch fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting
159+
derivation failed\"; exit 1; fi\n"
98160
- id: stepCheck
99161
name: Checking presence of CI target for current job
100162
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
@@ -104,36 +166,36 @@ jobs:
104166
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
105167
- if: steps.stepCheck.outputs.status != 'fetched'
106168
name: 'Building/fetching previous CI target: coq'
107-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
108-
job "coq"
169+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
170+
"8.20-2.3.0" --argstr job "coq"
109171
- if: steps.stepCheck.outputs.status != 'fetched'
110-
name: 'Building/fetching previous CI target: mathcomp'
111-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
112-
job "mathcomp"
172+
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
173+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
174+
"8.20-2.3.0" --argstr job "mathcomp-ssreflect"
113175
- if: steps.stepCheck.outputs.status != 'fetched'
114176
name: 'Building/fetching previous CI target: paramcoq'
115-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
116-
job "paramcoq"
177+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
178+
"8.20-2.3.0" --argstr job "paramcoq"
117179
- if: steps.stepCheck.outputs.status != 'fetched'
118180
name: 'Building/fetching previous CI target: mathcomp-zify'
119-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
120-
job "mathcomp-zify"
181+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
182+
"8.20-2.3.0" --argstr job "mathcomp-zify"
121183
- if: steps.stepCheck.outputs.status != 'fetched'
122184
name: 'Building/fetching previous CI target: equations'
123-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
124-
job "equations"
185+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
186+
"8.20-2.3.0" --argstr job "equations"
125187
- if: steps.stepCheck.outputs.status != 'fetched'
126188
name: Building/fetching current CI target
127-
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
128-
job "stablesort"
129-
name: Nix CI for bundle 8.19
189+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
190+
"8.20-2.3.0" --argstr job "stablesort"
191+
name: Nix CI for bundle 8.20-2.3.0
130192
on:
131193
pull_request:
132194
paths:
133-
- .github/workflows/nix-action-8.19.yml
195+
- .github/workflows/nix-action-8.20-2.3.0.yml
134196
pull_request_target:
135197
paths-ignore:
136-
- .github/workflows/nix-action-8.19.yml
198+
- .github/workflows/nix-action-8.20-2.3.0.yml
137199
types:
138200
- opened
139201
- synchronize

0 commit comments

Comments
 (0)