Skip to content

Commit

Permalink
Adjust caching in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dc-mak committed Nov 13, 2024
1 parent a6430b4 commit 144eca1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 89 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/ci-cheri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,15 @@ jobs:

- name: System dependencies (ubuntu)
run: |
sudo apt install build-essential libgmp-dev opam
sudo apt-get install build-essential libgmp-dev opam
- name: Restore cached opam
id: cache-opam-restore
uses: actions/cache/restore@v4
with:
path: ~/.opam
key: ${{ matrix.version }}

- name: Setup opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
run: |
eval $(opam env --switch=with_coq)
opam repo add --yes --this-switch coq-released https://coq.inria.fr/opam/released
opam pin --yes -n coq-struct-tact https://github.com/uwplse/StructTact.git
opam repo add --yes --this-switch iris-dev https://gitlab.mpi-sws.org/iris/opam.git
opam pin --yes -n coq-sail-stdpp https://github.com/rems-project/coq-sail.git#f319aad
opam pin --yes -n coq-cheri-capabilities https://github.com/rems-project/coq-cheri-capabilities.git
opam install --deps-only --yes ./cerberus-lib.opam ./cerberus-cheri.opam
- name: Save cached opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
id: cache-opam-save
uses: actions/cache/save@v4
with:
path: ~/.opam
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}
fail-on-cache-miss: true

- name: Install Cerberus-CHERI
if: ${{ matrix.version == '4.14.1' }}
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/ci-cn-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,15 @@ jobs:

- name: System dependencies (ubuntu)
run: |
sudo apt install build-essential libgmp-dev z3 opam jq
sudo apt-get install build-essential libgmp-dev z3 opam jq
- name: Restore cached opam
id: cache-opam-restore
uses: actions/cache/restore@v4
with:
path: ~/.opam
key: ${{ matrix.version }}

- name: Setup opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
run: |
opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
opam install --deps-only --yes ./cerberus-lib.opam
opam switch create with_coq ${{ matrix.version }}
- name: Save cached opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
id: cache-opam-save
uses: actions/cache/save@v4
with:
path: ~/.opam
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}
fail-on-cache-miss: true

- name: Install Cerberus
run: |
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/ci-cn-spec-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,15 @@ jobs:

- name: System dependencies (ubuntu)
run: |
sudo apt install build-essential libgmp-dev z3 opam cmake
sudo apt-get install build-essential libgmp-dev z3 opam cmake
- name: Restore cached opam
id: cache-opam-restore
uses: actions/cache/restore@v4
with:
path: ~/.opam
key: ${{ matrix.version }}

- name: Setup opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
run: |
opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
opam install --deps-only --yes ./cerberus-lib.opam
- name: Save cached opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
id: cache-opam-save
uses: actions/cache/save@v4
with:
path: ~/.opam
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}
fail-on-cache-miss: true

- name: Install Cerberus
run: |
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/ci-cn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,15 @@ jobs:

- name: System dependencies (ubuntu)
run: |
sudo apt install build-essential libgmp-dev z3 opam
sudo apt-get install build-essential libgmp-dev z3 opam
- name: Restore cached opam
id: cache-opam-restore
uses: actions/cache/restore@v4
with:
path: ~/.opam
key: ${{ matrix.version }}

- name: Setup opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
run: |
opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
opam install --deps-only --yes ./cerberus-lib.opam
- name: Save cached opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
id: cache-opam-save
uses: actions/cache/save@v4
with:
path: ~/.opam
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}
fail-on-cache-miss: true

- name: Install Cerberus
run: |
Expand Down
23 changes: 1 addition & 22 deletions .github/workflows/ci-pr-bench.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,7 @@ jobs:
with:
path: ~/.opam
key: ${{ matrix.version }}

- name: Setup opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
run: |
opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
opam install --deps-only --yes ./cerberus-lib.opam
opam switch create with_coq ${{ matrix.version }}
eval $(opam env --switch=with_coq)
opam repo add --yes --this-switch coq-released https://coq.inria.fr/opam/released
opam pin --yes -n coq-struct-tact https://github.com/uwplse/StructTact.git
opam repo add --yes --this-switch iris-dev https://gitlab.mpi-sws.org/iris/opam.git
opam pin --yes -n coq-sail-stdpp https://github.com/rems-project/coq-sail.git#f319aad
opam pin --yes -n coq-cheri-capabilities https://github.com/rems-project/coq-cheri-capabilities.git
opam install --deps-only --yes ./cerberus-lib.opam ./cerberus-cheri.opam

- name: Save cached opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
id: cache-opam-save
uses: actions/cache/save@v4
with:
path: ~/.opam
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}
fail-on-cache-miss: true

- name: Install python dependencies
run: pip install tabulate
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: System dependencies (ubuntu)
run: |
sudo apt install build-essential libgmp-dev z3 opam cmake
sudo apt-get install build-essential libgmp-dev z3 opam cmake
- name: Restore cached opam
id: cache-opam-restore
Expand All @@ -44,6 +44,14 @@ jobs:
run: |
opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
opam install --deps-only --yes ./cerberus-lib.opam
opam switch create with_coq ${{ matrix.version }}
eval $(opam env --switch=with_coq)
opam repo add --yes --this-switch coq-released https://coq.inria.fr/opam/released
opam pin --yes -n coq-struct-tact https://github.com/uwplse/StructTact.git
opam repo add --yes --this-switch iris-dev https://gitlab.mpi-sws.org/iris/opam.git
opam pin --yes -n coq-sail-stdpp https://github.com/rems-project/coq-sail.git#f319aad
opam pin --yes -n coq-cheri-capabilities https://github.com/rems-project/coq-cheri-capabilities.git
opam install --deps-only --yes ./cerberus-lib.opam ./cerberus-cheri.opam
- name: Save cached opam
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 144eca1

Please sign in to comment.