Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: move more jobs to macOS arm #4600

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading