Skip to content

Commit 7371028

Browse files
committed
ci: move more jobs to macOS arm (#4600)
1 parent 8e3dc45 commit 7371028

File tree

1 file changed

+63
-17
lines changed

1 file changed

+63
-17
lines changed

.github/workflows/ci.yml

Lines changed: 63 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
rust: [stable]
9494
platform: [
9595
{
96-
os: "macos-14", # first available arm macos runner
96+
os: "macos-latest",
9797
python-architecture: "arm64",
9898
rust-target: "aarch64-apple-darwin",
9999
},
@@ -180,7 +180,7 @@ jobs:
180180
platform:
181181
[
182182
{
183-
os: "macos-14", # first available arm macos runner
183+
os: "macos-latest", # first available arm macos runner
184184
python-architecture: "arm64",
185185
rust-target: "aarch64-apple-darwin",
186186
},
@@ -250,15 +250,10 @@ jobs:
250250
]
251251
platform:
252252
[
253-
# for the full matrix, use x86_64 macos runners because not all Python versions
254-
# PyO3 supports are available for arm on GitHub Actions. (Availability starts
255-
# around Python 3.10, can switch the full matrix to arm once earlier versions
256-
# are dropped.)
257-
# NB: if this switches to arm, switch the arm job below in the `include` to x86_64
258253
{
259-
os: "macos-13",
260-
python-architecture: "x64",
261-
rust-target: "x86_64-apple-darwin",
254+
os: "macos-latest",
255+
python-architecture: "arm64",
256+
rust-target: "aarch64-apple-darwin",
262257
},
263258
{
264259
os: "ubuntu-latest",
@@ -302,7 +297,7 @@ jobs:
302297
rust-target: "x86_64-unknown-linux-gnu",
303298
}
304299

305-
# Test 32-bit Windows only with the latest Python version
300+
# Test 32-bit Windows and x64 macOS only with the latest Python version
306301
- rust: stable
307302
python-version: "3.12"
308303
platform:
@@ -311,14 +306,65 @@ jobs:
311306
python-architecture: "x86",
312307
rust-target: "i686-pc-windows-msvc",
313308
}
314-
315-
# test arm macos runner with the latest Python version
316-
# NB: if the full matrix switchess to arm, switch to x86_64 here
317309
- rust: stable
318310
python-version: "3.12"
319311
platform:
320312
{
321-
os: "macos-14",
313+
os: "macos-13",
314+
python-architecture: "x64",
315+
rust-target: "x86_64-apple-darwin",
316+
}
317+
318+
# arm64 macOS Python not available on GitHub Actions until 3.10
319+
# so backfill 3.7-3.9 with x64 macOS runners
320+
- rust: stable
321+
python-version: "3.7"
322+
platform:
323+
{
324+
os: "macos-13",
325+
python-architecture: "x64",
326+
rust-target: "x86_64-apple-darwin",
327+
}
328+
- rust: stable
329+
python-version: "3.8"
330+
platform:
331+
{
332+
os: "macos-13",
333+
python-architecture: "x64",
334+
rust-target: "x86_64-apple-darwin",
335+
}
336+
- rust: stable
337+
python-version: "3.9"
338+
platform:
339+
{
340+
os: "macos-13",
341+
python-architecture: "x64",
342+
rust-target: "x86_64-apple-darwin",
343+
}
344+
345+
exclude:
346+
# arm64 macOS Python not available on GitHub Actions until 3.10
347+
- rust: stable
348+
python-version: "3.7"
349+
platform:
350+
{
351+
os: "macos-latest",
352+
python-architecture: "arm64",
353+
rust-target: "aarch64-apple-darwin",
354+
}
355+
- rust: stable
356+
python-version: "3.8"
357+
platform:
358+
{
359+
os: "macos-latest",
360+
python-architecture: "arm64",
361+
rust-target: "aarch64-apple-darwin",
362+
}
363+
- rust: stable
364+
python-version: "3.9"
365+
platform:
366+
{
367+
os: "macos-latest",
322368
python-architecture: "arm64",
323369
rust-target: "aarch64-apple-darwin",
324370
}
@@ -390,7 +436,7 @@ jobs:
390436
name: coverage ${{ matrix.os }}
391437
strategy:
392438
matrix:
393-
os: ["windows-latest", "macos-14", "ubuntu-latest"] # first available arm macos runner
439+
os: ["windows-latest", "macos-latest", "ubuntu-latest"]
394440
runs-on: ${{ matrix.os }}
395441
steps:
396442
- if: ${{ github.event_name == 'pull_request' && matrix.os != 'ubuntu-latest' }}
@@ -576,7 +622,7 @@ jobs:
576622
- os: "macos-13" # last x86_64 macos runners
577623
target: "aarch64-apple-darwin"
578624
# macos aarch64 -> x86_64
579-
- os: "macos-14" # aarch64 macos runners
625+
- os: "macos-latest"
580626
target: "x86_64-apple-darwin"
581627
steps:
582628
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)