mirror of
https://github.com/herdrdev/herdr.git
synced 2026-09-14 18:03:41 +08:00
ci: migrate remaining pinned actions to node24 (#4023)
* ci: migrate remaining pinned actions to node24 actions/cache@v4 and mlugg/setup-zig@v2.2.1 still target Node 20, which GitHub removes from runners on 2026-09-23. Bump actions/cache to v6.1.0 and replace mlugg/setup-zig with vercel-labs/setup-zig@v1.0.2. vercel-labs/setup-zig takes only `version`, so the use-cache/cache-size-limit tuning and Zig global-cache reuse are dropped. See the PR for alternatives. * ci: restore zig caching for vercel setup-zig vercel-labs/setup-zig has no cache controls, so redirect the Zig global cache into the workspace .zig-cache and run the Zig build cache step on Linux too. Drop this commit if we switch to a setup action that owns Zig caching, e.g. step-security/setup-zig or xyzzylabs/setup-zig.
This commit is contained in:
@@ -70,7 +70,7 @@ jobs:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install Zig
|
||||
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
|
||||
uses: vercel-labs/setup-zig@83c1594f26b86da8a9a8ddd9b5ee5f3af0f96943 # v1.0.2
|
||||
with:
|
||||
version: 0.16.0
|
||||
|
||||
@@ -154,7 +154,7 @@ jobs:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install Zig
|
||||
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
|
||||
uses: vercel-labs/setup-zig@83c1594f26b86da8a9a8ddd9b5ee5f3af0f96943 # v1.0.2
|
||||
with:
|
||||
version: 0.16.0
|
||||
|
||||
@@ -207,7 +207,7 @@ jobs:
|
||||
targets: x86_64-pc-windows-msvc
|
||||
|
||||
- name: Install Zig
|
||||
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
|
||||
uses: vercel-labs/setup-zig@83c1594f26b86da8a9a8ddd9b5ee5f3af0f96943 # v1.0.2
|
||||
with:
|
||||
version: 0.16.0
|
||||
|
||||
|
||||
+10
-10
@@ -14,6 +14,11 @@ env:
|
||||
# Keep file/line backtraces without generating type and variable debug information.
|
||||
CARGO_PROFILE_DEV_DEBUG: "1"
|
||||
CARGO_PROFILE_TEST_DEBUG: "1"
|
||||
# vercel-labs/setup-zig does not cache the Zig global cache, so redirect it into the
|
||||
# workspace .zig-cache that the Zig build cache steps persist. Remove this (and the
|
||||
# widened condition on "Restore Zig build cache") if we switch to a setup action that
|
||||
# owns Zig caching, e.g. step-security/setup-zig. See PR #4023.
|
||||
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
@@ -89,12 +94,9 @@ jobs:
|
||||
bun-version: 1.3.14
|
||||
|
||||
- name: Install Zig
|
||||
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
|
||||
uses: vercel-labs/setup-zig@83c1594f26b86da8a9a8ddd9b5ee5f3af0f96943 # v1.0.2
|
||||
with:
|
||||
version: 0.16.0
|
||||
use-cache: ${{ runner.os == 'Linux' }}
|
||||
# Linux builds both SIMD/ReleaseFast and scalar/ReleaseSafe variants.
|
||||
cache-size-limit: 4096
|
||||
|
||||
# Zig's C-header cache keys include the compiler installation path.
|
||||
- name: Stabilize Zig installation path on Unix
|
||||
@@ -116,8 +118,7 @@ jobs:
|
||||
"ZIG=$(Join-Path $stable 'zig.exe')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Restore Zig build cache
|
||||
if: runner.os == 'macOS' || matrix.kind == 'windows'
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: .zig-cache
|
||||
key: zig-build-v1-${{ runner.os }}-${{ runner.arch }}-0.16.0-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
@@ -134,7 +135,7 @@ jobs:
|
||||
# rebuilds workspace targets; only rustc's validated query state is retained.
|
||||
- name: Restore Windows incremental compiler state
|
||||
if: matrix.kind == 'windows'
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: target/debug/incremental
|
||||
key: ci-incremental-v1-${{ runner.os }}-${{ runner.arch }}-${{ env.RUST_TOOLCHAIN_VERSION }}-${{ env.CARGO_PROFILE_DEV_DEBUG }}-${{ env.CARGO_PROFILE_TEST_DEBUG }}-${{ hashFiles('Cargo.lock', 'Cargo.toml', '.cargo/config.toml', 'build.rs') }}-${{ github.sha }}
|
||||
@@ -192,10 +193,9 @@ jobs:
|
||||
targets: x86_64-pc-windows-msvc
|
||||
|
||||
- name: Install Zig
|
||||
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
|
||||
uses: vercel-labs/setup-zig@83c1594f26b86da8a9a8ddd9b5ee5f3af0f96943 # v1.0.2
|
||||
with:
|
||||
version: 0.16.0
|
||||
use-cache: false
|
||||
|
||||
- name: Stabilize Zig installation path
|
||||
shell: pwsh
|
||||
@@ -207,7 +207,7 @@ jobs:
|
||||
"ZIG=$(Join-Path $stable 'zig.exe')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Restore Zig build cache
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: .zig-cache
|
||||
key: zig-build-v1-conpty-package-windows-2022-${{ runner.arch }}-0.16.0-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
|
||||
@@ -103,7 +103,7 @@ jobs:
|
||||
|
||||
- name: Install Zig
|
||||
if: steps.plan.outputs.should_publish == 'true'
|
||||
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
|
||||
uses: vercel-labs/setup-zig@83c1594f26b86da8a9a8ddd9b5ee5f3af0f96943 # v1.0.2
|
||||
with:
|
||||
version: 0.16.0
|
||||
|
||||
@@ -161,7 +161,7 @@ jobs:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install Zig
|
||||
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
|
||||
uses: vercel-labs/setup-zig@83c1594f26b86da8a9a8ddd9b5ee5f3af0f96943 # v1.0.2
|
||||
with:
|
||||
version: 0.16.0
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ jobs:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install Zig
|
||||
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
|
||||
uses: vercel-labs/setup-zig@83c1594f26b86da8a9a8ddd9b5ee5f3af0f96943 # v1.0.2
|
||||
with:
|
||||
version: 0.16.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user