Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/test-sticky-tool-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ jobs:
image: windows25-full-x64
runs-on: runs-on=${{ github.run_id }}/env=bootstrap/cpu=2/family=m7/image=${{ matrix.image }}/sticky=tool-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.id }}:20gb
steps:
- uses: actions/checkout@v7
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@v2
with:
egress-policy: audit

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Seed image-only tool cache content on Linux
if: runner.os == 'Linux'
shell: bash
Expand Down Expand Up @@ -58,7 +63,7 @@ jobs:
if ($env:CACHE_HIT -ne "false") { throw "cold cache unexpectedly reported a hit" }
if (Test-Path -LiteralPath (Join-Path $env:RUNNER_TOOL_CACHE "image-only")) { throw "image tool cache was inherited" }
if (Get-ChildItem -Force -LiteralPath $env:RUNNER_TOOL_CACHE | Select-Object -First 1) { throw "cold sticky tool cache is not empty" }
- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: '1.25.1'
cache: false
Expand Down Expand Up @@ -87,6 +92,11 @@ jobs:
needs: cold
runs-on: ubuntu-slim
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@v2
with:
egress-policy: audit

- name: Wait for the cold snapshot to become selectable
run: sleep 120

Expand All @@ -102,7 +112,12 @@ jobs:
image: windows25-full-x64
runs-on: runs-on=${{ github.run_id }}/env=bootstrap/cpu=2/family=m7/image=${{ matrix.image }}/sticky=tool-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.id }}:20gb
steps:
- uses: actions/checkout@v7
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@v2
with:
egress-policy: audit

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Seed fresh image-only tool cache content on Linux
if: runner.os == 'Linux'
shell: bash
Expand Down Expand Up @@ -138,7 +153,7 @@ jobs:
if ($env:CACHE_HIT -ne "true") { throw "restored cache did not report a hit" }
if (Test-Path -LiteralPath (Join-Path $env:RUNNER_TOOL_CACHE "image-only")) { throw "fresh image tool cache was inherited" }
if (-not (Get-ChildItem -Force -LiteralPath $env:RUNNER_TOOL_CACHE -Filter ".runs-on-tool-cache-e2e" -Recurse | Select-Object -First 1)) { throw "restored toolchain marker is missing" }
- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: '1.25.1'
cache: false
Expand Down
Loading