|
|
@@ -30,9 +30,24 @@ jobs:
|
|
|
# Three enterprise jobs isolate coverage, static analysis, and the
|
|
|
# build-backed consumer tail. The static job publishes its exact build so
|
|
|
# consumers do not repeat the longest part of their critical path.
|
|
|
+ #
|
|
|
+ # FAILOVER: each Linux enterprise job resolves its pool through the
|
|
|
+ # DSH_CI_FAILOVER repository variable. Unset (normal), the expressions
|
|
|
+ # pick the hosted enterprise pools below. Setting the variable to
|
|
|
+ # 'selfhosted' (repo Settings → Actions → Variables; writer-manageable
|
|
|
+ # repository state — not PR-editable, no merge required) retargets all
|
|
|
+ # three onto the in-house
|
|
|
+ # vm-backup pool and re-running the failed jobs is the entire switch —
|
|
|
+ # see .agents/notes/implemented/process/2026-07-26-ci-failover-runbook.md. The
|
|
|
+ # in-house pool's readiness is re-proven on every master push by the
|
|
|
+ # serial-linux-selfhosted standby lane below.
|
|
|
node-24:
|
|
|
if: github.event_name == 'pull_request'
|
|
|
- runs-on: dsh-enterprise-ubuntu-latest-32core-test
|
|
|
+ runs-on: >-
|
|
|
+ ${{ vars.DSH_CI_FAILOVER == 'selfhosted'
|
|
|
+ && github.event.pull_request.user.login != 'dependabot[bot]'
|
|
|
+ && fromJSON('["self-hosted", "linux", "x64", "vm-backup"]')
|
|
|
+ || 'dsh-enterprise-ubuntu-latest-32core-test' }}
|
|
|
name: node 24 / static
|
|
|
env:
|
|
|
DSH_GATE_CONCURRENCY: '8'
|
|
|
@@ -43,23 +58,33 @@ jobs:
|
|
|
fetch-depth: 0
|
|
|
persist-credentials: false
|
|
|
|
|
|
+ - uses: pnpm/action-setup@v4
|
|
|
+
|
|
|
+ - uses: actions/setup-node@v6
|
|
|
+ with:
|
|
|
+ node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
+
|
|
|
+ - name: Configure pnpm store path
|
|
|
+ id: pnpm-store
|
|
|
+ run: |
|
|
|
+ store_root="$HOME/.local/share/pnpm/store"
|
|
|
+ echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
|
|
|
+ store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
|
|
|
+ echo "path=$store_path" >> "$GITHUB_OUTPUT"
|
|
|
+
|
|
|
# Pull requests consume the default-branch cache but do not put cache
|
|
|
- # compression and upload on the paid latency-critical path.
|
|
|
+ # compression and upload on the paid latency-critical path. Skipped
|
|
|
+ # under failover — see the coverage lane's identical rationale.
|
|
|
- uses: actions/cache/restore@v4
|
|
|
+ if: vars.DSH_CI_FAILOVER != 'selfhosted' || github.event.pull_request.user.login == 'dependabot[bot]'
|
|
|
with:
|
|
|
- path: /home/runner/.local/share/pnpm/store/v11
|
|
|
+ path: ${{ steps.pnpm-store.outputs.path }}
|
|
|
key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
|
restore-keys: |
|
|
|
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
|
|
|
|
|
|
- - uses: actions/setup-node@v6
|
|
|
- with:
|
|
|
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
-
|
|
|
- - name: Enable corepack and install dependencies
|
|
|
- run: |
|
|
|
- corepack enable
|
|
|
- pnpm install --frozen-lockfile
|
|
|
+ - name: Install (immutable)
|
|
|
+ run: pnpm install --frozen-lockfile
|
|
|
|
|
|
- name: Run static gates
|
|
|
env:
|
|
|
@@ -81,30 +106,52 @@ jobs:
|
|
|
|
|
|
node-24-coverage:
|
|
|
if: github.event_name == 'pull_request'
|
|
|
- runs-on: dsh-enterprise-ubuntu-24-04-32core-test
|
|
|
+ runs-on: >-
|
|
|
+ ${{ vars.DSH_CI_FAILOVER == 'selfhosted'
|
|
|
+ && github.event.pull_request.user.login != 'dependabot[bot]'
|
|
|
+ && fromJSON('["self-hosted", "linux", "x64", "vm-backup"]')
|
|
|
+ || 'dsh-enterprise-ubuntu-24-04-32core-test' }}
|
|
|
name: node 24 / coverage
|
|
|
env:
|
|
|
- DSH_COVERAGE_MAX_WORKERS: '24'
|
|
|
+ # Failover shrinks the worker bound: the hosted 32-core runner is
|
|
|
+ # exclusive to one job, but the failover pool shares one 64-core VM
|
|
|
+ # across six always-on runner instances, and the timing-sensitive
|
|
|
+ # process suites have documented aggregate-contention failures.
|
|
|
+ # 8 × 6 instances = 48 workers worst case on 64 cores.
|
|
|
+ DSH_COVERAGE_MAX_WORKERS: ${{ vars.DSH_CI_FAILOVER == 'selfhosted' && github.event.pull_request.user.login != 'dependabot[bot]' && '8' || '24' }}
|
|
|
DSH_GATE_CONCURRENCY: '8'
|
|
|
steps:
|
|
|
- uses: actions/checkout@v6
|
|
|
with:
|
|
|
persist-credentials: false
|
|
|
|
|
|
+ - uses: pnpm/action-setup@v4
|
|
|
+
|
|
|
+ - uses: actions/setup-node@v6
|
|
|
+ with:
|
|
|
+ node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
+
|
|
|
+ - name: Configure pnpm store path
|
|
|
+ id: pnpm-store
|
|
|
+ run: |
|
|
|
+ store_root="$HOME/.local/share/pnpm/store"
|
|
|
+ echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
|
|
|
+ store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
|
|
|
+ echo "path=$store_path" >> "$GITHUB_OUTPUT"
|
|
|
+
|
|
|
+ # Skipped under failover: the self-hosted VM's persistent pnpm store
|
|
|
+ # already serves warm installs, while restoring the hosted archive
|
|
|
+ # would spend ~52 s pulling ~180 MB into that populated store.
|
|
|
- uses: actions/cache/restore@v4
|
|
|
+ if: vars.DSH_CI_FAILOVER != 'selfhosted' || github.event.pull_request.user.login == 'dependabot[bot]'
|
|
|
with:
|
|
|
- path: /home/runner/.local/share/pnpm/store/v11
|
|
|
+ path: ${{ steps.pnpm-store.outputs.path }}
|
|
|
key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
|
restore-keys: |
|
|
|
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
|
|
|
|
|
|
- - uses: actions/setup-node@v6
|
|
|
- with:
|
|
|
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
-
|
|
|
- - name: Enable corepack, install dependencies, and prepare bubblewrap
|
|
|
+ - name: Install dependencies and prepare bubblewrap
|
|
|
run: |
|
|
|
- corepack enable
|
|
|
pnpm install --frozen-lockfile &
|
|
|
install_pid=$!
|
|
|
bash scripts/prepare-ci-bubblewrap.sh &
|
|
|
@@ -122,7 +169,11 @@ jobs:
|
|
|
node-24-consumers:
|
|
|
needs: node-24
|
|
|
if: github.event_name == 'pull_request'
|
|
|
- runs-on: dsh-enterprise-ubuntu-latest-32core-test
|
|
|
+ runs-on: >-
|
|
|
+ ${{ vars.DSH_CI_FAILOVER == 'selfhosted'
|
|
|
+ && github.event.pull_request.user.login != 'dependabot[bot]'
|
|
|
+ && fromJSON('["self-hosted", "linux", "x64", "vm-backup"]')
|
|
|
+ || 'dsh-enterprise-ubuntu-latest-32core-test' }}
|
|
|
name: node 24 / snapshots and artifacts
|
|
|
env:
|
|
|
DSH_ESLINT_CACHE: '1'
|
|
|
@@ -130,7 +181,8 @@ jobs:
|
|
|
DSH_GATE_CONCURRENCY: '8'
|
|
|
DSH_NODE_COMPAT_SKIP_TYPECHECK: '1'
|
|
|
DSH_PUBLINT_CONCURRENCY: '8'
|
|
|
- DSH_SNAPSHOT_MAX_CONCURRENCY: '32'
|
|
|
+ # Failover halves snapshot concurrency for the shared 64-core VM.
|
|
|
+ DSH_SNAPSHOT_MAX_CONCURRENCY: ${{ vars.DSH_CI_FAILOVER == 'selfhosted' && github.event.pull_request.user.login != 'dependabot[bot]' && '12' || '32' }}
|
|
|
steps:
|
|
|
- uses: actions/checkout@v6
|
|
|
with:
|
|
|
@@ -144,13 +196,6 @@ jobs:
|
|
|
- name: Restore built tree
|
|
|
run: tar -xzf "$RUNNER_TEMP/node-24-built-tree.tar.gz"
|
|
|
|
|
|
- - uses: actions/cache/restore@v4
|
|
|
- with:
|
|
|
- path: /home/runner/.local/share/pnpm/store/v11
|
|
|
- key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
|
- restore-keys: |
|
|
|
- ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
|
|
|
-
|
|
|
- uses: actions/cache/restore@v4
|
|
|
with:
|
|
|
path: .cache/eslint
|
|
|
@@ -158,13 +203,31 @@ jobs:
|
|
|
restore-keys: |
|
|
|
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-
|
|
|
|
|
|
+ - uses: pnpm/action-setup@v4
|
|
|
+
|
|
|
- uses: actions/setup-node@v6
|
|
|
with:
|
|
|
node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
|
|
|
- - name: Enable corepack, install dependencies, and prepare bubblewrap
|
|
|
+ - name: Configure pnpm store path
|
|
|
+ id: pnpm-store
|
|
|
+ run: |
|
|
|
+ store_root="$HOME/.local/share/pnpm/store"
|
|
|
+ echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
|
|
|
+ store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
|
|
|
+ echo "path=$store_path" >> "$GITHUB_OUTPUT"
|
|
|
+
|
|
|
+ # Skipped under failover — see the coverage lane's identical rationale.
|
|
|
+ - uses: actions/cache/restore@v4
|
|
|
+ if: vars.DSH_CI_FAILOVER != 'selfhosted' || github.event.pull_request.user.login == 'dependabot[bot]'
|
|
|
+ with:
|
|
|
+ path: ${{ steps.pnpm-store.outputs.path }}
|
|
|
+ key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
|
+ restore-keys: |
|
|
|
+ ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
|
|
|
+
|
|
|
+ - name: Install dependencies and prepare bubblewrap
|
|
|
run: |
|
|
|
- corepack enable
|
|
|
pnpm install --frozen-lockfile &
|
|
|
install_pid=$!
|
|
|
bash scripts/prepare-ci-bubblewrap.sh &
|
|
|
@@ -240,22 +303,12 @@ jobs:
|
|
|
steps:
|
|
|
- uses: actions/checkout@v6
|
|
|
|
|
|
+ - uses: pnpm/action-setup@v4
|
|
|
+
|
|
|
- uses: actions/setup-node@v6
|
|
|
with:
|
|
|
node-version: ${{ matrix.node }}
|
|
|
-
|
|
|
- - name: Enable corepack and resolve pnpm store path
|
|
|
- id: pnpm-store
|
|
|
- run: |
|
|
|
- corepack enable
|
|
|
- echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
|
|
-
|
|
|
- - uses: actions/cache@v4
|
|
|
- with:
|
|
|
- path: ${{ steps.pnpm-store.outputs.path }}
|
|
|
- key: ${{ runner.os }}-node-${{ matrix.node }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
|
- restore-keys: |
|
|
|
- ${{ runner.os }}-node-${{ matrix.node }}-pnpm-
|
|
|
+ cache: pnpm
|
|
|
|
|
|
- name: Install (immutable)
|
|
|
run: pnpm install --frozen-lockfile
|
|
|
@@ -286,32 +339,38 @@ jobs:
|
|
|
# Windows Node under Wine on standard hosted Linux. The master
|
|
|
# serial-windows job below keeps the complete native-kernel inventory —
|
|
|
# including the observational portability gates this lane does not run —
|
|
|
- # on real windows-2025. Direct tool entrypoints stand in for pnpm's cmd
|
|
|
- # shims, which a Linux-side install does not create; layout, fidelity
|
|
|
- # limits, and measured timings live in
|
|
|
+ # on real windows-2025. This job only provisions runner state (caches,
|
|
|
+ # apt); scripts/wine-windows-gates.sh owns the gate logic and is the same
|
|
|
+ # script the optional local gate `pnpm run check:windows-wine` runs.
|
|
|
+ # Layout, fidelity limits, and measured timings live in
|
|
|
# .agents/notes/implemented/process/2026-07-27-wine-windows-gates-experiment.md
|
|
|
windows:
|
|
|
if: github.event_name == 'pull_request'
|
|
|
runs-on: ubuntu-latest
|
|
|
name: windows node 24 / wine blocking
|
|
|
timeout-minutes: 15
|
|
|
- env:
|
|
|
- WINEDEBUG: '-all'
|
|
|
- WINEARCH: win64
|
|
|
- # Skip Wine Mono / Gecko installers: Node needs neither.
|
|
|
- WINEDLLOVERRIDES: 'mscoree,mshtml='
|
|
|
steps:
|
|
|
- uses: actions/checkout@v6
|
|
|
with:
|
|
|
persist-credentials: false
|
|
|
|
|
|
+ - uses: pnpm/action-setup@v4
|
|
|
+
|
|
|
- uses: actions/setup-node@v6
|
|
|
with:
|
|
|
node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
|
|
|
+ - name: Configure pnpm store path
|
|
|
+ id: pnpm-store
|
|
|
+ run: |
|
|
|
+ store_root="$HOME/.local/share/pnpm/store"
|
|
|
+ echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
|
|
|
+ store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
|
|
|
+ echo "path=$store_path" >> "$GITHUB_OUTPUT"
|
|
|
+
|
|
|
- uses: actions/cache/restore@v4
|
|
|
with:
|
|
|
- path: /home/runner/.local/share/pnpm/store/v11
|
|
|
+ path: ${{ steps.pnpm-store.outputs.path }}
|
|
|
key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
|
restore-keys: |
|
|
|
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
|
|
|
@@ -328,144 +387,26 @@ jobs:
|
|
|
path: ~/wine-debs
|
|
|
key: ${{ steps.wine-cache-key.outputs.key }}
|
|
|
|
|
|
- - name: Install dependencies and provision Wine concurrently
|
|
|
+ # Runner provisioning only — a developer machine installs Wine through
|
|
|
+ # its own package manager; the gate script assumes a wine binary and
|
|
|
+ # fails loud without one. Wine from the apt cache when present; else
|
|
|
+ # download the full dependency closure once and keep it for the next
|
|
|
+ # run. The `wine` dispatcher package (not bare `wine64`) is what puts a
|
|
|
+ # binary on PATH.
|
|
|
+ - name: Install Wine
|
|
|
run: |
|
|
|
- corepack enable
|
|
|
-
|
|
|
- # Windows-lane install-time overrides. supportedArchitectures
|
|
|
- # additionally materializes the win32-x64 platform packages
|
|
|
- # (@esbuild/win32-x64, rolldown and rollup MSVC bindings) the
|
|
|
- # Windows toolchain resolves at runtime; nodeLinker: hoisted lays
|
|
|
- # node_modules out flat with real files because Windows Node under
|
|
|
- # Wine does not realpath pnpm's isolated-layout symlinks. Neither
|
|
|
- # override is recorded in the lockfile, so --frozen-lockfile stays
|
|
|
- # valid. --ignore-scripts skips Linux lifecycle scripts no gate in
|
|
|
- # this lane loads; the win32 binaries ship prebuilt.
|
|
|
- cat >> pnpm-workspace.yaml <<'EOF'
|
|
|
-
|
|
|
- nodeLinker: hoisted
|
|
|
- supportedArchitectures:
|
|
|
- os: [current, win32]
|
|
|
- cpu: [current, x64]
|
|
|
- EOF
|
|
|
-
|
|
|
- pnpm install --frozen-lockfile --ignore-scripts &
|
|
|
- install_pid=$!
|
|
|
-
|
|
|
- provision_wine() {
|
|
|
- set -euo pipefail
|
|
|
- # Wine from the apt cache when present; else download the full
|
|
|
- # dependency closure once and keep it for the next run. The
|
|
|
- # `wine` dispatcher package (not bare `wine64`) is what puts a
|
|
|
- # binary on PATH.
|
|
|
- if compgen -G "$HOME/wine-debs/*.deb" > /dev/null; then
|
|
|
- sudo apt-get install -y --no-install-recommends "$HOME"/wine-debs/*.deb
|
|
|
- else
|
|
|
- sudo apt-get update
|
|
|
- sudo apt-get install -y --no-install-recommends --download-only wine
|
|
|
- mkdir -p "$HOME/wine-debs"
|
|
|
- cp /var/cache/apt/archives/*.deb "$HOME/wine-debs/" 2>/dev/null || true
|
|
|
- sudo apt-get install -y --no-install-recommends wine
|
|
|
- fi
|
|
|
- WINE_BIN=''
|
|
|
- for candidate in "$(command -v wine || true)" "$(command -v wine64 || true)" /usr/lib/wine/wine64; do
|
|
|
- if [ -n "$candidate" ] && [ -x "$candidate" ]; then WINE_BIN="$candidate"; break; fi
|
|
|
- done
|
|
|
- [ -n "$WINE_BIN" ] || { echo '::error::no wine binary found after install'; exit 1; }
|
|
|
- echo "WINE_BIN=$WINE_BIN" >> "$GITHUB_ENV"
|
|
|
-
|
|
|
- # Windows Node for the repo's primary line, checksum-verified
|
|
|
- # against the same dist directory.
|
|
|
- version=$(curl -fsSL https://nodejs.org/dist/index.json \
|
|
|
- | jq -r --arg p "v${PRIMARY_NODE_VERSION}." '[.[] | select(.version | startswith($p))][0].version')
|
|
|
- echo "Windows Node: $version"
|
|
|
- curl -fsSL -o "$RUNNER_TEMP/node-win.zip" \
|
|
|
- "https://nodejs.org/dist/${version}/node-${version}-win-x64.zip"
|
|
|
- curl -fsSL "https://nodejs.org/dist/${version}/SHASUMS256.txt" \
|
|
|
- | awk -v a="node-${version}-win-x64.zip" '$2 == a { print $1 " '"$RUNNER_TEMP"'/node-win.zip" }' \
|
|
|
- | sha256sum --check -
|
|
|
- unzip -q "$RUNNER_TEMP/node-win.zip" -d "$RUNNER_TEMP/node-win"
|
|
|
- echo "NODE_WIN=$RUNNER_TEMP/node-win/node-${version}-win-x64/node.exe" >> "$GITHUB_ENV"
|
|
|
-
|
|
|
- "$WINE_BIN" wineboot --init || true
|
|
|
- wineserver -w || true
|
|
|
- }
|
|
|
- provision_wine &
|
|
|
- wine_pid=$!
|
|
|
-
|
|
|
- install_status=0
|
|
|
- wait "$install_pid" || install_status=$?
|
|
|
- wine_status=0
|
|
|
- wait "$wine_pid" || wine_status=$?
|
|
|
- if (( install_status != 0 )); then exit "$install_status"; fi
|
|
|
- exit "$wine_status"
|
|
|
-
|
|
|
- - name: Resolve entrypoints, link vue, smoke Windows Node
|
|
|
- run: |
|
|
|
- # Node under Wine cannot attach stdio to the Actions runner's pipes
|
|
|
- # (Socket open EBADF at bootstrap), so every invocation runs through
|
|
|
- # this wrapper: stdio to a regular file, replayed after exit.
|
|
|
- cat > "$RUNNER_TEMP/wine-node.sh" <<'SH'
|
|
|
- #!/usr/bin/env bash
|
|
|
- set -u
|
|
|
- log="$1"; shift
|
|
|
- "$WINE_BIN" "$NODE_WIN" "$@" < /dev/null > "$log" 2>&1
|
|
|
- status=$?
|
|
|
- tail -n 300 "$log"
|
|
|
- exit "$status"
|
|
|
- SH
|
|
|
- chmod +x "$RUNNER_TEMP/wine-node.sh"
|
|
|
-
|
|
|
- resolve() {
|
|
|
- local name="$1"; shift
|
|
|
- for p in "$@"; do
|
|
|
- if [ -f "$p" ]; then echo "$name=$PWD/$p" >> "$GITHUB_ENV"; return 0; fi
|
|
|
- done
|
|
|
- echo "::error::$name not found at any of: $*"; return 1
|
|
|
- }
|
|
|
- resolve TSC_JS node_modules/typescript/bin/tsc
|
|
|
- resolve TSDOWN_JS node_modules/tsdown/dist/run.mjs
|
|
|
- resolve VITEPRESS_JS website/node_modules/vitepress/bin/vitepress.js node_modules/vitepress/bin/vitepress.js
|
|
|
-
|
|
|
- # VitePress links vue into the site's node_modules at build time;
|
|
|
- # Wine cannot CREATE Windows symlinks (ENOTSUP) but follows
|
|
|
- # pre-existing Unix ones, so lay the link down host-side.
|
|
|
- if [ -d node_modules/vue ] && [ ! -e website/node_modules/vue ]; then
|
|
|
- mkdir -p website/node_modules
|
|
|
- ln -s ../../node_modules/vue website/node_modules/vue
|
|
|
+ if compgen -G "$HOME/wine-debs/*.deb" > /dev/null; then
|
|
|
+ sudo apt-get install -y --no-install-recommends "$HOME"/wine-debs/*.deb
|
|
|
+ else
|
|
|
+ sudo apt-get update
|
|
|
+ sudo apt-get install -y --no-install-recommends --download-only wine
|
|
|
+ mkdir -p "$HOME/wine-debs"
|
|
|
+ cp /var/cache/apt/archives/*.deb "$HOME/wine-debs/" 2>/dev/null || true
|
|
|
+ sudo apt-get install -y --no-install-recommends wine
|
|
|
fi
|
|
|
|
|
|
- "$RUNNER_TEMP/wine-node.sh" "$RUNNER_TEMP/smoke.log" -p "'smoke: ' + process.platform + ' ' + process.arch + ' ' + process.version"
|
|
|
-
|
|
|
- # The two blocking surfaces run concurrently, the same shape run-gates
|
|
|
- # gives ci-windows-blocking on native Windows: `build` = tsc -b then
|
|
|
- # tsdown, `production site` = the VitePress build. Both statuses are
|
|
|
- # captured so one failure cannot hide the other's result.
|
|
|
- - name: Run blocking Windows gates concurrently under Wine
|
|
|
- run: |
|
|
|
- build_gate() {
|
|
|
- "$RUNNER_TEMP/wine-node.sh" "$RUNNER_TEMP/tsc.log" "$TSC_JS" -b --pretty false || return $?
|
|
|
- "$RUNNER_TEMP/wine-node.sh" "$RUNNER_TEMP/tsdown.log" "$TSDOWN_JS"
|
|
|
- }
|
|
|
- site_gate() {
|
|
|
- cd website
|
|
|
- "$RUNNER_TEMP/wine-node.sh" "$RUNNER_TEMP/site.log" "$VITEPRESS_JS" build .
|
|
|
- }
|
|
|
- start=$SECONDS
|
|
|
- build_gate > "$RUNNER_TEMP/build-gate.out" 2>&1 &
|
|
|
- build_pid=$!
|
|
|
- site_gate > "$RUNNER_TEMP/site-gate.out" 2>&1 &
|
|
|
- site_pid=$!
|
|
|
- build_status=0
|
|
|
- wait "$build_pid" || build_status=$?
|
|
|
- site_status=0
|
|
|
- wait "$site_pid" || site_status=$?
|
|
|
- echo "== build gate (exit $build_status, $((SECONDS - start))s elapsed) =="
|
|
|
- tail -n 120 "$RUNNER_TEMP/build-gate.out"
|
|
|
- echo "== production site gate (exit $site_status, $((SECONDS - start))s elapsed) =="
|
|
|
- tail -n 120 "$RUNNER_TEMP/site-gate.out"
|
|
|
- if (( build_status != 0 )); then exit "$build_status"; fi
|
|
|
- exit "$site_status"
|
|
|
+ - name: Run the Wine Windows gates
|
|
|
+ run: bash scripts/wine-windows-gates.sh
|
|
|
|
|
|
- name: Shut down wineserver
|
|
|
if: always()
|
|
|
@@ -513,17 +454,26 @@ jobs:
|
|
|
with:
|
|
|
fetch-depth: 2
|
|
|
|
|
|
+ - uses: pnpm/action-setup@v4
|
|
|
+
|
|
|
- uses: actions/setup-node@v6
|
|
|
with:
|
|
|
node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
|
|
|
- - name: Enable corepack and resolve pnpm store path
|
|
|
+ - name: Configure pnpm store path
|
|
|
id: pnpm-store
|
|
|
run: |
|
|
|
- corepack enable
|
|
|
- echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
|
|
+ store_root="$HOME/.local/share/pnpm/store"
|
|
|
+ echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
|
|
|
+ store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
|
|
|
+ echo "path=$store_path" >> "$GITHUB_OUTPUT"
|
|
|
|
|
|
# Master refreshes the caches that pull requests restore without saving.
|
|
|
+ # The store cache stays a hand-rolled actions/cache step rather than
|
|
|
+ # setup-node's `cache: pnpm`: the enterprise pull-request jobs above
|
|
|
+ # restore exactly this key and path, and setup-node's built-in cache
|
|
|
+ # uses its own key format — converting this producer would silently
|
|
|
+ # starve their documented restore-only optimization.
|
|
|
- uses: actions/cache@v4
|
|
|
with:
|
|
|
path: ${{ steps.pnpm-store.outputs.path }}
|
|
|
@@ -555,6 +505,58 @@ jobs:
|
|
|
DSH_SNAPSHOT_MAX_CONCURRENCY: '1'
|
|
|
run: pnpm run check:ci
|
|
|
|
|
|
+ # Hot-standby drill for the in-house self-hosted pool: every master move
|
|
|
+ # re-runs the complete unsharded aggregate on the persistent 64-core VM,
|
|
|
+ # continuously proving that environment can take over a required lane if
|
|
|
+ # the hosted pools degrade (the switch is then setting the writer-manageable
|
|
|
+ # DSH_CI_FAILOVER variable — see the failover runbook, no merge required).
|
|
|
+ # Push-triggered, so this lane always executes the base branch's own
|
|
|
+ # workflow definition. (Under failover, pull_request jobs do reach these
|
|
|
+ # runners with the PR merge ref's workflow — the boundary there is
|
|
|
+ # repository membership: private, forking disabled, Dependabot excluded.)
|
|
|
+ # Non-blocking for
|
|
|
+ # pull requests; no cache steps because the VM's persistent pnpm store and
|
|
|
+ # tool caches make them redundant (and saving here would poison the hosted
|
|
|
+ # cache namespace with self-hosted paths).
|
|
|
+ serial-linux-selfhosted:
|
|
|
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
|
+ name: serial / linux (self-hosted standby)
|
|
|
+ runs-on: [self-hosted, linux, x64, vm-backup]
|
|
|
+ steps:
|
|
|
+ # Full history + DSH_ARCHIVE_BASE_REF below: same frozen-archive
|
|
|
+ # comparison as serial-linux. Depth 2 would miss github.event.before
|
|
|
+ # on multi-commit or force pushes; full fetch is cheap here because
|
|
|
+ # checkout resolves against the VM's local mirror.
|
|
|
+ - uses: actions/checkout@v6
|
|
|
+ with:
|
|
|
+ fetch-depth: 0
|
|
|
+
|
|
|
+ - uses: pnpm/action-setup@v4
|
|
|
+
|
|
|
+ - uses: actions/setup-node@v6
|
|
|
+ with:
|
|
|
+ node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
+
|
|
|
+ - name: Configure persistent pnpm store
|
|
|
+ run: echo "PNPM_CONFIG_STORE_DIR=$HOME/.local/share/pnpm/store" >> "$GITHUB_ENV"
|
|
|
+
|
|
|
+ - name: Install (immutable)
|
|
|
+ run: pnpm install --frozen-lockfile
|
|
|
+
|
|
|
+ - name: Prepare bubblewrap (unrestrict userns)
|
|
|
+ run: bash scripts/prepare-ci-bubblewrap.sh
|
|
|
+
|
|
|
+ - name: Run complete unsharded primary Node CI serially
|
|
|
+ env:
|
|
|
+ DSH_ARCHIVE_BASE_REF: ${{ github.event.before }}
|
|
|
+ DSH_COVERAGE_MAX_WORKERS: '1'
|
|
|
+ DSH_E2E_MAX_WORKERS: '1'
|
|
|
+ DSH_ESLINT_CACHE: '1'
|
|
|
+ DSH_GATE_CONCURRENCY: '1'
|
|
|
+ DSH_PUBLINT_CONCURRENCY: '1'
|
|
|
+ DSH_SNAPSHOT_MAX_CONCURRENCY: '1'
|
|
|
+ run: pnpm run check:ci
|
|
|
+
|
|
|
serial-macos:
|
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
|
name: serial / macos
|
|
|
@@ -562,13 +564,12 @@ jobs:
|
|
|
steps:
|
|
|
- uses: actions/checkout@v6
|
|
|
|
|
|
+ - uses: pnpm/action-setup@v4
|
|
|
+
|
|
|
- uses: actions/setup-node@v6
|
|
|
with:
|
|
|
node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
|
|
|
- - name: Enable corepack (pnpm)
|
|
|
- run: corepack enable
|
|
|
-
|
|
|
- name: Install (immutable)
|
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
|
|
@@ -594,14 +595,12 @@ jobs:
|
|
|
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
|
|
|
/t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
|
|
|
|
|
|
+ - uses: pnpm/action-setup@v4
|
|
|
+
|
|
|
- uses: actions/setup-node@v6
|
|
|
with:
|
|
|
node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
|
|
|
- - name: Enable corepack (pnpm)
|
|
|
- shell: pwsh
|
|
|
- run: corepack enable
|
|
|
-
|
|
|
# Master refreshes the small cache that pull requests restore without
|
|
|
# putting package-store extraction back on the Windows critical path.
|
|
|
- uses: actions/cache@v4
|
|
|
@@ -688,9 +687,14 @@ jobs:
|
|
|
steps:
|
|
|
- uses: actions/checkout@v6
|
|
|
|
|
|
+ - uses: pnpm/action-setup@v4
|
|
|
+
|
|
|
+ # The Windows lanes deliberately skip the store cache like the required
|
|
|
+ # windows job; an empty cache input disables setup-node's caching.
|
|
|
- uses: actions/setup-node@v6
|
|
|
with:
|
|
|
node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
+ cache: ${{ matrix.platform == 'linux' && 'pnpm' || '' }}
|
|
|
|
|
|
- name: Report runner capacity
|
|
|
run: >-
|
|
|
@@ -698,22 +702,6 @@ jobs:
|
|
|
console.log(JSON.stringify({ arch: process.arch, cpus: os.cpus().length,
|
|
|
memoryGiB: Math.round(os.totalmem() / 2 ** 30) }))"
|
|
|
|
|
|
- - name: Enable corepack (pnpm)
|
|
|
- run: corepack enable
|
|
|
-
|
|
|
- - name: Resolve pnpm store path
|
|
|
- if: matrix.platform == 'linux'
|
|
|
- id: pnpm-store
|
|
|
- run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
|
|
-
|
|
|
- - uses: actions/cache@v4
|
|
|
- if: matrix.platform == 'linux'
|
|
|
- with:
|
|
|
- path: ${{ steps.pnpm-store.outputs.path }}
|
|
|
- key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
|
- restore-keys: |
|
|
|
- ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
|
|
|
-
|
|
|
- name: Install (immutable)
|
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
|
|
@@ -788,9 +776,14 @@ jobs:
|
|
|
steps:
|
|
|
- uses: actions/checkout@v6
|
|
|
|
|
|
+ - uses: pnpm/action-setup@v4
|
|
|
+
|
|
|
+ # Unlike the larger-runner suite, both platforms cache the store here:
|
|
|
+ # the consolidated topology measures cache mechanics as workload.
|
|
|
- uses: actions/setup-node@v6
|
|
|
with:
|
|
|
node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
|
|
+ cache: pnpm
|
|
|
|
|
|
- name: Report runner capacity
|
|
|
run: >-
|
|
|
@@ -798,27 +791,6 @@ jobs:
|
|
|
console.log(JSON.stringify({ arch: process.arch, cpus: os.cpus().length,
|
|
|
memoryGiB: Math.round(os.totalmem() / 2 ** 30) }))"
|
|
|
|
|
|
- - name: Enable corepack (pnpm)
|
|
|
- run: corepack enable
|
|
|
-
|
|
|
- - name: Resolve pnpm store path (Linux)
|
|
|
- if: matrix.platform == 'linux'
|
|
|
- id: pnpm-store-linux
|
|
|
- run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
|
|
-
|
|
|
- - name: Resolve pnpm store path (Windows)
|
|
|
- if: matrix.platform == 'windows'
|
|
|
- id: pnpm-store-windows
|
|
|
- shell: pwsh
|
|
|
- run: '"path=$(pnpm store path --silent)" >> $env:GITHUB_OUTPUT'
|
|
|
-
|
|
|
- - uses: actions/cache@v4
|
|
|
- with:
|
|
|
- path: ${{ steps.pnpm-store-linux.outputs.path || steps.pnpm-store-windows.outputs.path }}
|
|
|
- key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
|
- restore-keys: |
|
|
|
- ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
|
|
|
-
|
|
|
- uses: actions/cache@v4
|
|
|
if: matrix.platform == 'linux'
|
|
|
with:
|
|
|
@@ -876,8 +848,16 @@ jobs:
|
|
|
# 'cancelled' and 'skipped'.
|
|
|
all-checks-passed:
|
|
|
name: all checks passed
|
|
|
- # This bookkeeping-only verdict must not depend on custom-pool provisioning.
|
|
|
- runs-on: ubuntu-latest
|
|
|
+ # This bookkeeping-only verdict must not depend on custom-pool
|
|
|
+ # provisioning (master's #734 moved it to ubuntu-latest) — and under
|
|
|
+ # failover it follows the same selector as the worker jobs it
|
|
|
+ # aggregates, so a standard-hosted outage cannot strand the
|
|
|
+ # branch-protection verdict either (observed 2026-07-27).
|
|
|
+ runs-on: >-
|
|
|
+ ${{ vars.DSH_CI_FAILOVER == 'selfhosted'
|
|
|
+ && github.event.pull_request.user.login != 'dependabot[bot]'
|
|
|
+ && fromJSON('["self-hosted", "linux", "x64", "vm-backup"]')
|
|
|
+ || 'ubuntu-latest' }}
|
|
|
needs: [node-24, node-24-coverage, node-24-consumers, node-compat, python-sdk, windows]
|
|
|
if: always() && github.event_name == 'pull_request'
|
|
|
steps:
|