Skip to content

Commit 41e59f7

Browse files
committed
Revert "TMP: Disable other builds"
This reverts commit 14d139c.
1 parent 9c28778 commit 41e59f7

File tree

2 files changed

+1529
-0
lines changed

2 files changed

+1529
-0
lines changed

.github/workflows/apple.yml

Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,254 @@
1+
name: MacOS Python build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
schedule:
8+
- cron: '13 11 * * *'
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
12+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
13+
14+
jobs:
15+
pythonbuild:
16+
if: ${{ github.repository_owner == 'indygreg' || github.event_name != 'schedule' }}
17+
runs-on: 'macos-13'
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Emit rustc version
22+
run: |
23+
rustc --version > .rustc-version
24+
25+
- uses: actions/cache@v4
26+
with:
27+
path: |
28+
~/.cargo/registry
29+
~/.cargo/git
30+
target
31+
key: ${{ runner.os }}-pythonbuild-${{ hashFiles('Cargo.lock', '.rustc-version') }}
32+
33+
- name: Build
34+
run: |
35+
cargo build --release
36+
37+
- name: Upload pythonbuild Executable
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: pythonbuild
41+
path: target/release/pythonbuild
42+
43+
build:
44+
if: ${{ github.repository_owner == 'indygreg' || github.event_name != 'schedule' }}
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
build:
49+
- target_triple: 'aarch64-apple-darwin'
50+
runner: macos-14
51+
py: 'cpython-3.9'
52+
options: 'debug'
53+
- target_triple: 'aarch64-apple-darwin'
54+
runner: macos-14
55+
py: 'cpython-3.9'
56+
options: 'pgo'
57+
- target_triple: 'aarch64-apple-darwin'
58+
runner: macos-14
59+
py: 'cpython-3.9'
60+
options: 'pgo+lto'
61+
62+
- target_triple: 'aarch64-apple-darwin'
63+
runner: macos-14
64+
py: 'cpython-3.10'
65+
options: 'debug'
66+
- target_triple: 'aarch64-apple-darwin'
67+
runner: macos-14
68+
py: 'cpython-3.10'
69+
options: 'pgo'
70+
- target_triple: 'aarch64-apple-darwin'
71+
runner: macos-14
72+
py: 'cpython-3.10'
73+
options: 'pgo+lto'
74+
75+
- target_triple: 'aarch64-apple-darwin'
76+
runner: macos-14
77+
py: 'cpython-3.11'
78+
options: 'debug'
79+
- target_triple: 'aarch64-apple-darwin'
80+
runner: macos-14
81+
py: 'cpython-3.11'
82+
options: 'pgo'
83+
- target_triple: 'aarch64-apple-darwin'
84+
runner: macos-14
85+
py: 'cpython-3.11'
86+
options: 'pgo+lto'
87+
88+
- target_triple: 'aarch64-apple-darwin'
89+
runner: macos-14
90+
py: 'cpython-3.12'
91+
options: 'debug'
92+
- target_triple: 'aarch64-apple-darwin'
93+
runner: macos-14
94+
py: 'cpython-3.12'
95+
options: 'pgo'
96+
- target_triple: 'aarch64-apple-darwin'
97+
runner: macos-14
98+
py: 'cpython-3.12'
99+
options: 'pgo+lto'
100+
101+
- target_triple: 'aarch64-apple-darwin'
102+
runner: macos-14
103+
py: 'cpython-3.13'
104+
options: 'debug'
105+
- target_triple: 'aarch64-apple-darwin'
106+
runner: macos-14
107+
py: 'cpython-3.13'
108+
options: 'pgo'
109+
- target_triple: 'aarch64-apple-darwin'
110+
runner: macos-14
111+
py: 'cpython-3.13'
112+
options: 'pgo+lto'
113+
114+
- target_triple: 'aarch64-apple-darwin'
115+
runner: macos-14
116+
py: 'cpython-3.13'
117+
options: 'freethreaded+debug'
118+
- target_triple: 'aarch64-apple-darwin'
119+
runner: macos-14
120+
py: 'cpython-3.13'
121+
options: 'freethreaded+pgo'
122+
- target_triple: 'aarch64-apple-darwin'
123+
runner: macos-14
124+
py: 'cpython-3.13'
125+
options: 'freethreaded+pgo+lto'
126+
127+
# macOS on Intel hardware. This is pretty straightforward. We exclude
128+
# noopt because it doesn't provide any compelling advantages over PGO
129+
# or LTO builds.
130+
- target_triple: 'x86_64-apple-darwin'
131+
runner: macos-13
132+
py: 'cpython-3.9'
133+
options: 'debug'
134+
- target_triple: 'x86_64-apple-darwin'
135+
runner: macos-13
136+
py: 'cpython-3.9'
137+
options: 'pgo'
138+
- target_triple: 'x86_64-apple-darwin'
139+
runner: macos-13
140+
py: 'cpython-3.9'
141+
options: 'pgo+lto'
142+
143+
- target_triple: 'x86_64-apple-darwin'
144+
runner: macos-13
145+
py: 'cpython-3.10'
146+
options: 'debug'
147+
- target_triple: 'x86_64-apple-darwin'
148+
runner: macos-13
149+
py: 'cpython-3.10'
150+
options: 'pgo'
151+
- target_triple: 'x86_64-apple-darwin'
152+
runner: macos-13
153+
py: 'cpython-3.10'
154+
options: 'pgo+lto'
155+
156+
- target_triple: 'x86_64-apple-darwin'
157+
runner: macos-13
158+
py: 'cpython-3.11'
159+
options: 'debug'
160+
- target_triple: 'x86_64-apple-darwin'
161+
runner: macos-13
162+
py: 'cpython-3.11'
163+
options: 'pgo'
164+
- target_triple: 'x86_64-apple-darwin'
165+
runner: macos-13
166+
py: 'cpython-3.11'
167+
options: 'pgo+lto'
168+
169+
- target_triple: 'x86_64-apple-darwin'
170+
runner: macos-13
171+
py: 'cpython-3.12'
172+
options: 'debug'
173+
- target_triple: 'x86_64-apple-darwin'
174+
runner: macos-13
175+
py: 'cpython-3.12'
176+
options: 'pgo'
177+
- target_triple: 'x86_64-apple-darwin'
178+
runner: macos-13
179+
py: 'cpython-3.12'
180+
options: 'pgo+lto'
181+
182+
- target_triple: 'x86_64-apple-darwin'
183+
runner: macos-13
184+
py: 'cpython-3.13'
185+
options: 'debug'
186+
- target_triple: 'x86_64-apple-darwin'
187+
runner: macos-13
188+
py: 'cpython-3.13'
189+
options: 'pgo'
190+
- target_triple: 'x86_64-apple-darwin'
191+
runner: macos-13
192+
py: 'cpython-3.13'
193+
options: 'pgo+lto'
194+
- target_triple: 'x86_64-apple-darwin'
195+
runner: macos-13
196+
py: 'cpython-3.13'
197+
options: 'freethreaded+debug'
198+
- target_triple: 'x86_64-apple-darwin'
199+
runner: macos-13
200+
py: 'cpython-3.13'
201+
options: 'freethreaded+pgo'
202+
- target_triple: 'x86_64-apple-darwin'
203+
runner: macos-13
204+
py: 'cpython-3.13'
205+
options: 'freethreaded+pgo+lto'
206+
needs:
207+
- pythonbuild
208+
runs-on: ${{ matrix.build.runner }}
209+
steps:
210+
- uses: actions/checkout@v4
211+
with:
212+
fetch-depth: 0
213+
214+
- name: Install Python
215+
uses: actions/setup-python@v5
216+
with:
217+
python-version: '3.11'
218+
219+
- name: Download pythonbuild
220+
uses: actions/download-artifact@v4
221+
with:
222+
name: pythonbuild
223+
path: build
224+
225+
- name: Build
226+
run: |
227+
if [ "${{ matrix.build.target_triple }}" = "aarch64-apple-darwin" ]; then
228+
export APPLE_SDK_PATH=/Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk
229+
elif [ "${{ matrix.build.target_triple }}" = "x86_64-apple-darwin" ]; then
230+
export APPLE_SDK_PATH=/Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk
231+
else
232+
echo "unhandled target triple: ${{ matrix.build.target_triple }}"
233+
exit 1
234+
fi
235+
236+
./build-macos.py --target-triple ${{ matrix.build.target_triple }} --python ${{ matrix.build.py }} --options ${{ matrix.build.options }}
237+
238+
- name: Upload Distributions
239+
uses: actions/upload-artifact@v4
240+
with:
241+
name: ${{ matrix.build.py }}-${{ matrix.build.target_triple }}-${{ matrix.build.options }}
242+
path: dist/*
243+
244+
- uses: actions/checkout@v4
245+
with:
246+
repository: 'phracker/MacOSX-SDKs'
247+
ref: master
248+
path: macosx-sdks
249+
250+
- name: Validate Distribution
251+
run: |
252+
chmod +x build/pythonbuild
253+
254+
build/pythonbuild validate-distribution --macos-sdks-path macosx-sdks --run dist/*.tar.zst

0 commit comments

Comments
 (0)