Skip to content

Commit 8ba8ac9

Browse files
committed
fix nix
1 parent b5a6c60 commit 8ba8ac9

File tree

3 files changed

+134
-2
lines changed

3 files changed

+134
-2
lines changed

.github/workflows/nix-action-coq-8.18.yml

Lines changed: 130 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
jobs:
22
Verdi:
33
needs:
4+
- coq
45
- mathcomp-ssreflect
56
runs-on: ubuntu-latest
67
steps:
@@ -65,6 +66,7 @@ jobs:
6566
--argstr job "Verdi"
6667
addition-chains:
6768
needs:
69+
- coq
6870
- mathcomp-ssreflect
6971
- mathcomp-algebra
7072
- mathcomp-fingroup
@@ -135,6 +137,7 @@ jobs:
135137
--argstr job "addition-chains"
136138
autosubst:
137139
needs:
140+
- coq
138141
- mathcomp-ssreflect
139142
runs-on: ubuntu-latest
140143
steps:
@@ -189,10 +192,58 @@ jobs:
189192
name: Building/fetching current CI target
190193
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18"
191194
--argstr job "autosubst"
192-
coq-elpi:
195+
coq:
193196
needs: []
194197
runs-on: ubuntu-latest
195198
steps:
199+
- name: Determine which commit to initially checkout
200+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
201+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
202+
\ }}\" >> $GITHUB_ENV\nfi\n"
203+
- name: Git checkout
204+
uses: actions/checkout@v3
205+
with:
206+
fetch-depth: 0
207+
ref: ${{ env.target_commit }}
208+
- name: Determine which commit to test
209+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
210+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
211+
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
212+
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
213+
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
214+
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
215+
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
216+
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
217+
- name: Git checkout
218+
uses: actions/checkout@v3
219+
with:
220+
fetch-depth: 0
221+
ref: ${{ env.tested_commit }}
222+
- name: Cachix install
223+
uses: cachix/install-nix-action@v20
224+
with:
225+
nix_path: nixpkgs=channel:nixpkgs-unstable
226+
- name: Cachix setup coq-elpi
227+
uses: cachix/cachix-action@v12
228+
with:
229+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
230+
extraPullNames: coq, coq-community, math-comp
231+
name: coq-elpi
232+
- id: stepCheck
233+
name: Checking presence of CI target coq
234+
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
235+
\ bundle \"coq-8.18\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n\
236+
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
237+
s/.*/built/\") >> $GITHUB_OUTPUT\n"
238+
- if: steps.stepCheck.outputs.status == 'built'
239+
name: Building/fetching current CI target
240+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18"
241+
--argstr job "coq"
242+
coq-elpi:
243+
needs:
244+
- coq
245+
runs-on: ubuntu-latest
246+
steps:
196247
- name: Determine which commit to initially checkout
197248
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
198249
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
@@ -242,6 +293,7 @@ jobs:
242293
--argstr job "coq-elpi"
243294
coquelicot:
244295
needs:
296+
- coq
245297
- mathcomp-ssreflect
246298
runs-on: ubuntu-latest
247299
steps:
@@ -298,6 +350,7 @@ jobs:
298350
--argstr job "coquelicot"
299351
deriving:
300352
needs:
353+
- coq
301354
- mathcomp-ssreflect
302355
runs-on: ubuntu-latest
303356
steps:
@@ -354,6 +407,7 @@ jobs:
354407
--argstr job "deriving"
355408
hierarchy-builder:
356409
needs:
410+
- coq
357411
- coq-elpi
358412
runs-on: ubuntu-latest
359413
steps:
@@ -410,6 +464,7 @@ jobs:
410464
--argstr job "hierarchy-builder"
411465
mathcomp:
412466
needs:
467+
- coq
413468
- mathcomp-ssreflect
414469
- mathcomp-fingroup
415470
- mathcomp-algebra
@@ -496,6 +551,7 @@ jobs:
496551
--argstr job "mathcomp"
497552
mathcomp-algebra:
498553
needs:
554+
- coq
499555
- mathcomp-ssreflect
500556
- mathcomp-fingroup
501557
- hierarchy-builder
@@ -562,6 +618,7 @@ jobs:
562618
--argstr job "mathcomp-algebra"
563619
mathcomp-analysis:
564620
needs:
621+
- coq
565622
- mathcomp-classical
566623
- mathcomp-field
567624
- mathcomp-bigenough
@@ -633,6 +690,7 @@ jobs:
633690
--argstr job "mathcomp-analysis"
634691
mathcomp-bigenough:
635692
needs:
693+
- coq
636694
- mathcomp-ssreflect
637695
runs-on: ubuntu-latest
638696
steps:
@@ -689,6 +747,7 @@ jobs:
689747
--argstr job "mathcomp-bigenough"
690748
mathcomp-character:
691749
needs:
750+
- coq
692751
- mathcomp-ssreflect
693752
- mathcomp-fingroup
694753
- mathcomp-algebra
@@ -770,7 +829,9 @@ jobs:
770829
--argstr job "mathcomp-character"
771830
mathcomp-classical:
772831
needs:
832+
- coq
773833
- mathcomp-algebra
834+
- mathcomp-finmap
774835
- hierarchy-builder
775836
runs-on: ubuntu-latest
776837
steps:
@@ -821,6 +882,10 @@ jobs:
821882
name: 'Building/fetching previous CI target: mathcomp-algebra'
822883
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18"
823884
--argstr job "mathcomp-algebra"
885+
- if: steps.stepCheck.outputs.status == 'built'
886+
name: 'Building/fetching previous CI target: mathcomp-finmap'
887+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18"
888+
--argstr job "mathcomp-finmap"
824889
- if: steps.stepCheck.outputs.status == 'built'
825890
name: 'Building/fetching previous CI target: hierarchy-builder'
826891
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18"
@@ -831,6 +896,7 @@ jobs:
831896
--argstr job "mathcomp-classical"
832897
mathcomp-field:
833898
needs:
899+
- coq
834900
- mathcomp-ssreflect
835901
- mathcomp-fingroup
836902
- mathcomp-algebra
@@ -907,6 +973,7 @@ jobs:
907973
--argstr job "mathcomp-field"
908974
mathcomp-fingroup:
909975
needs:
976+
- coq
910977
- mathcomp-ssreflect
911978
- hierarchy-builder
912979
runs-on: ubuntu-latest
@@ -966,8 +1033,66 @@ jobs:
9661033
name: Building/fetching current CI target
9671034
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18"
9681035
--argstr job "mathcomp-fingroup"
1036+
mathcomp-finmap:
1037+
needs:
1038+
- coq
1039+
- mathcomp-ssreflect
1040+
runs-on: ubuntu-latest
1041+
steps:
1042+
- name: Determine which commit to initially checkout
1043+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
1044+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
1045+
\ }}\" >> $GITHUB_ENV\nfi\n"
1046+
- name: Git checkout
1047+
uses: actions/checkout@v3
1048+
with:
1049+
fetch-depth: 0
1050+
ref: ${{ env.target_commit }}
1051+
- name: Determine which commit to test
1052+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
1053+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
1054+
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
1055+
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
1056+
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
1057+
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
1058+
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
1059+
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
1060+
- name: Git checkout
1061+
uses: actions/checkout@v3
1062+
with:
1063+
fetch-depth: 0
1064+
ref: ${{ env.tested_commit }}
1065+
- name: Cachix install
1066+
uses: cachix/install-nix-action@v20
1067+
with:
1068+
nix_path: nixpkgs=channel:nixpkgs-unstable
1069+
- name: Cachix setup coq-elpi
1070+
uses: cachix/cachix-action@v12
1071+
with:
1072+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
1073+
extraPullNames: coq, coq-community, math-comp
1074+
name: coq-elpi
1075+
- id: stepCheck
1076+
name: Checking presence of CI target mathcomp-finmap
1077+
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
1078+
\ bundle \"coq-8.18\" --argstr job \"mathcomp-finmap\" \\\n --dry-run 2>&1\
1079+
\ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\
1080+
built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
1081+
- if: steps.stepCheck.outputs.status == 'built'
1082+
name: 'Building/fetching previous CI target: coq'
1083+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18"
1084+
--argstr job "coq"
1085+
- if: steps.stepCheck.outputs.status == 'built'
1086+
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
1087+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18"
1088+
--argstr job "mathcomp-ssreflect"
1089+
- if: steps.stepCheck.outputs.status == 'built'
1090+
name: Building/fetching current CI target
1091+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.18"
1092+
--argstr job "mathcomp-finmap"
9691093
mathcomp-solvable:
9701094
needs:
1095+
- coq
9711096
- mathcomp-ssreflect
9721097
- mathcomp-fingroup
9731098
- mathcomp-algebra
@@ -1039,6 +1164,7 @@ jobs:
10391164
--argstr job "mathcomp-solvable"
10401165
mathcomp-ssreflect:
10411166
needs:
1167+
- coq
10421168
- hierarchy-builder
10431169
runs-on: ubuntu-latest
10441170
steps:
@@ -1095,6 +1221,7 @@ jobs:
10951221
--argstr job "mathcomp-ssreflect"
10961222
odd-order:
10971223
needs:
1224+
- coq
10981225
- mathcomp-character
10991226
- mathcomp-ssreflect
11001227
- mathcomp-fingroup
@@ -1181,6 +1308,7 @@ jobs:
11811308
--argstr job "odd-order"
11821309
reglang:
11831310
needs:
1311+
- coq
11841312
- mathcomp-ssreflect
11851313
runs-on: ubuntu-latest
11861314
steps:
@@ -1237,6 +1365,7 @@ jobs:
12371365
--argstr job "reglang"
12381366
trakt:
12391367
needs:
1368+
- coq
12401369
- coq-elpi
12411370
runs-on: ubuntu-latest
12421371
steps:

.nix/config.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
mathcomp-analysis.override.version = "hierarchy-builder";
1919
mathcomp-analysis.job = true;
2020

21+
mathcomp-finmap.override.version = "2.0.0";
22+
mathcomp-finmap.job = true;
23+
2124
mathcomp-classical.override.version = "hierarchy-builder";
2225
mathcomp-classical.job = true;
2326

.nix/coq-nix-toolbox.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"cef6668e637efb2941cbda0ac0f0a435730fa3c1"
1+
"e7a39f47847edcde691d7bf8f423e4806a1b660f"

0 commit comments

Comments
 (0)