ci: run PR unit shards on free hosted ARM as 12 shards (#34906)

* ci: run PR unit shards on free hosted ARM as 12 shards

Enterprise's 1,000-job limit makes more, smaller shards free. A 12-shard
cold run on ubuntu-24.04-arm measured 361s median / 412s max per shard,
against ~390s / ~441s for five warm Blacksmith 8-vCPU shards.

The Blacksmith-store module cache producer becomes dispatch-only since
hosted shards cannot read it.

* TEMP: force 12 shards on this PR (repo var is still 5); drop before merge

* test: size the full-inventory routing check from FULL_SHARD_COUNT

* Revert TEMP 12-shard override; the repository variable is now 12

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
OrcaWin
2026-10-28 21:10:45 -07:00
committed by GitHub
co-authored by OrcaWin
parent 110c427477
commit 006bbb28e7
11 changed files with 26 additions and 43 deletions
+4 -3
View File
@@ -234,8 +234,8 @@ jobs:
PREFLIGHT_PRIOR_SUCCESS: ${{ job.status == 'success' }}
ORCA_UNIT_SELECTION_MODE: ${{ vars.ORCA_UNIT_SELECTION_MODE || 'shadow' }}
ORCA_PULL_REQUEST_DRAFT: ${{ github.event.pull_request.draft }}
# Five shards use fewer runner minutes; the repository variable can request 2 to 10.
ORCA_UNIT_FULL_SHARD_COUNT: ${{ vars.ORCA_UNIT_FULL_SHARD_COUNT || '5' }}
# Twelve 4-vCPU hosted shards match the old 8-vCPU wall time; the repository variable can request 2 to 16.
ORCA_UNIT_FULL_SHARD_COUNT: ${{ vars.ORCA_UNIT_FULL_SHARD_COUNT || '12' }}
run: |
if [ "$PREFLIGHT_PHASE_SELECTED" != true ] || [ "$PREFLIGHT_PRIOR_SUCCESS" != true ]; then exit 0; fi
node config/scripts/ci-unit-plan.mjs
@@ -896,7 +896,8 @@ jobs:
uses: ./.github/workflows/unit-tests.yml
with:
node_versions: '["24"]'
runner: blacksmith-8vcpu-ubuntu-2404
# Free hosted ARM: 12 shards measured 361s median cold vs ~390s for 5 warm Blacksmith 8-vCPU shards.
runner: ubuntu-24.04-arm
phase_diagnostics: true
# Restore main's transform cache; the `ci:cold-unit-cache` label or ORCA_UNIT_MODULE_CACHE=off forces cold.
module_cache: ${{ (vars.ORCA_UNIT_MODULE_CACHE == 'off' || contains(github.event.pull_request.labels.*.name, 'ci:cold-unit-cache')) && 'off' || 'warm' }}
+2 -22
View File
@@ -1,29 +1,9 @@
name: Unit transform cache producer
# Cold full unit run on main that publishes per-shard Vitest transform caches for PRs.
# Cold full unit run on main that publishes per-shard Vitest transform caches.
# Dispatch only: PR shards run on hosted runners, which cannot read this Blacksmith-store cache.
on:
schedule:
- cron: '17 */6 * * *'
workflow_dispatch:
push:
branches: [main]
# Cache-key inputs (see ci-unit-module-cache.mjs) change the key; reseed right away.
paths:
- '.github/workflows/unit-module-cache.yml'
- '.github/workflows/unit-tests.yml'
- 'config/vitest.config.ts'
- 'config/scripts/vitest*'
- 'config/scripts/ci-unit-module-cache*.mjs'
- 'config/patches/**'
- 'config/scripts/workspace-source-exports.mjs'
- 'config/dark-build-switches.cjs'
- 'config/pnpmfile.cjs'
- '.npmrc'
- '**/package.json'
- '**/tsconfig*.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'config/.bun-version'
concurrency:
group: unit-module-cache-${{ github.ref }}
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
ORCA_UNIT_SELECTION_MODE: ${{ inputs.selection_mode }}
ORCA_PULL_REQUEST_DRAFT: ${{ github.event.pull_request.draft }}
# Same count as PR preflight so transform cache shard keys line up.
ORCA_UNIT_FULL_SHARD_COUNT: ${{ vars.ORCA_UNIT_FULL_SHARD_COUNT || '5' }}
ORCA_UNIT_FULL_SHARD_COUNT: ${{ vars.ORCA_UNIT_FULL_SHARD_COUNT || '12' }}
run: node config/scripts/ci-unit-plan.mjs
- uses: actions/upload-artifact@v7
continue-on-error: true