Skip to content

Commit

Permalink
CI: Update elan cache and path
Browse files Browse the repository at this point in the history
  • Loading branch information
Alasdair committed Jan 29, 2025
1 parent dd8d4d1 commit d4aadd6
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ jobs:
sudo apt-get update
sudo apt-get -o Acquire::Retries=3 install build-essential libgmp-dev z3 cvc4 opam cargo verilator git curl
- name: Install Lean version manager
run: |
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | bash -s -- -y
- name: Restore cached elan
id: cache-elan-restore
uses: actions/cache/restore@v3
with:
path: ~/.elan
key: ${{ matrix.os }}-${{ matrix.version }}-cov
key: ${{ matrix.os }}-${{ matrix.version }}-elan

- name: Install Lean version manager
if: steps.cache-elan-restore.outputs.cache-hit != 'true'
run: |
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | bash -s -- -y
- name: Save cached elan
if: steps.cache-elan-restore.outputs.cache-hit != 'true'
Expand All @@ -42,6 +43,10 @@ jobs:
path: ~/.elan
key: ${{ steps.cache-elan-restore.outputs.cache-primary-key }}

- name: Set elan path
run: |
echo "$HOME/.elan/bin" >> "$GITHUB_PATH"
- name: Restore cached opam
id: cache-opam-restore
uses: actions/cache/restore@v3
Expand All @@ -62,7 +67,7 @@ jobs:
path: ~/.opam
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}

- name: Install Sail
- name: Install Sail dependencies
run: |
eval $(opam env)
opam pin --yes --no-action add .
Expand All @@ -88,7 +93,6 @@ jobs:
- name: Test Sail
run: |
eval $(opam env)
export PATH="~/.elan/bin:$PATH"
export SAIL_DIR=$(pwd)
etc/ci_coverage_tests.sh
Expand Down

0 comments on commit d4aadd6

Please sign in to comment.