Skip to content

Commit 084f3a6

Browse files
committed
Switch rocq CI to regular Ubuntu with cached rocq
1 parent 952c02d commit 084f3a6

1 file changed

Lines changed: 28 additions & 14 deletions

File tree

.github/workflows/test-matrix.yml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,33 +116,47 @@ jobs:
116116
path: ${{ github.event_path }}
117117

118118
rocq:
119-
runs-on: ubuntu-latest
120-
env:
121-
OPAMROOT: /home/rocq/.opam
122-
container:
123-
image: rocq/rocq-prover:9.0
124-
# github requires root to access some resources from outside the container
125-
# (e.g. https://github.com/actions/checkout/issues/47)
126-
options: --user root
119+
runs-on: ubuntu-24.04
127120

128121
steps:
129122
- uses: actions/checkout@v4
130123

131124
- name: System dependencies
132125
run: |
133-
apt-get update
134-
apt-get -o Acquire::Retries=3 install -y build-essential libgmp-dev z3 git curl
126+
sudo apt-get update
127+
sudo apt-get -o Acquire::Retries=3 install -y build-essential libgmp-dev z3 opam git curl
128+
129+
# Note that we include rocq and its stdlib in the cache to avoid costly rebuilds
130+
- name: Restore cached opam
131+
id: cache-opam-restore
132+
uses: actions/cache/restore@v4
133+
with:
134+
path: ~/.opam
135+
key: rocq-opam
136+
137+
- name: Setup opam
138+
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
139+
run: |
140+
opam init --yes --no-setup --shell=sh --compiler=5.2.1
141+
opam repo add --yes rocq-released https://rocq-prover.org/opam/released
142+
opam update --yes
143+
opam install --yes rocq-core.9.2.0 rocq-stdlib.9.1.0
144+
145+
- name: Save cached opam
146+
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
147+
id: cache-opam-save
148+
uses: actions/cache/save@v4
149+
with:
150+
path: ~/.opam
151+
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}
135152

136153
- name: Install Sail dependencies
137154
run: |
138155
eval $(opam env)
139-
# checkout does this, but for some reason it has disappeared by this point...
140-
git config --global --add safe.directory /__w/sail/sail
141156
opam update --yes
142-
opam pin --yes remove dune
143157
opam pin --yes --no-action add rocq-sail-stdpp git+https://github.com/rems-project/coq-sail.git
144158
opam pin --yes --no-action -k path add .
145-
opam install --yes "coq<9.1" rocq-sail-stdpp coq-record-update
159+
opam install --yes rocq-sail-stdpp coq-record-update
146160
opam install . --yes --deps-only
147161
148162
- name: Build Sail with coverage

0 commit comments

Comments
 (0)