ci: use the runner image's node instead of setup-node, which downloaded it again on every run
Site / deploy (push) Successful in 2m39s
Gates / test (push) Successful in 2m59s
Gates / frontend (push) Successful in 3m23s
Gates / test-aarch64 (push) Successful in 7m57s
CI / gates (push) Canceled after 22h20m36s
Gates / package (push) Failing after 53s
Gates / container (push) Canceled after 0s

This commit is contained in:
2026-10-21 18:53:42 +02:00
parent 7e0664250b
commit 2a06239676
4 changed files with 23 additions and 24 deletions
+11 -10
View File
@@ -52,8 +52,8 @@ env:
NODE_VERSION: "24.19.0" NODE_VERSION: "24.19.0"
# The npm the cut runs and the npm CI runs must be one version: npm writes the # The npm the cut runs and the npm CI runs must be one version: npm writes the
# admin bundle whose bytes the release hashes are pinned to before CI ever # admin bundle whose bytes the release hashes are pinned to before CI ever
# rebuilds them. setup-node installs the npm that ships with the node above, # rebuilds them. The runner image ships the npm that comes with the node
# so this pin is asserted, not installed. # above, so this pin is asserted, not installed.
NPM_VERSION: "11.17.0" NPM_VERSION: "11.17.0"
# There is deliberately no CI_VERSION literal here. Ruling 2 allows the # There is deliberately no CI_VERSION literal here. Ruling 2 allows the
# version to exist in the tag and in build.zig.zon and nowhere else, and # version to exist in the tag and in build.zig.zon and nowhere else, and
@@ -126,20 +126,21 @@ jobs:
# 1536Mi dind limit, and it runs no docker command — so it overlaps the # 1536Mi dind limit, and it runs no docker command — so it overlaps the
# heavy runner's zig and image work instead of queueing behind it. # heavy runner's zig and image work instead of queueing behind it.
runs-on: ubuntu-24.04-light runs-on: ubuntu-24.04-light
# The slowest green run took 4 minutes. A stalled Node download leaves setup-node # The slowest green run took 4 minutes. Without a limit, a request stalled
# holding an open socket after its retry succeeds, so the step never exits: # on the network once held the runner for over an hour.
# without a limit the job held the runner for over an hour.
timeout-minutes: 8 timeout-minutes: 8
steps: steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Set up Node # The runner image ships this Node and npm on PATH; the assertion below is
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 # what pins them. setup-node is not used: it looks for Node in an empty
# tool cache and downloads it again on every run.
- name: Cache npm downloads
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with: with:
node-version: ${{ env.NODE_VERSION }} path: ~/.npm
cache: npm key: npm-${{ runner.os }}-${{ hashFiles('admin/package-lock.json') }}
cache-dependency-path: admin/package-lock.json
# The bundle is a release input whose hash is pinned before this run # The bundle is a release input whose hash is pinned before this run
# exists, so a runner on a different node or npm must fail here rather # exists, so a runner on a different node or npm must fail here rather
+7 -5
View File
@@ -271,12 +271,14 @@ jobs:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: ./zig-out/bin/release resolve run: ./zig-out/bin/release resolve
- name: Set up Node # The runner image ships this Node and npm on PATH; the assertion below is
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 # what pins them. setup-node is not used: it looks for Node in an empty
# tool cache and downloads it again on every run.
- name: Cache npm downloads
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with: with:
node-version: ${{ env.NODE_VERSION }} path: ~/.npm
cache: npm key: npm-${{ runner.os }}-${{ hashFiles('admin/package-lock.json') }}
cache-dependency-path: admin/package-lock.json
# The same pinned toolchain and normalized environment as the frontend # The same pinned toolchain and normalized environment as the frontend
# job in gates.yml: the cut pinned the bundle's bytes into flake.nix # job in gates.yml: the cut pinned the bundle's bytes into flake.nix
+2 -6
View File
@@ -26,7 +26,6 @@ concurrency:
cancel-in-progress: false cancel-in-progress: false
env: env:
NODE_VERSION: "24.19.0"
# The newest wrangler older than npm's release-age floor on the day it was pinned. # The newest wrangler older than npm's release-age floor on the day it was pinned.
WRANGLER_VERSION: "4.148.0" WRANGLER_VERSION: "4.148.0"
@@ -37,11 +36,8 @@ jobs:
steps: steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Set up Node # Node is the one the runner image puts on PATH. setup-node is not used:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 # it looks for Node in an empty tool cache and downloads it again.
with:
node-version: ${{ env.NODE_VERSION }}
- name: Build - name: Build
working-directory: website working-directory: website
run: | run: |
+3 -3
View File
@@ -1659,9 +1659,9 @@ fn toolchainParity(ctx: *Ctx) ![]const u8 {
return CheckFailed; return CheckFailed;
}; };
// `node --version` prints `v24.19.0`; the workflow pins the number the way // `node --version` prints `v24.19.0`; the workflow pins the bare number,
// setup-node takes it, without the `v`. `npm --version` and `zig version` // without the `v`. `npm --version` and `zig version` print the bare number
// print the bare number already. // already.
try assertVersion(ctx, "node", &.{ "node", "--version" }, "v", pins.node); try assertVersion(ctx, "node", &.{ "node", "--version" }, "v", pins.node);
try assertVersion(ctx, "npm", &.{ "npm", "--version" }, "", pins.npm); try assertVersion(ctx, "npm", &.{ "npm", "--version" }, "", pins.npm);