Skip to content

Commit 8ad13ee

Browse files
committed
[CI] Update Nix CI
1 parent 7641839 commit 8ad13ee

File tree

2 files changed

+64
-2
lines changed

2 files changed

+64
-2
lines changed

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

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ jobs:
314314
- coq
315315
- mathcomp-classical
316316
- mathcomp-field
317+
- mathcomp-bigenough
317318
- hierarchy-builder
318319
runs-on: ubuntu-latest
319320
steps:
@@ -368,6 +369,10 @@ jobs:
368369
name: 'Building/fetching previous CI target: mathcomp-field'
369370
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
370371
--argstr job "mathcomp-field"
372+
- if: steps.stepCheck.outputs.status == 'built'
373+
name: 'Building/fetching previous CI target: mathcomp-bigenough'
374+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
375+
--argstr job "mathcomp-bigenough"
371376
- if: steps.stepCheck.outputs.status == 'built'
372377
name: 'Building/fetching previous CI target: hierarchy-builder'
373378
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
@@ -376,6 +381,63 @@ jobs:
376381
name: Building/fetching current CI target
377382
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
378383
--argstr job "mathcomp-analysis"
384+
mathcomp-bigenough:
385+
needs:
386+
- coq
387+
- mathcomp-ssreflect
388+
runs-on: ubuntu-latest
389+
steps:
390+
- name: Determine which commit to initially checkout
391+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
392+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
393+
\ }}\" >> $GITHUB_ENV\nfi\n"
394+
- name: Git checkout
395+
uses: actions/checkout@v3
396+
with:
397+
fetch-depth: 0
398+
ref: ${{ env.target_commit }}
399+
- name: Determine which commit to test
400+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
401+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
402+
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
403+
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
404+
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
405+
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
406+
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
407+
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
408+
- name: Git checkout
409+
uses: actions/checkout@v3
410+
with:
411+
fetch-depth: 0
412+
ref: ${{ env.tested_commit }}
413+
- name: Cachix install
414+
uses: cachix/install-nix-action@v20
415+
with:
416+
nix_path: nixpkgs=channel:nixpkgs-unstable
417+
- name: Cachix setup coq-elpi
418+
uses: cachix/cachix-action@v12
419+
with:
420+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
421+
extraPullNames: coq, coq-community, math-comp
422+
name: coq-elpi
423+
- id: stepCheck
424+
name: Checking presence of CI target mathcomp-bigenough
425+
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
426+
\ bundle \"coq-8.19\" --argstr job \"mathcomp-bigenough\" \\\n --dry-run\
427+
\ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\
428+
\ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
429+
- if: steps.stepCheck.outputs.status == 'built'
430+
name: 'Building/fetching previous CI target: coq'
431+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
432+
--argstr job "coq"
433+
- if: steps.stepCheck.outputs.status == 'built'
434+
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
435+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
436+
--argstr job "mathcomp-ssreflect"
437+
- if: steps.stepCheck.outputs.status == 'built'
438+
name: Building/fetching current CI target
439+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
440+
--argstr job "mathcomp-bigenough"
379441
mathcomp-character:
380442
needs:
381443
- coq

.nix/config.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
odd-order.override.version = "master";
1717
odd-order.job = true;
1818

19-
mathcomp-analysis.override.version = "hierarchy-builder";
19+
mathcomp-analysis.override.version = "master";
2020
mathcomp-analysis.job = true;
2121

2222
mathcomp-finmap.override.version = "master";
2323
mathcomp-finmap.job = true;
2424

25-
mathcomp-classical.override.version = "hierarchy-builder";
25+
mathcomp-classical.override.version = "master";
2626
mathcomp-classical.job = true;
2727

2828
mathcomp-single-planB-src.job = false;

0 commit comments

Comments
 (0)