Skip to content

Commit b48d926

Browse files
authored
Merge pull request #355 from proux01/rocq-hb
rocqPackages.hierarchy-builder: init at 1.9.1
2 parents 658e5ca + 042068c commit b48d926

File tree

2 files changed

+66
-2
lines changed

2 files changed

+66
-2
lines changed

.github/workflows/nix-action-rocq-9.0.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,70 @@ jobs:
117117
name: Building/fetching current CI target
118118
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "rocq-9.0"
119119
--argstr job "coq-shell"
120+
hierarchy-builder:
121+
needs:
122+
- rocq-core
123+
- rocq-elpi
124+
runs-on: ubuntu-latest
125+
steps:
126+
- name: Determine which commit to initially checkout
127+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
128+
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
129+
}}\" >> $GITHUB_ENV\nfi\n"
130+
- name: Git checkout
131+
uses: actions/checkout@v4
132+
with:
133+
fetch-depth: 0
134+
ref: ${{ env.target_commit }}
135+
- name: Determine which commit to test
136+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{
137+
github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
138+
}} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
139+
merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
140+
2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\
141+
\ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha
142+
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
143+
\ fi\nfi\n"
144+
- name: Git checkout
145+
uses: actions/checkout@v4
146+
with:
147+
fetch-depth: 0
148+
ref: ${{ env.tested_commit }}
149+
- name: Cachix install
150+
uses: cachix/install-nix-action@v31
151+
with:
152+
nix_path: nixpkgs=channel:nixpkgs-unstable
153+
- name: Cachix setup coq-community
154+
uses: cachix/cachix-action@v16
155+
with:
156+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
157+
extraPullNames: coq, math-comp
158+
name: coq-community
159+
- id: stepGetDerivation
160+
name: Getting derivation for current job (hierarchy-builder)
161+
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
162+
\"rocq-9.0\" --argstr job \"hierarchy-builder\" \\\n --dry-run 2> err >
163+
out || (touch fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error:
164+
getting derivation failed\"; exit 1; fi\n"
165+
- id: stepCheck
166+
name: Checking presence of CI target for current job
167+
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
168+
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
169+
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
170+
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
171+
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
172+
- if: steps.stepCheck.outputs.status != 'fetched'
173+
name: 'Building/fetching previous CI target: rocq-core'
174+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "rocq-9.0"
175+
--argstr job "rocq-core"
176+
- if: steps.stepCheck.outputs.status != 'fetched'
177+
name: 'Building/fetching previous CI target: rocq-elpi'
178+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "rocq-9.0"
179+
--argstr job "rocq-elpi"
180+
- if: steps.stepCheck.outputs.status != 'fetched'
181+
name: Building/fetching current CI target
182+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "rocq-9.0"
183+
--argstr job "hierarchy-builder"
120184
rocq-core:
121185
needs: []
122186
runs-on: ubuntu-latest

.nix/nixpkgs.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
fetchTarball {
2-
url = "https://github.com/NixOS/nixpkgs/archive/6626fe9195f5cd960e37a281444ec3dac3ef4dc0.tar.gz";
3-
sha256 = "0ma10h3gqmv8hkwm7pd65ayxhgy2f2x57rj195jrzn26zl0hnrhl";
2+
url = "https://github.com/NixOS/nixpkgs/archive/f2283541fb720fbf539d5b77e5cda25dd38137a3.tar.gz";
3+
sha256 = "1482dnfkbariix4acxv2pp45pmv3k8q0mx6vw77mbpk9j2kxq66i";
44
}

0 commit comments

Comments
 (0)