forked from apple/coreai-optimization
-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (129 loc) · 4.58 KB
/
Copy pathci.yaml
File metadata and controls
139 lines (129 loc) · 4.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: CI
run-name: >-
${{ github.event_name == 'pull_request'
&& format('CI · PR #{0} · {1} · @{2}', github.event.pull_request.number, github.event.pull_request.head.ref, github.actor)
|| format('CI · push {0} · @{1}', github.ref_name, github.actor) }}
on:
pull_request:
branches: [main]
push:
branches: [main, 'u/**']
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# ── Stage 1: cheap correctness gate (ubuntu-latest, ungated). ──
check:
name: Linux / make check
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Run `make check`
run: make check
test-smoke:
name: Linux / make test-smoke / torch=${{ matrix.torch_version }}
runs-on: ubuntu-latest
timeout-minutes: 60
env:
INSTALL_PRECOMMIT: "false"
strategy:
fail-fast: false
matrix:
include:
- torch_group: torch_2_8
torch_version: "2.8"
- torch_group: torch_2_9
torch_version: "2.9"
- torch_group: torch_2_10
torch_version: "2.10"
- torch_group: torch_2_11
torch_version: "2.11"
- torch_group: torch_2_12
torch_version: "2.12"
- torch_group: torch_2_13
torch_version: "2.13"
steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Run `make test-smoke`
run: make test-smoke TORCH_GROUP=${{ matrix.torch_group }}
test-tutorials:
name: Linux / make test-tutorials
runs-on: ubuntu-latest
timeout-minutes: 60
env:
INSTALL_PRECOMMIT: "false"
steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Run `make test-tutorials`
run: make test-tutorials
# ── Stage 2: full test matrix, gated on Stage 1. ──
macos-tests:
name: macOS / make test-highest-pytorch / markers=not-slow
needs: [check, test-smoke, test-tutorials]
if: github.repository == 'apple/coreai-optimization'
runs-on: [self-hosted, macos, tahoe, ARM64]
timeout-minutes: 60
env:
INSTALL_PRECOMMIT: "false"
steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Run `make test-highest-pytorch`
run: make test-highest-pytorch PYTEST_ARGS="--marker 'not slow' --junit"
- name: Upload test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-results-macos-highest-fast
path: test-results/
linux-tests:
name: Linux / make test-${{ matrix.torch }}-pytorch / markers=${{ matrix.speed == 'slow' && 'slow' || 'not-slow' }}
needs: [check, test-smoke, test-tutorials]
runs-on: ubuntu-latest
timeout-minutes: 120
env:
INSTALL_PRECOMMIT: "false"
strategy:
fail-fast: false
matrix:
torch: [highest, lowest]
speed: [slow, fast]
steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Run `make test-${{ matrix.torch }}-pytorch`
run: make test-${{ matrix.torch }}-pytorch PYTEST_ARGS="--marker '${{ matrix.speed == 'slow' && 'slow' || 'not slow' }}' --junit"
- name: Upload test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-results-linux-${{ matrix.torch }}-${{ matrix.speed }}
path: test-results/