ci.yml 23 KB

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