ci: rebalance enterprise critical paths
This commit is contained in:
104
.github/workflows/ci.yml
vendored
104
.github/workflows/ci.yml
vendored
@@ -28,29 +28,29 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
# Two enterprise runners split the two longest primary Node paths. The
|
# Two enterprise runners split the two longest primary Node paths. The
|
||||||
# static lane produces the built tree before artifact validation, while the
|
# static lane starts snapshot and artifact validation as soon as its build
|
||||||
# independent coverage and snapshot paths overlap on the other runner.
|
# completes, while exhaustive coverage runs alone on the other runner.
|
||||||
node-24:
|
node-24:
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
name: ${{ matrix.name }}
|
name: ${{ matrix.name }}
|
||||||
env:
|
env:
|
||||||
DSH_COVERAGE_MAX_WORKERS: '8'
|
DSH_COVERAGE_MAX_WORKERS: '16'
|
||||||
DSH_ESLINT_CACHE: '1'
|
DSH_ESLINT_CACHE: '1'
|
||||||
DSH_ESLINT_CONCURRENCY: '8'
|
DSH_ESLINT_CONCURRENCY: '8'
|
||||||
DSH_GATE_CONCURRENCY: '8'
|
DSH_GATE_CONCURRENCY: '8'
|
||||||
DSH_NODE_COMPAT_SKIP_TYPECHECK: '1'
|
DSH_NODE_COMPAT_SKIP_TYPECHECK: '1'
|
||||||
DSH_PUBLINT_CONCURRENCY: '8'
|
DSH_PUBLINT_CONCURRENCY: '8'
|
||||||
DSH_SNAPSHOT_MAX_CONCURRENCY: '8'
|
DSH_SNAPSHOT_MAX_CONCURRENCY: '16'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- lane: static-artifacts
|
- lane: static-snapshots-artifacts
|
||||||
name: node 24 / static and artifacts
|
name: node 24 / static, snapshots, and artifacts
|
||||||
runner: dsh-enterprise-ubuntu-latest-32core-test
|
runner: dsh-enterprise-ubuntu-latest-32core-test
|
||||||
- lane: coverage-snapshots
|
- lane: coverage
|
||||||
name: node 24 / coverage and snapshots
|
name: node 24 / coverage
|
||||||
runner: dsh-enterprise-ubuntu-24-04-32core-test
|
runner: dsh-enterprise-ubuntu-24-04-32core-test
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
@@ -66,14 +66,6 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
|
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
|
||||||
|
|
||||||
- uses: actions/cache/restore@v4
|
|
||||||
if: matrix.lane == 'static-artifacts'
|
|
||||||
with:
|
|
||||||
path: .cache/eslint
|
|
||||||
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') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v6
|
- uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
node-version: ${{ env.PRIMARY_NODE_VERSION }}
|
||||||
@@ -92,42 +84,67 @@ jobs:
|
|||||||
if (( install_status != 0 )); then exit "$install_status"; fi
|
if (( install_status != 0 )); then exit "$install_status"; fi
|
||||||
exit "$sandbox_status"
|
exit "$sandbox_status"
|
||||||
|
|
||||||
- name: Run static, lint, and Node 24 compatibility gates concurrently
|
- name: Run static, compatibility, snapshot, and artifact gates
|
||||||
if: matrix.lane == 'static-artifacts'
|
if: matrix.lane == 'static-snapshots-artifacts'
|
||||||
run: |
|
run: |
|
||||||
static_status=0
|
static_log="$RUNNER_TEMP/static-gates.log"
|
||||||
lint_status=0
|
: > "$static_log"
|
||||||
compat_status=0
|
pnpm run check:ci:static > >(tee "$static_log") 2>&1 &
|
||||||
pnpm run check:ci:static &
|
|
||||||
static_pid=$!
|
static_pid=$!
|
||||||
pnpm run check:ci:lint &
|
pnpm run check:ci:lint &
|
||||||
lint_pid=$!
|
lint_pid=$!
|
||||||
pnpm run check:node-compat &
|
pnpm run check:node-compat &
|
||||||
compat_pid=$!
|
compat_pid=$!
|
||||||
wait "$static_pid" || static_status=$?
|
|
||||||
wait "$lint_pid" || lint_status=$?
|
|
||||||
wait "$compat_pid" || compat_status=$?
|
|
||||||
if (( static_status != 0 )); then exit "$static_status"; fi
|
|
||||||
if (( lint_status != 0 )); then exit "$lint_status"; fi
|
|
||||||
exit "$compat_status"
|
|
||||||
|
|
||||||
- name: Validate built artifacts
|
until grep -Fq 'run-gates: PASS build ' "$static_log"; do
|
||||||
if: matrix.lane == 'static-artifacts'
|
if ! kill -0 "$static_pid" 2>/dev/null; then
|
||||||
run: pnpm run check:ci:artifacts
|
static_status=0
|
||||||
|
wait "$static_pid" || static_status=$?
|
||||||
|
if grep -Fq 'run-gates: PASS build ' "$static_log"; then break; fi
|
||||||
|
if (( static_status != 0 )); then exit "$static_status"; fi
|
||||||
|
echo '::error::Static gates exited without completing the build.'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sleep 0.2
|
||||||
|
done
|
||||||
|
|
||||||
- name: Run coverage and build-backed snapshots concurrently
|
DSH_EXAMPLE_MODE=lib pnpm run test:snapshot &
|
||||||
if: matrix.lane == 'coverage-snapshots'
|
|
||||||
run: |
|
|
||||||
coverage_status=0
|
|
||||||
snapshot_status=0
|
|
||||||
pnpm run check:ci:coverage &
|
|
||||||
coverage_pid=$!
|
|
||||||
pnpm run check:ci:snapshot &
|
|
||||||
snapshot_pid=$!
|
snapshot_pid=$!
|
||||||
wait "$coverage_pid" || coverage_status=$?
|
pnpm run publint &
|
||||||
wait "$snapshot_pid" || snapshot_status=$?
|
publint_pid=$!
|
||||||
if (( coverage_status != 0 )); then exit "$coverage_status"; fi
|
pnpm run verify-node-next-types &
|
||||||
exit "$snapshot_status"
|
node_next_pid=$!
|
||||||
|
pnpm run verify-built-package-invariants &
|
||||||
|
built_invariants_pid=$!
|
||||||
|
DSH_EXAMPLE_MODE=lib pnpm exec vitest run --config vitest.e2e.config.ts \
|
||||||
|
examples/headless-agent/tests/keyless-smoke.e2e.ts \
|
||||||
|
examples/tui-agent/tests/tui-keyless-smoke.e2e.ts \
|
||||||
|
packages/examples/cli-demo/tests/built-bin.e2e.ts \
|
||||||
|
packages/examples/acp-demo/tests/built-bin.e2e.ts \
|
||||||
|
packages/ui/jsonrpc/tests/built-scope-carrier.e2e.ts \
|
||||||
|
packages/workflow/workflow-workerthread/tests/built-worker.e2e.ts \
|
||||||
|
packages/code-runtime/code-runtime-worker/tests/built-lib.e2e.ts &
|
||||||
|
built_bin_pid=$!
|
||||||
|
|
||||||
|
final_status=0
|
||||||
|
capture_status() {
|
||||||
|
local child_status=0
|
||||||
|
wait "$1" || child_status=$?
|
||||||
|
if (( final_status == 0 && child_status != 0 )); then
|
||||||
|
final_status=$child_status
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
for child_pid in \
|
||||||
|
"$static_pid" "$lint_pid" "$compat_pid" "$snapshot_pid" \
|
||||||
|
"$publint_pid" "$node_next_pid" "$built_invariants_pid" "$built_bin_pid"
|
||||||
|
do
|
||||||
|
capture_status "$child_pid"
|
||||||
|
done
|
||||||
|
exit "$final_status"
|
||||||
|
|
||||||
|
- name: Run exhaustive coverage
|
||||||
|
if: matrix.lane == 'coverage'
|
||||||
|
run: pnpm run check:ci:coverage
|
||||||
|
|
||||||
|
|
||||||
node-compat:
|
node-compat:
|
||||||
@@ -204,6 +221,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DSH_COVERAGE_MAX_WORKERS: '12'
|
DSH_COVERAGE_MAX_WORKERS: '12'
|
||||||
DSH_ESLINT_CACHE: '1'
|
DSH_ESLINT_CACHE: '1'
|
||||||
|
DSH_ESLINT_CONCURRENCY: '32'
|
||||||
DSH_GATE_CONCURRENCY: '16'
|
DSH_GATE_CONCURRENCY: '16'
|
||||||
DSH_PUBLINT_CONCURRENCY: '16'
|
DSH_PUBLINT_CONCURRENCY: '16'
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user