From 8201057886fb1f3249c1701a56b58c18982ef435 Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Tue, 3 Nov 2026 14:59:21 -0800 Subject: [PATCH] ISLE verifier: update GitHub cache from `publish-artifacts` workflow as well. We previously had a workflow where we published the updated cache only from CI runs in `main.yml`, but because of branch scoping combined with our use of the merge queue, runs on "`main`" actually ran on a merge-queue temporary branch and thus did not update the cache contents in a location available for other runs. The `main`-scoped content was updated only by our once-per-night full CI run on `main`. This commit updates `publish-artifacts.yml` to add a job to the flow that *does* run on `main`, *after* merge, on every merge: it fetches the artifact from the build we just did and publishes it to the GitHub cache. This way, cache updates from all changes that are merged will be immediately available to subsequent CI runs. --- .github/workflows/main.yml | 3 +++ .github/workflows/publish-artifacts.yml | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) 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