ci.yml 25 KB

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