Skip to content

Commit 9574f70

Browse files
committed
ci: build aarch64 distributions on macos-14 runners
GitHub made Apple ARM runners available several days back. This (finally) enables us to build Apple ARM PGO natively on GitHub Actions. (Previously we weren't building this configuration in CI and at release time I was using my personal M1 Mac Mini to produce the release artifacts.) This commit updates all aarch64-apple-* builds to run on the ARM Apple runners. We remove noopt builds and add pgo and pgo+lto builds so there is parity between x86-64 and aarch64. Paths to the Apple SDKs on aarch64 have been updated to use the latest available.
1 parent 21e65fb commit 9574f70

File tree

1 file changed

+68
-21
lines changed

1 file changed

+68
-21
lines changed

.github/workflows/apple.yml

Lines changed: 68 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,128 +41,181 @@ jobs:
4141
fail-fast: false
4242
matrix:
4343
build:
44-
# macOS on Apple hardware. Can't do PGO because GitHub Apple hardware
45-
# is Intel.
4644
- target_triple: 'aarch64-apple-darwin'
45+
runner: macos-14
4746
py: 'cpython-3.8'
4847
optimizations: 'debug'
4948
- target_triple: 'aarch64-apple-darwin'
49+
runner: macos-14
5050
py: 'cpython-3.8'
51-
optimizations: 'noopt'
51+
optimizations: 'lto'
5252
- target_triple: 'aarch64-apple-darwin'
53+
runner: macos-14
5354
py: 'cpython-3.8'
54-
optimizations: 'lto'
55+
optimizations: 'pgo'
56+
- target_triple: 'aarch64-apple-darwin'
57+
runner: macos-14
58+
py: 'cpython-3.8'
59+
optimizations: 'pgo+lto'
5560

5661
- target_triple: 'aarch64-apple-darwin'
62+
runner: macos-14
5763
py: 'cpython-3.9'
5864
optimizations: 'debug'
5965
- target_triple: 'aarch64-apple-darwin'
66+
runner: macos-14
6067
py: 'cpython-3.9'
61-
optimizations: 'noopt'
68+
optimizations: 'lto'
6269
- target_triple: 'aarch64-apple-darwin'
70+
runner: macos-14
6371
py: 'cpython-3.9'
64-
optimizations: 'lto'
72+
optimizations: 'pgo'
73+
- target_triple: 'aarch64-apple-darwin'
74+
runner: macos-14
75+
py: 'cpython-3.9'
76+
optimizations: 'pgo+lto'
6577

6678
- target_triple: 'aarch64-apple-darwin'
79+
runner: macos-14
6780
py: 'cpython-3.10'
6881
optimizations: 'debug'
6982
- target_triple: 'aarch64-apple-darwin'
83+
runner: macos-14
84+
py: 'cpython-3.10'
85+
optimizations: 'lto'
86+
- target_triple: 'aarch64-apple-darwin'
87+
runner: macos-14
7088
py: 'cpython-3.10'
71-
optimizations: 'noopt'
89+
optimizations: 'pgo'
7290
- target_triple: 'aarch64-apple-darwin'
91+
runner: macos-14
7392
py: 'cpython-3.10'
74-
optimizations: 'lto'
93+
optimizations: 'pgo+lto'
7594

7695
- target_triple: 'aarch64-apple-darwin'
96+
runner: macos-14
7797
py: 'cpython-3.11'
7898
optimizations: 'debug'
7999
- target_triple: 'aarch64-apple-darwin'
100+
runner: macos-14
80101
py: 'cpython-3.11'
81-
optimizations: 'noopt'
102+
optimizations: 'lto'
82103
- target_triple: 'aarch64-apple-darwin'
104+
runner: macos-14
83105
py: 'cpython-3.11'
84-
optimizations: 'lto'
106+
optimizations: 'pgo'
107+
- target_triple: 'aarch64-apple-darwin'
108+
runner: macos-14
109+
py: 'cpython-3.11'
110+
optimizations: 'pgo+lto'
85111

86112
- target_triple: 'aarch64-apple-darwin'
113+
runner: macos-14
87114
py: 'cpython-3.12'
88115
optimizations: 'debug'
89116
- target_triple: 'aarch64-apple-darwin'
117+
runner: macos-14
90118
py: 'cpython-3.12'
91-
optimizations: 'noopt'
119+
optimizations: 'lto'
92120
- target_triple: 'aarch64-apple-darwin'
121+
runner: macos-14
93122
py: 'cpython-3.12'
94-
optimizations: 'lto'
123+
optimizations: 'pgo'
124+
- target_triple: 'aarch64-apple-darwin'
125+
runner: macos-14
126+
py: 'cpython-3.12'
127+
optimizations: 'pgo+lto'
95128

96129
# macOS on Intel hardware. This is pretty straightforward. We exclude
97130
# noopt because it doesn't provide any compelling advantages over PGO
98131
# or LTO builds.
99132
- target_triple: 'x86_64-apple-darwin'
133+
runner: macos-11
100134
py: 'cpython-3.8'
101135
optimizations: 'debug'
102136
- target_triple: 'x86_64-apple-darwin'
137+
runner: macos-11
103138
py: 'cpython-3.8'
104139
optimizations: 'lto'
105140
- target_triple: 'x86_64-apple-darwin'
141+
runner: macos-11
106142
py: 'cpython-3.8'
107143
optimizations: 'pgo'
108144
- target_triple: 'x86_64-apple-darwin'
145+
runner: macos-11
109146
py: 'cpython-3.8'
110147
optimizations: 'pgo+lto'
111148

112149
- target_triple: 'x86_64-apple-darwin'
150+
runner: macos-11
113151
py: 'cpython-3.9'
114152
optimizations: 'debug'
115153
- target_triple: 'x86_64-apple-darwin'
154+
runner: macos-11
116155
py: 'cpython-3.9'
117156
optimizations: 'lto'
118157
- target_triple: 'x86_64-apple-darwin'
158+
runner: macos-11
119159
py: 'cpython-3.9'
120160
optimizations: 'pgo'
121161
- target_triple: 'x86_64-apple-darwin'
162+
runner: macos-11
122163
py: 'cpython-3.9'
123164
optimizations: 'pgo+lto'
124165

125166
- target_triple: 'x86_64-apple-darwin'
167+
runner: macos-11
126168
py: 'cpython-3.10'
127169
optimizations: 'debug'
128170
- target_triple: 'x86_64-apple-darwin'
171+
runner: macos-11
129172
py: 'cpython-3.10'
130173
optimizations: 'lto'
131174
- target_triple: 'x86_64-apple-darwin'
175+
runner: macos-11
132176
py: 'cpython-3.10'
133177
optimizations: 'pgo'
134178
- target_triple: 'x86_64-apple-darwin'
179+
runner: macos-11
135180
py: 'cpython-3.10'
136181
optimizations: 'pgo+lto'
137182

138183
- target_triple: 'x86_64-apple-darwin'
184+
runner: macos-11
139185
py: 'cpython-3.11'
140186
optimizations: 'debug'
141187
- target_triple: 'x86_64-apple-darwin'
188+
runner: macos-11
142189
py: 'cpython-3.11'
143190
optimizations: 'lto'
144191
- target_triple: 'x86_64-apple-darwin'
192+
runner: macos-11
145193
py: 'cpython-3.11'
146194
optimizations: 'pgo'
147195
- target_triple: 'x86_64-apple-darwin'
196+
runner: macos-11
148197
py: 'cpython-3.11'
149198
optimizations: 'pgo+lto'
150199

151200
- target_triple: 'x86_64-apple-darwin'
201+
runner: macos-11
152202
py: 'cpython-3.12'
153203
optimizations: 'debug'
154204
- target_triple: 'x86_64-apple-darwin'
205+
runner: macos-11
155206
py: 'cpython-3.12'
156207
optimizations: 'lto'
157208
- target_triple: 'x86_64-apple-darwin'
209+
runner: macos-11
158210
py: 'cpython-3.12'
159211
optimizations: 'pgo'
160212
- target_triple: 'x86_64-apple-darwin'
213+
runner: macos-11
161214
py: 'cpython-3.12'
162215
optimizations: 'pgo+lto'
163216
needs:
164217
- pythonbuild
165-
runs-on: 'macos-11'
218+
runs-on: ${{ matrix.build.runner }}
166219
steps:
167220
- uses: actions/checkout@v4
168221
with:
@@ -181,10 +234,8 @@ jobs:
181234

182235
- name: Build
183236
run: |
184-
export APPLE_HOST_SDK_PATH=/Applications/Xcode_12.5.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk
185-
186237
if [ "${{ matrix.build.target_triple }}" = "aarch64-apple-darwin" ]; then
187-
export APPLE_SDK_PATH=/Applications/Xcode_12.5.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk
238+
export APPLE_SDK_PATH=/Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk
188239
elif [ "${{ matrix.build.target_triple }}" = "x86_64-apple-darwin" ]; then
189240
export APPLE_SDK_PATH=/Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
190241
else
@@ -210,8 +261,4 @@ jobs:
210261
run: |
211262
chmod +x build/pythonbuild
212263
213-
if [ "${{matrix.build.target_triple }}" = "x86_64-apple-darwin" ]; then
214-
EXTRA_ARGS="--run"
215-
fi
216-
217-
build/pythonbuild validate-distribution --macos-sdks-path macosx-sdks ${EXTRA_ARGS} dist/*.tar.zst
264+
build/pythonbuild validate-distribution --macos-sdks-path macosx-sdks --run dist/*.tar.zst

0 commit comments

Comments
 (0)