ci: move PR analysis and Linux unit tests to Blacksmith (#29362)

* ci: report final PR checks outside the shared runner queue

* ci: fix inherited mobile test file size failure

* ci: move PR analysis and ARM test shards to Blacksmith

* Qualify x64 Blacksmith capacity and reject incompatible runner images early

* Keep extracted mobile test adapters within the test-only lint scope

* Identify the runner profile overriding shell fixture homes

* Preserve fixture HOME through the Blacksmith login profile

* Make cache invalidation fixtures observable within one filesystem clock tick

* Scope Blacksmith system-profile preparation to Linux runners

* Wait for observable ctime in daemon hash cache fixtures

* Use the mobile test lint scope already merged on main

* Stabilize metadata and timer fixtures on fast CI runners

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
Neil
2026-10-15 21:07:49 -07:00
committed by GitHub
co-authored by OrcaWin
parent f152101010
commit 7909e72d2d
12 changed files with 114 additions and 30 deletions
@@ -7,12 +7,16 @@ permissions:
contents: read
jobs:
warm-linux-arm:
warm-linux-runtime:
if: github.event_name != 'pull_request'
concurrency:
group: ci-cache-warmup-linux-arm-${{ github.event.pull_request.number || github.ref }}
group: ci-cache-warmup-linux-runtime-${{ matrix.runner }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name != 'schedule' }}
runs-on: ubuntu-24.04-arm
strategy:
fail-fast: false
matrix:
runner: [ubuntu-24.04-arm, blacksmith-4vcpu-ubuntu-2404]
runs-on: ${{ matrix.runner }}
timeout-minutes: 10
env:
ORCA_BACKGROUND_LAUNCH: '1'
+5 -8
View File
@@ -25,8 +25,8 @@ jobs:
# inputs are unchanged; empty diffs fail closed and run everything.
code_paths:
name: detect changes and check repository guards
# Reuse one lightweight checkout for detection and the always-required guards.
runs-on: ubuntu-slim
# Start routing without waiting behind the GitHub-hosted test queue.
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 5
permissions:
contents: read
@@ -175,11 +175,8 @@ jobs:
name: static analysis and typecheck
needs: [code_paths]
if: needs.code_paths.outputs.static_analysis == 'true' || needs.code_paths.outputs.typecheck == 'true'
# Why ARM: measured 128s against 172s on ubuntu-latest, with every compute step faster --
# type-aware 24s->15s, anti-slop 28->19s, localization extraction 67->46s, the orcad smoke
# 39->14s. Both lint engines ship linux-arm64 and the Bun target follows process.arch, so
# the whole toolchain resolves. Free for public repositories.
runs-on: ubuntu-24.04-arm
# Leave headroom for typechecking and overlapping checks.
runs-on: blacksmith-8vcpu-ubuntu-2404
outputs:
shards: ${{ steps.unit-plan.outputs.shards }}
managed_hook_node18: ${{ steps.managed_hook_node18.outcome }}
@@ -896,7 +893,7 @@ jobs:
uses: ./.github/workflows/unit-tests.yml
with:
node_versions: '["24"]'
runner: ubuntu-24.04-arm
runner: blacksmith-4vcpu-ubuntu-2404
shards: ${{ needs.preflight.outputs.shards }}
run_shards: ${{ needs.code_paths.outputs.mobile_ci_tools != 'true' }}
browser_contract: ${{ needs.code_paths.outputs.orcad_browser == 'true' }}
+31 -1
View File
@@ -91,6 +91,36 @@ jobs:
- name: Install Electron package binary for tests
run: node config/scripts/install-electron-package-binary.mjs
# The image resets HOME during login; shell fixtures intentionally use temporary homes.
- name: Preserve explicit login-shell homes on Blacksmith
if: runner.os == 'Linux' && startsWith(inputs.runner, 'blacksmith-')
run: |
sudo python3 - <<'PYTHON'
from pathlib import Path
profile = Path('/etc/profile.d/blacksmith.sh')
if profile.exists():
original = profile.read_text()
updated = original.replace('export HOME="$RUNNER_HOME"', 'export HOME="${HOME:-$RUNNER_HOME}"')
if updated != original:
profile.write_text(updated)
PYTHON
- name: Verify Blacksmith unit runner environment
if: runner.os == 'Linux' && startsWith(inputs.runner, 'blacksmith-')
run: |
ELECTRON_RUN_AS_NODE=1 "$(node -p "require('electron')")" --version
fixture_home="$(mktemp -d)"
trap 'rm -rf "$fixture_home"' EXIT
printf 'export ORCA_CI_PROFILE_LOADED=1\n' > "$fixture_home/.bash_profile"
HOME="$fixture_home" ORCA_CI_FIXTURE_HOME="$fixture_home" /bin/bash -lc '
test "$HOME" = "$ORCA_CI_FIXTURE_HOME" && test "$ORCA_CI_PROFILE_LOADED" = 1
' || {
echo '::error::Runner login profile overrides fixture HOME'
grep -nH 'HOME' /etc/profile /etc/profile.d/*.sh || true
HOME="$fixture_home" /bin/bash -lc 'printf "Observed HOME=%s\n" "$HOME"'
exit 1
}
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version-file: config/.bun-version
@@ -145,7 +175,7 @@ jobs:
export ORCA_SHARD_SOURCE_SHA
node config/scripts/run-vitest.mjs run --config config/vitest.config.ts \
--shard=${{ matrix.shard.index }}/${{ matrix.shard.count }} \
${{ inputs.runner == 'ubuntu-24.04-arm' && '--maxWorkers=4' || '' }}
${{ (runner.arch == 'ARM64' || inputs.runner == 'blacksmith-4vcpu-ubuntu-2404') && '--maxWorkers=4' || '' }}
- name: Seal unit module cache
id: module-cache-seal