Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix(ci): keep the next-build artefact on disk, not on the runner's tmpfs (#11896)

Diego Rodrigues de Sa e Souza5b38ec717d66
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ee0727329c..0c4bdca2e9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -657,14 +657,14 @@ jobs:
# Keep standalone/node_modules intact: package/electron jobs consume the
# Next-traced standalone tree and must not replace it with root node_modules.
run: |
- tar -czf /tmp/e2e-build.tar.gz \
+ tar -czf "$RUNNER_TEMP/e2e-build.tar.gz" \
--exclude='.build/next/cache' \
.build/next
- name: Upload Next.js build for downstream jobs
uses: actions/upload-artifact@v7
with:
name: next-build
- path: /tmp/e2e-build.tar.gz
+ path: ${{ runner.temp }}/e2e-build.tar.gz
retention-days: 1
package-artifact:
@@ -687,10 +687,14 @@ jobs:
uses: actions/download-artifact@v8
with:
name: next-build
- path: /tmp/
+ # Workspace-relative on purpose: the matrix below includes windows-latest, whose
+ # default shell is pwsh, where $RUNNER_TEMP is empty (it is $env:RUNNER_TEMP) —
+ # #11896's first cut broke the Electron smoke on exactly that. A relative path
+ # works in bash and pwsh alike; hosted workspaces are ephemeral.
+ path: next-build-artifact
- name: Extract Next.js build artifact
run: |
- tar -xzf /tmp/e2e-build.tar.gz
+ tar -xzf next-build-artifact/e2e-build.tar.gz
# build:cli consumes the downloaded .build/next standalone artifact and assembles dist/;
# it only rebuilds if the downloaded standalone artifact is missing.
- run: npm run build:cli
@@ -778,10 +782,14 @@ jobs:
uses: actions/download-artifact@v8
with:
name: next-build
- path: /tmp/
+ # Workspace-relative on purpose: the matrix below includes windows-latest, whose
+ # default shell is pwsh, where $RUNNER_TEMP is empty (it is $env:RUNNER_TEMP) —
+ # #11896's first cut broke the Electron smoke on exactly that. A relative path
+ # works in bash and pwsh alike; hosted workspaces are ephemeral.
+ path: next-build-artifact
- name: Extract Next.js build artifact
run: |
- tar -xzf /tmp/e2e-build.tar.gz
+ tar -xzf next-build-artifact/e2e-build.tar.gz
- name: Install Electron dependencies
working-directory: electron
run: npm install --no-audit --no-fund
@@ -1241,10 +1249,14 @@ jobs:
uses: actions/download-artifact@v8
with:
name: next-build
- path: /tmp/
+ # Workspace-relative on purpose: the matrix below includes windows-latest, whose
+ # default shell is pwsh, where $RUNNER_TEMP is empty (it is $env:RUNNER_TEMP) —
+ # #11896's first cut broke the Electron smoke on exactly that. A relative path
+ # works in bash and pwsh alike; hosted workspaces are ephemeral.
+ path: next-build-artifact
- name: Extract Next.js build artifact
run: |
- tar -xzf /tmp/e2e-build.tar.gz
+ tar -xzf next-build-artifact/e2e-build.tar.gz
# WS4.1: duration-balanced shards (LPT over config/quality/e2e-timings.json).
# Measured skew of plain --shard was 14× (24m47s vs 1m47s) — E2E was the CI
# critical path. The balancer self-verifies completeness and exits non-zero on
diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml
index b316ed6708..e7a92bb2f4 100644
--- a/.github/workflows/npm-publish.yml
+++ b/.github/workflows/npm-publish.yml
@@ -204,8 +204,11 @@ jobs:
exit 0
fi
RUN=""
+ # $RUNNER_TEMP, never /tmp: on the .113 pool /tmp is a 12 GB tmpfs (RAM). Parking
+ # this 1.3 GB artefact there took 27–32 min of the 76-min publish job — the
+ # same bytes upload from disk in 2 min. RUNNER_TEMP is per-runner and on disk.
for candidate in $CANDIDATES; do
- if gh run download "$candidate" --repo "$REPO" --name next-build --dir /tmp/next-build 2>/dev/null; then
+ if gh run download "$candidate" --repo "$REPO" --name next-build --dir "$RUNNER_TEMP/next-build" 2>/dev/null; then
RUN="$candidate"
break
fi
@@ -215,8 +218,8 @@ jobs:
echo "::notice::none of the candidate runs still carries next-build (1-day retention) — falling back to a full build"
exit 0
fi
- tar -xzf /tmp/next-build/e2e-build.tar.gz -C .
- rm -rf /tmp/next-build
+ tar -xzf "$RUNNER_TEMP/next-build/e2e-build.tar.gz" -C .
+ rm -rf "$RUNNER_TEMP/next-build"
if [ -f .build/next/standalone/server.js ]; then
echo "✅ standalone tree restored from CI run $RUN — build:cli will skip next build"
else
diff --git a/changelog.d/maintenance/11896-ci-artifact-download-to-disk.md b/changelog.d/maintenance/11896-ci-artifact-download-to-disk.md
new file mode 100644
index 0000000000..bceb4cf834
--- /dev/null
+++ b/changelog.d/maintenance/11896-ci-artifact-download-to-disk.md
@@ -0,0 +1,5 @@
+- The `next-build` artefact (1.3 GB) is now written and read under `$RUNNER_TEMP`
+ (per-runner, on disk) instead of `/tmp`, which on the self-hosted pool is a
+ 12 GB tmpfs in RAM. Landing it there took 27–32 of the publish job's 76 minutes,
+ and the fixed `/tmp/e2e-build.tar.gz` name let E2E jobs on different runners
+ overwrite each other's download.