Skip to content

Commit

Permalink
ci: move more jobs to macOS arm (#4600)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt authored Oct 5, 2024
1 parent 720a9be commit d03d102
Showing 1 changed file with 63 additions and 17 deletions.
80 changes: 63 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
rust: [stable]
platform: [
{
os: "macos-14", # first available arm macos runner
os: "macos-latest",
python-architecture: "arm64",
rust-target: "aarch64-apple-darwin",
},
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
platform:
[
{
os: "macos-14", # first available arm macos runner
os: "macos-latest", # first available arm macos runner
python-architecture: "arm64",
rust-target: "aarch64-apple-darwin",
},
Expand Down Expand Up @@ -248,15 +248,10 @@ jobs:
]
platform:
[
# for the full matrix, use x86_64 macos runners because not all Python versions
# PyO3 supports are available for arm on GitHub Actions. (Availability starts
# around Python 3.10, can switch the full matrix to arm once earlier versions
# are dropped.)
# NB: if this switches to arm, switch the arm job below in the `include` to x86_64
{
os: "macos-13",
python-architecture: "x64",
rust-target: "x86_64-apple-darwin",
os: "macos-latest",
python-architecture: "arm64",
rust-target: "aarch64-apple-darwin",
},
{
os: "ubuntu-latest",
Expand Down Expand Up @@ -300,7 +295,7 @@ jobs:
rust-target: "x86_64-unknown-linux-gnu",
}

# Test 32-bit Windows only with the latest Python version
# Test 32-bit Windows and x64 macOS only with the latest Python version
- rust: stable
python-version: "3.12"
platform:
Expand All @@ -309,14 +304,65 @@ jobs:
python-architecture: "x86",
rust-target: "i686-pc-windows-msvc",
}

# test arm macos runner with the latest Python version
# NB: if the full matrix switchess to arm, switch to x86_64 here
- rust: stable
python-version: "3.12"
platform:
{
os: "macos-14",
os: "macos-13",
python-architecture: "x64",
rust-target: "x86_64-apple-darwin",
}

# arm64 macOS Python not available on GitHub Actions until 3.10
# so backfill 3.7-3.9 with x64 macOS runners
- rust: stable
python-version: "3.7"
platform:
{
os: "macos-13",
python-architecture: "x64",
rust-target: "x86_64-apple-darwin",
}
- rust: stable
python-version: "3.8"
platform:
{
os: "macos-13",
python-architecture: "x64",
rust-target: "x86_64-apple-darwin",
}
- rust: stable
python-version: "3.9"
platform:
{
os: "macos-13",
python-architecture: "x64",
rust-target: "x86_64-apple-darwin",
}

exclude:
# arm64 macOS Python not available on GitHub Actions until 3.10
- rust: stable
python-version: "3.7"
platform:
{
os: "macos-latest",
python-architecture: "arm64",
rust-target: "aarch64-apple-darwin",
}
- rust: stable
python-version: "3.8"
platform:
{
os: "macos-latest",
python-architecture: "arm64",
rust-target: "aarch64-apple-darwin",
}
- rust: stable
python-version: "3.9"
platform:
{
os: "macos-latest",
python-architecture: "arm64",
rust-target: "aarch64-apple-darwin",
}
Expand Down Expand Up @@ -389,7 +435,7 @@ jobs:
name: coverage ${{ matrix.os }}
strategy:
matrix:
os: ["windows-latest", "macos-14", "ubuntu-latest"] # first available arm macos runner
os: ["windows-latest", "macos-latest", "ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -591,7 +637,7 @@ jobs:
- os: "macos-13" # last x86_64 macos runners
target: "aarch64-apple-darwin"
# macos aarch64 -> x86_64
- os: "macos-14" # aarch64 macos runners
- os: "macos-latest"
target: "x86_64-apple-darwin"
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit d03d102

Please sign in to comment.