ci: shard the CLI override sweep across 8 jobs

The effect stage re-slices every landed option one at a time and cannot batch,
so it is the entire cost of this job. Today it slices a 20mm cube, where most
options change nothing because the fixture has no supports, no second filament
and no geometry to act on; once each option is routed to a fixture that can
actually show its effect, --effect-full is ~6 h on a 4-vCPU runner and blows
the 60-minute timeout.

orca-test-repo's parity/effect_routing.json groups options by the cheapest
capable fixture and balances the groups by measured slice cost. 8 shards puts
the longest at ~53 min. Shards are disjoint and cover every landed option
exactly once, including options with no recorded fixture, which are spread
round-robin so a newly added one is never dropped from every shard.

fail-fast is off so one shard's failure does not cancel the rest, and the
report artifact is named per shard so all 8 upload.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSynfTLvSnHBbVkRUm56nY
This commit is contained in:
Hanif Koh
2026-09-04 18:32:38 +08:00
parent 3744b14ab8
commit 454967ebd7

View File

@@ -30,6 +30,17 @@ jobs:
overrides:
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
# The effect stage re-slices every landed option one at a time and cannot
# batch, so it is the whole cost of this job. Un-sharded it is ~6 h on a
# 4-vCPU runner once the option is routed to a fixture that can actually
# show its effect. parity/effect_routing.json groups options by cheapest
# capable fixture and balances the groups by measured slice cost; 8 shards
# puts the longest at ~53 min. Shards are disjoint and cover every landed
# option exactly once.
shard: [0, 1, 2, 3, 4, 5, 6, 7]
steps:
- name: Find the latest successful Linux build
id: build
@@ -95,6 +106,7 @@ jobs:
working-directory: orca-test-repo
run: |
python -m pytest test_cli_overrides.py -c pytest.ini -v --effect-full \
--effect-shard ${{ matrix.shard }}/8 \
--orca-bin "$ORCA_BIN" --orca-source "$ORCA_SOURCE" \
2>&1 | tee ../sweep.log
@@ -102,7 +114,7 @@ jobs:
if: always()
run: |
{
echo "## CLI override sweep"
echo "## CLI override sweep - shard ${{ matrix.shard }}/8"
grep -E "\[override sweep" sweep.log || echo "no stage summaries (see log)"
echo
grep -E "^(=+ )?[0-9]+ (passed|failed)" sweep.log | tail -1 || true
@@ -112,7 +124,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v7
with:
name: override-report-${{ github.run_id }}
name: override-report-${{ github.run_id }}-shard${{ matrix.shard }}
path: |
orca-test-repo/.pytest_cache/override_report.json
sweep.log