diff --git a/.github/scripts/ci-workflow.test.mjs b/.github/scripts/ci-workflow.test.mjs index 9f86ba6c10..873e51388b 100644 --- a/.github/scripts/ci-workflow.test.mjs +++ b/.github/scripts/ci-workflow.test.mjs @@ -169,6 +169,13 @@ test("Windows compatibility jobs cache Rust compilation without wrapping C or C+ assert.doesNotMatch(win7, /^\s+(?:CC|CXX):/m); }); +test("Win7 TLS cache keys ignore the workspace lockfile", () => { + const win7 = job("windows-win7-bundle"); + assert.ok(win7.includes("hashFiles('.github/fixtures/win7-aws-lc-cache/Cargo.toml', '.github/fixtures/win7-aws-lc-cache/Cargo.lock')")); + assert.ok(win7.includes("hashFiles('.github/fixtures/win7-openssl-cache/Cargo.toml', '.github/fixtures/win7-openssl-cache/Cargo.lock')")); + assert.doesNotMatch(win7, /key: win7-(?:aws-lc|openssl).*hashFiles\('Cargo\.lock'/); +}); + test("the planner uses the exact event base and preserves a single workflow cancellation scope", () => { const changes = job("changes"); assert.ok(changes.includes("github.event.pull_request.base.sha || github.event.before")); diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59300aceeb..9815718c2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -351,10 +351,8 @@ jobs: uses: actions/cache@v4 with: path: ${{ runner.temp }}/win7-aws-lc-install - # Key covers the workspace Cargo.lock too: a main-workspace aws-lc-sys - # bump must rebuild the prebuilt artifacts instead of reusing the - # cached headers/lib for a stale version. - key: win7-aws-lc-v3-${{ runner.os }}-${{ env.WIN7_NIGHTLY_TOOLCHAIN }}-${{ hashFiles('Cargo.lock', '.github/fixtures/win7-aws-lc-cache/Cargo.lock') }} + # The fixture manifest and lockfile define the prebuilt AWS-LC artifact. + key: win7-aws-lc-v3-${{ runner.os }}-${{ env.WIN7_NIGHTLY_TOOLCHAIN }}-${{ hashFiles('.github/fixtures/win7-aws-lc-cache/Cargo.toml', '.github/fixtures/win7-aws-lc-cache/Cargo.lock') }} - name: Build Win7 AWS-LC cache if: steps.aws-lc-cache.outputs.cache-hit != 'true' @@ -449,7 +447,7 @@ jobs: uses: actions/cache@v4 with: path: ${{ runner.temp }}/win7-openssl-install - key: win7-openssl-v1-${{ runner.os }}-${{ env.WIN7_NIGHTLY_TOOLCHAIN }}-${{ hashFiles('Cargo.lock', '.github/fixtures/win7-openssl-cache/Cargo.lock') }} + key: win7-openssl-v1-${{ runner.os }}-${{ env.WIN7_NIGHTLY_TOOLCHAIN }}-${{ hashFiles('.github/fixtures/win7-openssl-cache/Cargo.toml', '.github/fixtures/win7-openssl-cache/Cargo.lock') }} - name: Build Win7 OpenSSL cache if: steps.openssl-cache.outputs.cache-hit != 'true'