Skip to content

Commit 1b45548

Browse files
committed
[CI] Update Nix toolbox
1 parent 9d256b8 commit 1b45548

File tree

2 files changed

+66
-1
lines changed

2 files changed

+66
-1
lines changed

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

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,69 @@
11
jobs:
2+
QuickChick:
3+
needs:
4+
- coq
5+
- mathcomp-ssreflect
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Determine which commit to initially checkout
9+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
10+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
11+
\ }}\" >> $GITHUB_ENV\nfi\n"
12+
- name: Git checkout
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
ref: ${{ env.target_commit }}
17+
- name: Determine which commit to test
18+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
19+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
20+
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
21+
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
22+
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
23+
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
24+
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
25+
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
26+
- name: Git checkout
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
ref: ${{ env.tested_commit }}
31+
- name: Cachix install
32+
uses: cachix/install-nix-action@v27
33+
with:
34+
nix_path: nixpkgs=channel:nixpkgs-unstable
35+
- name: Cachix setup math-comp
36+
uses: cachix/cachix-action@v15
37+
with:
38+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
39+
extraPullNames: coq, coq-community
40+
name: math-comp
41+
- id: stepCheck
42+
name: Checking presence of CI target QuickChick
43+
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
44+
\ bundle \"coq-8.20\" --argstr job \"QuickChick\" \\\n --dry-run 2>&1 >\
45+
\ /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\"\
46+
\ | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
47+
- if: steps.stepCheck.outputs.status == 'built'
48+
name: 'Building/fetching previous CI target: coq'
49+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.20"
50+
--argstr job "coq"
51+
- if: steps.stepCheck.outputs.status == 'built'
52+
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
53+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.20"
54+
--argstr job "mathcomp-ssreflect"
55+
- if: steps.stepCheck.outputs.status == 'built'
56+
name: 'Building/fetching previous CI target: coq-ext-lib'
57+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.20"
58+
--argstr job "coq-ext-lib"
59+
- if: steps.stepCheck.outputs.status == 'built'
60+
name: 'Building/fetching previous CI target: simple-io'
61+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.20"
62+
--argstr job "simple-io"
63+
- if: steps.stepCheck.outputs.status == 'built'
64+
name: Building/fetching current CI target
65+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.20"
66+
--argstr job "QuickChick"
267
autosubst:
368
needs:
469
- coq

.nix/coq-nix-toolbox.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"b472641a6662a06901b280845b1473e7d6b08ab5"
1+
"6325dec49c36d36c17b8cbfc80efe1e4cef972b5"

0 commit comments

Comments
 (0)