Skip to content

Commit 350211e

Browse files
committed
ci: gate test matrix behind a tiered check/smoke/tutorials stage
Introduce a tiered CI structure: - Tier 1 (ubuntu-latest, ungated): make check, make test-smoke, make test-tutorials. - Tier 2 (needs all of Tier 1): the 4 linux test pipelines and the macOS test run. Move `check` off the macOS self-hosted runner to ubuntu-latest and drop its repo gate so the gate also runs on forks (otherwise Tier 2 would be skipped there). test-smoke/test-tutorials targets are added by a separate change; until then those jobs fail and Tier 2 is skipped.
1 parent 1490bb7 commit 350211e

1 file changed

Lines changed: 38 additions & 4 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ concurrency:
2222

2323
jobs:
2424

25+
# ── Tier 1: cheap correctness gate (ubuntu-latest, ungated). ──
26+
# Tier 2 runs only if all three of these pass.
2527
check:
26-
name: macOS / make check
27-
if: github.repository == 'apple/coreai-optimization'
28-
runs-on: [self-hosted, macos, tahoe, ARM64]
28+
name: Linux / make check
29+
runs-on: ubuntu-latest
2930
timeout-minutes: 30
3031
steps:
3132
- name: Check out repository
@@ -39,9 +40,38 @@ jobs:
3940
- name: Run `make check`
4041
run: make check
4142

43+
test-smoke:
44+
name: Linux / make test-smoke
45+
runs-on: ubuntu-latest
46+
timeout-minutes: 45
47+
steps:
48+
- name: Check out repository
49+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
50+
- name: Install uv
51+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
52+
with:
53+
enable-cache: false
54+
- name: Run `make test-smoke`
55+
run: make test-smoke
56+
57+
test-tutorials:
58+
name: Linux / make test-tutorials
59+
runs-on: ubuntu-latest
60+
timeout-minutes: 60
61+
steps:
62+
- name: Check out repository
63+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
64+
- name: Install uv
65+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
66+
with:
67+
enable-cache: false
68+
- name: Run `make test-tutorials`
69+
run: make test-tutorials
70+
71+
# ── Tier 2: full test matrix, gated on Tier 1. ──
4272
macos-tests:
4373
name: macOS / make test-highest-pytorch / markers=not-slow
44-
needs: [check]
74+
needs: [check, test-smoke, test-tutorials]
4575
if: github.repository == 'apple/coreai-optimization'
4676
runs-on: [self-hosted, macos, tahoe, ARM64]
4777
timeout-minutes: 60
@@ -63,6 +93,7 @@ jobs:
6393

6494
linux-highest-slow:
6595
name: Linux / make test-highest-pytorch / markers=slow
96+
needs: [check, test-smoke, test-tutorials]
6697
runs-on: ubuntu-latest
6798
timeout-minutes: 120
6899
steps:
@@ -83,6 +114,7 @@ jobs:
83114

84115
linux-highest-fast:
85116
name: Linux / make test-highest-pytorch / markers=not-slow
117+
needs: [check, test-smoke, test-tutorials]
86118
runs-on: ubuntu-latest
87119
timeout-minutes: 60
88120
steps:
@@ -103,6 +135,7 @@ jobs:
103135

104136
linux-lowest-slow:
105137
name: Linux / make test-lowest-pytorch / markers=slow
138+
needs: [check, test-smoke, test-tutorials]
106139
runs-on: ubuntu-latest
107140
timeout-minutes: 120
108141
steps:
@@ -123,6 +156,7 @@ jobs:
123156

124157
linux-lowest-fast:
125158
name: Linux / make test-lowest-pytorch / markers=not-slow
159+
needs: [check, test-smoke, test-tutorials]
126160
runs-on: ubuntu-latest
127161
timeout-minutes: 60
128162
steps:

0 commit comments

Comments
 (0)