22 CertiRocq :
33 needs :
44 - coq
5+ - metarocq
56 runs-on : ubuntu-latest
67 steps :
78 - name : Determine which commit to initially checkout
@@ -31,11 +32,12 @@ jobs:
3132 uses : cachix/install-nix-action@v31
3233 with :
3334 nix_path : nixpkgs=channel:nixpkgs-unstable
34- - name : Cachix setup coq
35+ - name : Cachix setup metarocq
3536 uses : cachix/cachix-action@v16
3637 with :
37- extraPullNames : coq-community, math-comp, metarocq
38- name : coq
38+ authToken : ${{ secrets.CACHIX_AUTH_TOKEN }}
39+ extraPullNames : coq, coq-community, math-comp
40+ name : metarocq
3941 - id : stepGetDerivation
4042 name : Getting derivation for current job (CertiRocq)
4143 run : " NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
@@ -109,11 +111,12 @@ jobs:
109111 uses : cachix/install-nix-action@v31
110112 with :
111113 nix_path : nixpkgs=channel:nixpkgs-unstable
112- - name : Cachix setup coq
114+ - name : Cachix setup metarocq
113115 uses : cachix/cachix-action@v16
114116 with :
115- extraPullNames : coq-community, math-comp, metarocq
116- name : coq
117+ authToken : ${{ secrets.CACHIX_AUTH_TOKEN }}
118+ extraPullNames : coq, coq-community, math-comp
119+ name : metarocq
117120 - id : stepGetDerivation
118121 name : Getting derivation for current job (coq)
119122 run : " NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
@@ -135,6 +138,89 @@ jobs:
135138 name : Building/fetching current CI target
136139 run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
137140 " default" --argstr job "coq"
141+ metarocq :
142+ needs :
143+ - coq
144+ runs-on : ubuntu-latest
145+ steps :
146+ - name : Determine which commit to initially checkout
147+ run : " if [ ${{ github.event_name }} = \" push\" ]; then\n echo \" target_commit=${{
148+ github.sha }}\" >> $GITHUB_ENV\n else\n echo \" target_commit=${{ github.event.pull_request.head.sha
149+ }}\" >> $GITHUB_ENV\n fi\n "
150+ - name : Git checkout
151+ uses : actions/checkout@v6
152+ with :
153+ fetch-depth : 0
154+ ref : ${{ env.target_commit }}
155+ - name : Determine which commit to test
156+ run : " if [ ${{ github.event_name }} = \" push\" ]; then\n echo \" tested_commit=${{
157+ github.sha }}\" >> $GITHUB_ENV\n else\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
158+ }} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
159+ merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
160+ 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \" $merge_commit\" \
161+ \ -o \" x$mergeable\" != \" x0\" ]; then\n echo \" tested_commit=${{ github.event.pull_request.head.sha
162+ }}\" >> $GITHUB_ENV\n else\n echo \" tested_commit=$merge_commit\" >> $GITHUB_ENV\n \
163+ \ fi\n fi\n "
164+ - name : Git checkout
165+ uses : actions/checkout@v6
166+ with :
167+ fetch-depth : 0
168+ ref : ${{ env.tested_commit }}
169+ - name : Cachix install
170+ uses : cachix/install-nix-action@v31
171+ with :
172+ nix_path : nixpkgs=channel:nixpkgs-unstable
173+ - name : Cachix setup metarocq
174+ uses : cachix/cachix-action@v16
175+ with :
176+ authToken : ${{ secrets.CACHIX_AUTH_TOKEN }}
177+ extraPullNames : coq, coq-community, math-comp
178+ name : metarocq
179+ - id : stepGetDerivation
180+ name : Getting derivation for current job (metarocq)
181+ run : " NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
182+ \" default\" --argstr job \" metarocq\" \\\n --dry-run 2> err > out || (touch
183+ fail; true)\n cat out err\n if [ -e fail ]; then echo \" Error: getting derivation
184+ failed\" ; exit 1; fi\n "
185+ - id : stepCheck
186+ name : Checking presence of CI target for current job
187+ run : " if $(cat out err | grep -q \" built:\" ) ; then\n echo \" CI target needs
188+ actual building\"\n if $(cat out err | grep -q \" derivations will be built:\" \
189+ ) ; then\n echo \" waiting a bit for derivations that should be in cache\" \
190+ \n sleep 30\n fi\n else\n echo \" CI target already built\"\n echo \" \
191+ status=fetched\" >> $GITHUB_OUTPUT\n fi\n "
192+ - if : steps.stepCheck.outputs.status != 'fetched'
193+ name : ' Building/fetching previous CI target: coq'
194+ run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
195+ " default" --argstr job "coq"
196+ - if : steps.stepCheck.outputs.status != 'fetched'
197+ name : ' Building/fetching previous CI target: equations'
198+ run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
199+ " default" --argstr job "equations"
200+ - if : steps.stepCheck.outputs.status != 'fetched'
201+ name : ' Building/fetching previous CI target: ExtLib'
202+ run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
203+ " default" --argstr job "ExtLib"
204+ - if : steps.stepCheck.outputs.status != 'fetched'
205+ name : ' Building/fetching previous CI target: metarocq-safechecker-plugin'
206+ run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
207+ " default" --argstr job "metarocq-safechecker-plugin"
208+ - if : steps.stepCheck.outputs.status != 'fetched'
209+ name : ' Building/fetching previous CI target: metarocq-erasure-plugin'
210+ run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
211+ " default" --argstr job "metarocq-erasure-plugin"
212+ - if : steps.stepCheck.outputs.status != 'fetched'
213+ name : ' Building/fetching previous CI target: metarocq-translations'
214+ run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
215+ " default" --argstr job "metarocq-translations"
216+ - if : steps.stepCheck.outputs.status != 'fetched'
217+ name : ' Building/fetching previous CI target: metarocq-quotation'
218+ run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
219+ " default" --argstr job "metarocq-quotation"
220+ - if : steps.stepCheck.outputs.status != 'fetched'
221+ name : Building/fetching current CI target
222+ run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
223+ " default" --argstr job "metarocq"
138224 rocq-core :
139225 needs : []
140226 runs-on : ubuntu-latest
@@ -166,11 +252,12 @@ jobs:
166252 uses : cachix/install-nix-action@v31
167253 with :
168254 nix_path : nixpkgs=channel:nixpkgs-unstable
169- - name : Cachix setup coq
255+ - name : Cachix setup metarocq
170256 uses : cachix/cachix-action@v16
171257 with :
172- extraPullNames : coq-community, math-comp, metarocq
173- name : coq
258+ authToken : ${{ secrets.CACHIX_AUTH_TOKEN }}
259+ extraPullNames : coq, coq-community, math-comp
260+ name : metarocq
174261 - id : stepGetDerivation
175262 name : Getting derivation for current job (rocq-core)
176263 run : " NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
0 commit comments