























@@ -414,13 +414,73 @@ jobs:
414414 - name: Audit production dependencies
415415run: node scripts/pre-commit/pnpm-audit-prod.mjs --audit-level=high
416416417+# Warm the lockfile- and pnpm-pinned store once before Linux Node shards fan out.
418+# On a cold key this job owns the save, so later shards restore the exact key.
419+pnpm-store-warmup:
420+permissions:
421+contents: read
422+needs: [preflight]
423+if: needs.preflight.outputs.run_node == 'true' || needs.preflight.outputs.run_check_docs == 'true'
424+runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04') }}
425+timeout-minutes: 20
426+steps:
427+ - name: Checkout
428+shell: bash
429+env:
430+CHECKOUT_REPO: ${{ github.repository }}
431+CHECKOUT_SHA: ${{ needs.preflight.outputs.checkout_revision }}
432+run: |
433+ set -euo pipefail
434+435+ workdir="$GITHUB_WORKSPACE"
436+ reset_checkout_dir() {
437+ mkdir -p "$workdir"
438+ find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
439+ }
440+441+ checkout_attempt() {
442+ local attempt="$1"
443+444+ reset_checkout_dir
445+ git init "$workdir" >/dev/null
446+ git config --global --add safe.directory "$workdir"
447+ git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
448+ git -C "$workdir" config gc.auto 0
449+450+ timeout --signal=TERM --kill-after=10s 30s git -C "$workdir" \
451+ -c protocol.version=2 \
452+ fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
453+ "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
454+455+ git -C "$workdir" checkout --force --detach "$CHECKOUT_SHA" || return 1
456+ test -f "$workdir/.github/actions/setup-node-env/action.yml" || return 1
457+ echo "checkout attempt ${attempt}/5 succeeded"
458+ }
459+460+ for attempt in 1 2 3 4 5; do
461+ if checkout_attempt "$attempt"; then
462+ exit 0
463+ fi
464+ echo "checkout attempt ${attempt}/5 failed"
465+ sleep $((attempt * 5))
466+ done
467+468+ echo "checkout failed after 5 attempts" >&2
469+ exit 1
470+471+ - name: Setup Node environment
472+uses: ./.github/actions/setup-node-env
473+with:
474+install-bun: "false"
475+save-actions-cache: "true"
476+417477# Build dist once for Node-relevant changes and share it with downstream jobs.
418478# Keep this overlapping with the fast correctness lanes so green PRs get heavy
419479# test/build feedback sooner instead of waiting behind a full `check` pass.
420480build-artifacts:
421481permissions:
422482contents: read
423-needs: [preflight]
483+needs: [preflight, pnpm-store-warmup]
424484if: needs.preflight.outputs.run_build_artifacts == 'true'
425485runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && 'blacksmith-16vcpu-ubuntu-2404' || 'ubuntu-24.04') }}
426486timeout-minutes: 20
@@ -652,7 +712,7 @@ jobs:
652712permissions:
653713contents: read
654714name: ${{ matrix.check_name }}
655-needs: [preflight]
715+needs: [preflight, pnpm-store-warmup]
656716if: needs.preflight.outputs.run_checks_fast_core == 'true'
657717runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04') }}
658718timeout-minutes: 60
@@ -741,7 +801,7 @@ jobs:
741801permissions:
742802contents: read
743803name: ${{ matrix.checkName }}
744-needs: [preflight]
804+needs: [preflight, pnpm-store-warmup]
745805if: needs.preflight.outputs.run_plugin_contracts_shards == 'true'
746806runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04') }}
747807timeout-minutes: 60
@@ -821,7 +881,7 @@ jobs:
821881permissions:
822882contents: read
823883name: ${{ matrix.checkName }}
824-needs: [preflight]
884+needs: [preflight, pnpm-store-warmup]
825885if: needs.preflight.outputs.run_checks_fast == 'true'
826886runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04') }}
827887timeout-minutes: 60
@@ -973,7 +1033,7 @@ jobs:
9731033permissions:
9741034contents: read
9751035name: ${{ matrix.check_name }}
976-needs: [preflight]
1036+needs: [preflight, pnpm-store-warmup]
9771037if: needs.preflight.outputs.run_checks_node_core_nondist == 'true'
9781038runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && (matrix.runner || 'ubuntu-24.04') || 'ubuntu-24.04') }}
9791039timeout-minutes: 60
@@ -1079,8 +1139,8 @@ jobs:
10791139permissions:
10801140contents: read
10811141name: ${{ matrix.check_name }}
1082-needs: [preflight]
1083-if: ${{ !cancelled() && always() && needs.preflight.outputs.run_check == 'true' }}
1142+needs: [preflight, pnpm-store-warmup]
1143+if: ${{ !cancelled() && always() && needs.preflight.outputs.run_check == 'true' && needs.pnpm-store-warmup.result == 'success' }}
10841144runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && matrix.runner || 'ubuntu-24.04') }}
10851145timeout-minutes: 20
10861146strategy:
@@ -1210,8 +1270,8 @@ jobs:
12101270permissions:
12111271contents: read
12121272name: ${{ matrix.check_name }}
1213-needs: [preflight]
1214-if: ${{ !cancelled() && always() && needs.preflight.outputs.run_check_additional == 'true' }}
1273+needs: [preflight, pnpm-store-warmup]
1274+if: ${{ !cancelled() && always() && needs.preflight.outputs.run_check_additional == 'true' && needs.pnpm-store-warmup.result == 'success' }}
12151275runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04') }}
12161276timeout-minutes: 20
12171277strategy:
@@ -1377,7 +1437,7 @@ jobs:
13771437check-docs:
13781438permissions:
13791439contents: read
1380-needs: [preflight]
1440+needs: [preflight, pnpm-store-warmup]
13811441if: needs.preflight.outputs.run_check_docs == 'true'
13821442runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04') }}
13831443timeout-minutes: 20
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。