diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca0c59f4c4da..ff84938f2959 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1367,6 +1367,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 8c2d419af08e..ce31ca19f7f7 100644 --- a/.github/workflows/publish-artifacts.yml +++ b/.github/workflows/publish-artifacts.yml @@ -62,6 +62,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