ci.yml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. name: CI
  2. on:
  3. push:
  4. branches: [master]
  5. pull_request:
  6. workflow_dispatch:
  7. inputs:
  8. suite:
  9. description: Manual CI suite to run
  10. required: true
  11. default: larger-runner-benchmark
  12. type: choice
  13. options:
  14. - larger-runner-benchmark
  15. - consolidated-runner-benchmark
  16. concurrency:
  17. group: ${{ github.workflow }}-${{ github.ref }}
  18. cancel-in-progress: true
  19. permissions:
  20. contents: read
  21. env:
  22. PRIMARY_NODE_VERSION: '24'
  23. jobs:
  24. # Two enterprise runners split the two longest primary Node paths. The
  25. # static lane starts snapshot and artifact validation as soon as its build
  26. # completes, while exhaustive coverage runs alone on the other runner.
  27. node-24:
  28. if: github.event_name == 'pull_request'
  29. runs-on: ${{ matrix.runner }}
  30. name: ${{ matrix.name }}
  31. env:
  32. DSH_COVERAGE_MAX_WORKERS: '16'
  33. DSH_ESLINT_CACHE: '1'
  34. DSH_ESLINT_CONCURRENCY: '8'
  35. DSH_GATE_CONCURRENCY: '8'
  36. DSH_NODE_COMPAT_SKIP_TYPECHECK: '1'
  37. DSH_PUBLINT_CONCURRENCY: '8'
  38. DSH_SNAPSHOT_MAX_CONCURRENCY: '16'
  39. strategy:
  40. fail-fast: false
  41. matrix:
  42. include:
  43. - lane: static-snapshots-artifacts
  44. name: node 24 / static, snapshots, and artifacts
  45. runner: dsh-enterprise-ubuntu-latest-32core-test
  46. - lane: coverage
  47. name: node 24 / coverage
  48. runner: dsh-enterprise-ubuntu-24-04-32core-test
  49. steps:
  50. - uses: actions/checkout@v6
  51. with:
  52. persist-credentials: false
  53. # Pull requests consume the default-branch cache but do not put cache
  54. # compression and upload on the paid latency-critical path.
  55. - uses: actions/cache/restore@v4
  56. with:
  57. path: /home/runner/.local/share/pnpm/store/v11
  58. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
  59. restore-keys: |
  60. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
  61. - uses: actions/setup-node@v6
  62. with:
  63. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  64. - name: Enable corepack, install dependencies, and prepare bubblewrap
  65. run: |
  66. corepack enable
  67. pnpm install --frozen-lockfile &
  68. install_pid=$!
  69. bash scripts/prepare-ci-bubblewrap.sh &
  70. sandbox_pid=$!
  71. install_status=0
  72. wait "$install_pid" || install_status=$?
  73. sandbox_status=0
  74. wait "$sandbox_pid" || sandbox_status=$?
  75. if (( install_status != 0 )); then exit "$install_status"; fi
  76. exit "$sandbox_status"
  77. - name: Run static, compatibility, snapshot, and artifact gates
  78. if: matrix.lane == 'static-snapshots-artifacts'
  79. run: |
  80. static_log="$RUNNER_TEMP/static-gates.log"
  81. : > "$static_log"
  82. pnpm run check:ci:static > >(tee "$static_log") 2>&1 &
  83. static_pid=$!
  84. pnpm run check:ci:lint &
  85. lint_pid=$!
  86. pnpm run check:node-compat &
  87. compat_pid=$!
  88. until grep -Fq 'run-gates: PASS build ' "$static_log"; do
  89. if ! kill -0 "$static_pid" 2>/dev/null; then
  90. static_status=0
  91. wait "$static_pid" || static_status=$?
  92. if grep -Fq 'run-gates: PASS build ' "$static_log"; then break; fi
  93. if (( static_status != 0 )); then exit "$static_status"; fi
  94. echo '::error::Static gates exited without completing the build.'
  95. exit 1
  96. fi
  97. sleep 0.2
  98. done
  99. DSH_EXAMPLE_MODE=lib pnpm run test:snapshot &
  100. snapshot_pid=$!
  101. pnpm run publint &
  102. publint_pid=$!
  103. pnpm run verify-node-next-types &
  104. node_next_pid=$!
  105. pnpm run verify-built-package-invariants &
  106. built_invariants_pid=$!
  107. DSH_EXAMPLE_MODE=lib pnpm exec vitest run --config vitest.e2e.config.ts \
  108. examples/headless-agent/tests/keyless-smoke.e2e.ts \
  109. examples/tui-agent/tests/tui-keyless-smoke.e2e.ts \
  110. packages/examples/cli-demo/tests/built-bin.e2e.ts \
  111. packages/examples/acp-demo/tests/built-bin.e2e.ts \
  112. packages/ui/jsonrpc/tests/built-scope-carrier.e2e.ts \
  113. packages/workflow/workflow-workerthread/tests/built-worker.e2e.ts \
  114. packages/code-runtime/code-runtime-worker/tests/built-lib.e2e.ts &
  115. built_bin_pid=$!
  116. final_status=0
  117. capture_status() {
  118. local child_status=0
  119. wait "$1" || child_status=$?
  120. if (( final_status == 0 && child_status != 0 )); then
  121. final_status=$child_status
  122. fi
  123. }
  124. for child_pid in \
  125. "$static_pid" "$lint_pid" "$compat_pid" "$snapshot_pid" \
  126. "$publint_pid" "$node_next_pid" "$built_invariants_pid" "$built_bin_pid"
  127. do
  128. capture_status "$child_pid"
  129. done
  130. exit "$final_status"
  131. - name: Run exhaustive coverage
  132. if: matrix.lane == 'coverage'
  133. run: pnpm run check:ci:coverage
  134. node-compat:
  135. if: github.event_name == 'pull_request'
  136. # Each compatibility contract receives an independent standard hosted job.
  137. runs-on: ${{ matrix.runner }}
  138. name: ${{ matrix.name }}
  139. env:
  140. DSH_GATE_CONCURRENCY: ${{ matrix.gate_concurrency }}
  141. DSH_NODE_COMPAT_SKIP_TYPECHECK: '1'
  142. strategy:
  143. fail-fast: false
  144. matrix:
  145. include:
  146. - node: '22.19'
  147. name: node 22.19
  148. runner: ubuntu-latest
  149. gate_concurrency: '1'
  150. - node: 26
  151. name: node 26
  152. runner: ubuntu-latest
  153. gate_concurrency: '1'
  154. steps:
  155. - uses: actions/checkout@v6
  156. - uses: actions/setup-node@v6
  157. with:
  158. node-version: ${{ matrix.node }}
  159. - name: Enable corepack and resolve pnpm store path
  160. id: pnpm-store
  161. run: |
  162. corepack enable
  163. echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
  164. - uses: actions/cache@v4
  165. with:
  166. path: ${{ steps.pnpm-store.outputs.path }}
  167. key: ${{ runner.os }}-node-${{ matrix.node }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
  168. restore-keys: |
  169. ${{ runner.os }}-node-${{ matrix.node }}-pnpm-
  170. - name: Install (immutable)
  171. run: pnpm install --frozen-lockfile
  172. - name: Run compatibility smokes
  173. run: pnpm run check:node-compat
  174. python-sdk:
  175. if: github.event_name == 'pull_request'
  176. runs-on: ubuntu-latest
  177. name: python 3.10 / keyless SDK
  178. steps:
  179. - uses: actions/checkout@v6
  180. - uses: actions/setup-python@v6
  181. with:
  182. python-version: '3.10'
  183. cache: pip
  184. - name: Install uv
  185. run: python -m pip install uv==0.11.23
  186. - name: Run complete keyless Python suite
  187. run: uv run --python 3.10 --group test --project python/sdk pytest
  188. # One Windows box shares setup across the required build/site checks and the
  189. # complete observational portability inventory. run-gates reports failures
  190. # from observational gates without allowing them to fail the required job.
  191. windows:
  192. if: github.event_name == 'pull_request'
  193. runs-on: dsh-enterprise-windows-2025-32core-test
  194. name: windows node 24 / complete
  195. env:
  196. DSH_COVERAGE_MAX_WORKERS: '12'
  197. DSH_ESLINT_CACHE: '1'
  198. DSH_ESLINT_CONCURRENCY: '32'
  199. DSH_GATE_CONCURRENCY: '16'
  200. DSH_PUBLINT_CONCURRENCY: '16'
  201. steps:
  202. - uses: actions/checkout@v6
  203. - uses: actions/cache/restore@v4
  204. with:
  205. path: .cache/eslint
  206. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-${{ hashFiles('pnpm-lock.yaml', 'eslint.config.mjs', 'tsconfig.json', 'tsconfig.base.json', 'tsconfig.base.client.json', 'tsconfig.host.json', 'tsconfig.client.json', 'packages/*/*/tsconfig.json', 'examples/*/tsconfig.json') }}
  207. restore-keys: |
  208. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-
  209. - name: Enable Developer Mode (symlink support)
  210. shell: pwsh
  211. run: >-
  212. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
  213. /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
  214. - uses: actions/setup-node@v6
  215. with:
  216. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  217. # Extracting the many-file pnpm store cache is slower than a clean install,
  218. # and saving it adds more latency after gates.
  219. - name: Enable corepack and install (immutable)
  220. shell: pwsh
  221. run: |
  222. corepack enable
  223. pnpm install --frozen-lockfile
  224. - name: Run blocking and observational Windows gates concurrently
  225. shell: pwsh
  226. run: pnpm run check:ci:windows-complete
  227. # Master pushes run only the serial reference jobs below.
  228. # Each host executes the complete, unsharded primary Node aggregate with one
  229. # gate worker, giving reviewers a simple cross-platform oracle for completeness
  230. # and timing.
  231. serial-linux:
  232. if: github.event_name == 'push' && github.ref == 'refs/heads/master'
  233. name: serial / linux
  234. runs-on: ubuntu-latest
  235. steps:
  236. - uses: actions/checkout@v6
  237. - uses: actions/setup-node@v6
  238. with:
  239. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  240. - name: Enable corepack and resolve pnpm store path
  241. id: pnpm-store
  242. run: |
  243. corepack enable
  244. echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
  245. # Master refreshes the caches that pull requests restore without saving.
  246. - uses: actions/cache@v4
  247. with:
  248. path: ${{ steps.pnpm-store.outputs.path }}
  249. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
  250. restore-keys: |
  251. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
  252. - uses: actions/cache@v4
  253. with:
  254. path: .cache/eslint
  255. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-${{ hashFiles('pnpm-lock.yaml', 'eslint.config.mjs', 'tsconfig.json', 'tsconfig.base.json', 'tsconfig.base.client.json', 'tsconfig.host.json', 'tsconfig.client.json', 'packages/*/*/tsconfig.json', 'examples/*/tsconfig.json') }}
  256. restore-keys: |
  257. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-
  258. - name: Install (immutable)
  259. run: pnpm install --frozen-lockfile
  260. - name: Prepare bubblewrap (unrestrict userns)
  261. run: bash scripts/prepare-ci-bubblewrap.sh
  262. - name: Run complete unsharded primary Node CI serially
  263. env:
  264. DSH_COVERAGE_MAX_WORKERS: '1'
  265. DSH_E2E_MAX_WORKERS: '1'
  266. DSH_ESLINT_CACHE: '1'
  267. DSH_GATE_CONCURRENCY: '1'
  268. DSH_PUBLINT_CONCURRENCY: '1'
  269. DSH_SNAPSHOT_MAX_CONCURRENCY: '1'
  270. run: pnpm run check:ci
  271. serial-macos:
  272. if: github.event_name == 'push' && github.ref == 'refs/heads/master'
  273. name: serial / macos
  274. runs-on: macos-latest
  275. steps:
  276. - uses: actions/checkout@v6
  277. - uses: actions/setup-node@v6
  278. with:
  279. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  280. - name: Enable corepack (pnpm)
  281. run: corepack enable
  282. - name: Install (immutable)
  283. run: pnpm install --frozen-lockfile
  284. - name: Run complete unsharded primary Node CI serially
  285. env:
  286. DSH_COVERAGE_MAX_WORKERS: '1'
  287. DSH_E2E_MAX_WORKERS: '1'
  288. DSH_GATE_CONCURRENCY: '1'
  289. DSH_PUBLINT_CONCURRENCY: '1'
  290. DSH_SNAPSHOT_MAX_CONCURRENCY: '1'
  291. run: pnpm run check:ci
  292. serial-windows:
  293. if: github.event_name == 'push' && github.ref == 'refs/heads/master'
  294. name: serial / windows
  295. runs-on: windows-2025
  296. steps:
  297. - uses: actions/checkout@v6
  298. - name: Enable Developer Mode (symlink support)
  299. shell: pwsh
  300. run: >-
  301. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
  302. /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
  303. - uses: actions/setup-node@v6
  304. with:
  305. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  306. - name: Enable corepack (pnpm)
  307. shell: pwsh
  308. run: corepack enable
  309. # Master refreshes the small cache that pull requests restore without
  310. # putting package-store extraction back on the Windows critical path.
  311. - uses: actions/cache@v4
  312. with:
  313. path: .cache/eslint
  314. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-${{ hashFiles('pnpm-lock.yaml', 'eslint.config.mjs', 'tsconfig.json', 'tsconfig.base.json', 'tsconfig.base.client.json', 'tsconfig.host.json', 'tsconfig.client.json', 'packages/*/*/tsconfig.json', 'examples/*/tsconfig.json') }}
  315. restore-keys: |
  316. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-
  317. - name: Install (immutable)
  318. shell: pwsh
  319. run: pnpm install --frozen-lockfile
  320. - name: Run complete unsharded primary Node CI serially
  321. shell: pwsh
  322. env:
  323. DSH_COVERAGE_MAX_WORKERS: '1'
  324. DSH_E2E_MAX_WORKERS: '1'
  325. DSH_ESLINT_CACHE: '1'
  326. DSH_GATE_CONCURRENCY: '1'
  327. DSH_PUBLINT_CONCURRENCY: '1'
  328. DSH_SNAPSHOT_MAX_CONCURRENCY: '1'
  329. run: pnpm run check:ci
  330. # Manual, bounded comparison of the actual critical Linux and Windows lanes.
  331. # The named pools are restricted at the organization level to this repository.
  332. larger-runner-benchmark:
  333. if: github.event_name == 'workflow_dispatch' && inputs.suite == 'larger-runner-benchmark'
  334. runs-on: ${{ matrix.runner }}
  335. timeout-minutes: 15
  336. strategy:
  337. fail-fast: false
  338. max-parallel: 12
  339. matrix:
  340. include:
  341. - platform: linux
  342. cores: '4'
  343. runner: dsh-ubuntu-24-04-4core
  344. workload: typecheck
  345. - platform: linux
  346. cores: '8'
  347. runner: dsh-ubuntu-24-04-8core
  348. workload: typecheck
  349. - platform: linux
  350. cores: '16'
  351. runner: dsh-ubuntu-24-04-16core
  352. workload: typecheck
  353. - platform: linux
  354. cores: '32'
  355. runner: dsh-ubuntu-24-04-32core
  356. workload: typecheck
  357. - platform: linux
  358. cores: '64'
  359. runner: dsh-ubuntu-24-04-64core
  360. workload: typecheck
  361. - platform: linux
  362. cores: '96'
  363. runner: dsh-ubuntu-24-04-96core
  364. workload: typecheck
  365. - platform: windows
  366. cores: '4'
  367. runner: dsh-windows-2025-4core
  368. workload: production-site
  369. - platform: windows
  370. cores: '8'
  371. runner: dsh-windows-2025-8core
  372. workload: production-site
  373. - platform: windows
  374. cores: '16'
  375. runner: dsh-windows-2025-16core
  376. workload: production-site
  377. - platform: windows
  378. cores: '32'
  379. runner: dsh-windows-2025-32core
  380. workload: production-site
  381. - platform: windows
  382. cores: '64'
  383. runner: dsh-windows-2025-64core
  384. workload: production-site
  385. - platform: windows
  386. cores: '96'
  387. runner: dsh-windows-2025-96core
  388. workload: production-site
  389. steps:
  390. - uses: actions/checkout@v6
  391. - uses: actions/setup-node@v6
  392. with:
  393. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  394. - name: Report runner capacity
  395. run: >-
  396. node -e "const os = require('node:os');
  397. console.log(JSON.stringify({ arch: process.arch, cpus: os.cpus().length,
  398. memoryGiB: Math.round(os.totalmem() / 2 ** 30) }))"
  399. - name: Enable corepack (pnpm)
  400. run: corepack enable
  401. - name: Resolve pnpm store path
  402. if: matrix.platform == 'linux'
  403. id: pnpm-store
  404. run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
  405. - uses: actions/cache@v4
  406. if: matrix.platform == 'linux'
  407. with:
  408. path: ${{ steps.pnpm-store.outputs.path }}
  409. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
  410. restore-keys: |
  411. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
  412. - name: Install (immutable)
  413. run: pnpm install --frozen-lockfile
  414. - name: Run critical Linux typecheck lane
  415. if: matrix.platform == 'linux'
  416. run: pnpm run typecheck
  417. - name: Run critical Windows production-site lane
  418. if: matrix.platform == 'windows'
  419. run: pnpm run docs:build
  420. # Manual comparison of the intended low-fanout topology. Linux runs the
  421. # complete unsharded primary aggregate with bounded in-runner parallelism;
  422. # Windows runs both blocking build surfaces concurrently through run-gates.
  423. consolidated-runner-benchmark:
  424. if: github.event_name == 'workflow_dispatch' && inputs.suite == 'consolidated-runner-benchmark'
  425. runs-on: ${{ matrix.runner }}
  426. timeout-minutes: 15
  427. strategy:
  428. fail-fast: false
  429. max-parallel: 12
  430. matrix:
  431. include:
  432. - platform: linux
  433. cores: '4'
  434. runner: dsh-ubuntu-24-04-4core
  435. workers: '4'
  436. - platform: linux
  437. cores: '8'
  438. runner: dsh-ubuntu-24-04-8core
  439. workers: '8'
  440. - platform: linux
  441. cores: '16'
  442. runner: dsh-ubuntu-24-04-16core
  443. workers: '16'
  444. - platform: linux
  445. cores: '32'
  446. runner: dsh-ubuntu-24-04-32core
  447. workers: '32'
  448. - platform: linux
  449. cores: '64'
  450. runner: dsh-ubuntu-24-04-64core
  451. workers: '32'
  452. - platform: linux
  453. cores: '96'
  454. runner: dsh-ubuntu-24-04-96core
  455. workers: '32'
  456. - platform: windows
  457. cores: '4'
  458. runner: dsh-windows-2025-4core
  459. workers: '2'
  460. - platform: windows
  461. cores: '8'
  462. runner: dsh-windows-2025-8core
  463. workers: '2'
  464. - platform: windows
  465. cores: '16'
  466. runner: dsh-windows-2025-16core
  467. workers: '2'
  468. - platform: windows
  469. cores: '32'
  470. runner: dsh-windows-2025-32core
  471. workers: '2'
  472. - platform: windows
  473. cores: '64'
  474. runner: dsh-windows-2025-64core
  475. workers: '2'
  476. - platform: windows
  477. cores: '96'
  478. runner: dsh-windows-2025-96core
  479. workers: '2'
  480. steps:
  481. - uses: actions/checkout@v6
  482. - uses: actions/setup-node@v6
  483. with:
  484. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  485. - name: Report runner capacity
  486. run: >-
  487. node -e "const os = require('node:os');
  488. console.log(JSON.stringify({ arch: process.arch, cpus: os.cpus().length,
  489. memoryGiB: Math.round(os.totalmem() / 2 ** 30) }))"
  490. - name: Enable corepack (pnpm)
  491. run: corepack enable
  492. - name: Resolve pnpm store path (Linux)
  493. if: matrix.platform == 'linux'
  494. id: pnpm-store-linux
  495. run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
  496. - name: Resolve pnpm store path (Windows)
  497. if: matrix.platform == 'windows'
  498. id: pnpm-store-windows
  499. shell: pwsh
  500. run: '"path=$(pnpm store path --silent)" >> $env:GITHUB_OUTPUT'
  501. - uses: actions/cache@v4
  502. with:
  503. path: ${{ steps.pnpm-store-linux.outputs.path || steps.pnpm-store-windows.outputs.path }}
  504. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
  505. restore-keys: |
  506. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
  507. - uses: actions/cache@v4
  508. if: matrix.platform == 'linux'
  509. with:
  510. path: .cache/eslint
  511. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-${{ hashFiles('pnpm-lock.yaml', 'eslint.config.mjs', 'tsconfig.json', 'tsconfig.base.json', 'tsconfig.base.client.json', 'tsconfig.host.json', 'tsconfig.client.json', 'packages/*/*/tsconfig.json', 'examples/*/tsconfig.json') }}
  512. restore-keys: |
  513. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-
  514. - name: Install and prepare Linux
  515. if: matrix.platform == 'linux'
  516. run: |
  517. pnpm install --frozen-lockfile &
  518. install_pid=$!
  519. bash scripts/prepare-ci-bubblewrap.sh &
  520. sandbox_pid=$!
  521. install_status=0
  522. wait "$install_pid" || install_status=$?
  523. sandbox_status=0
  524. wait "$sandbox_pid" || sandbox_status=$?
  525. if (( install_status != 0 )); then exit "$install_status"; fi
  526. exit "$sandbox_status"
  527. - name: Install (immutable)
  528. if: matrix.platform == 'windows'
  529. shell: pwsh
  530. run: pnpm install --frozen-lockfile
  531. - name: Run complete unsharded primary Node CI concurrently
  532. if: matrix.platform == 'linux'
  533. env:
  534. DSH_COVERAGE_MAX_WORKERS: ${{ matrix.workers }}
  535. DSH_ESLINT_CACHE: '1'
  536. DSH_ESLINT_CONCURRENCY: ${{ matrix.workers }}
  537. DSH_GATE_CONCURRENCY: ${{ matrix.workers }}
  538. DSH_PUBLINT_CONCURRENCY: ${{ matrix.workers }}
  539. DSH_SNAPSHOT_MAX_CONCURRENCY: ${{ matrix.workers }}
  540. run: pnpm run check:ci
  541. - name: Run blocking Windows builds concurrently
  542. if: matrix.platform == 'windows'
  543. shell: pwsh
  544. env:
  545. DSH_GATE_CONCURRENCY: ${{ matrix.workers }}
  546. run: pnpm run check:ci:windows-blocking
  547. # Single stable required check for branch protection: require "all checks
  548. # passed" instead of enumerating matrix legs whose names change as lanes and
  549. # node versions evolve. Every blocking job in THIS workflow must be listed in
  550. # `needs`; observational Windows gates share the required Windows job but are
  551. # marked non-blocking inside run-gates. (`needs` cannot reach across workflow
  552. # files; e2e.yml stays its own check.)
  553. # `if: always()` is load-bearing: without it a failed dependency
  554. # would SKIP this job, and GitHub counts a skipped required check as passing
  555. # — so this job always runs and fails on any non-success result, including
  556. # 'cancelled' and 'skipped'.
  557. all-checks-passed:
  558. name: all checks passed
  559. runs-on: ubuntu-latest
  560. needs: [node-24, node-compat, python-sdk, windows]
  561. if: always() && github.event_name == 'pull_request'
  562. steps:
  563. - name: Fail if any needed job did not succeed
  564. if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')
  565. run: |
  566. echo "::error::Needed job results: ${{ join(needs.*.result, ', ') }}"
  567. exit 1
  568. - name: All checks passed
  569. run: echo "All needed jobs succeeded (${{ join(needs.*.result, ', ') }})"