Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

ISLE verifier: update GitHub cache from `publish-artifacts` workflow as well. (#15083)

Chris Fallind0202d6c7b07
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 5fe04b62ee..718bf131f6 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1340,6 +1340,9 @@ jobs:
# Bump `v1` if the cache format changes. `hashFiles` covers the ISLE
# sources and the ISLE toolchain itself by hashing the paths and
# contents of all matching files.
+ #
+ # Note: keep this key in sync with the same key in the
+ # `isle-veri-cache` job in `publish-artifacts.yml`.
key: isle-veri-cache-v1-${{ hashFiles('cranelift/isle/**/*.rs', 'cranelift/codegen/**/*.isle') }}
restore-keys: |
isle-veri-cache-v1-
diff --git a/.github/workflows/publish-artifacts.yml b/.github/workflows/publish-artifacts.yml
index 7c4f406c23..2b58793c94 100644
--- a/.github/workflows/publish-artifacts.yml
+++ b/.github/workflows/publish-artifacts.yml
@@ -63,6 +63,31 @@ jobs:
GH_TOKEN: ${{ github.token }}
continue-on-error: true
+ # Publish the ISLE verifier's SMT query cache.
+ isle-veri-cache:
+ name: Publish new isle-veri cache
+ runs-on: ubuntu-latest
+ if: github.repository == 'bytecodealliance/wasmtime' && github.ref == 'refs/heads/main'
+ permissions:
+ actions: read
+ contents: read
+ steps:
+ # git checkout is needed to have the files we hash below.
+ - uses: actions/checkout@v7
+ - uses: ./.github/actions/fetch-run-id
+ - name: Download rebuilt cache from CI run
+ run: gh run download ${COMMIT_RUN_ID} --name isle-veri-cache
+ env:
+ GH_TOKEN: ${{ github.token }}
+ - name: Unpack rebuilt cache
+ run: tar xzf isle-veri-cache.tar.gz -C cranelift/isle/veri
+ - name: Save verifier cache
+ uses: actions/cache/save@v6
+ with:
+ path: cranelift/isle/veri/cache
+ # Note: keep this key in sync with cache fetch in `main.yml`'s isle-veri job.
+ key: isle-veri-cache-v1-${{ hashFiles('cranelift/isle/**/*.rs', 'cranelift/codegen/**/*.isle') }}
+
# See https://github.com/actions/deploy-pages
deploy:
name: Deploy gh-pages artifact