Skip to content

Commit

Permalink
ci: update for arm macos
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed May 7, 2024
1 parent 11a255f commit 84435f2
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,24 @@ jobs:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", pypy-3.8, pypy-3.9, pypy-3.10]
platform: [
{ os: "macos-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
{ os: "macos-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" },
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" },
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
]
include:
# Just test one x86 Windows Python for simplicity
- python-version: 3.12
platform: { os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" }
# Just test one x64 macOS Python for simplicity
- python-version: 3.12
platform: { os: "macos-13", python-architecture: "x64", rust-target: "x86_64-apple-darwin" }
# Just test one x64 macOS Python for simplicity
exclude:
# macOS arm doesn't have Python builds before 3.10
- python-version: 3.9
platform: { os: "macos-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" }
- python-version: 3.8
platform: { os: "macos-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" }

steps:
- uses: actions/checkout@v4
Expand All @@ -87,9 +97,9 @@ jobs:
with:
targets: ${{ matrix.platform.rust-target }}

- name: Install Rust aarch64-apple-darwin target
- name: Install Rust x86_64-apple-darwin target
if: matrix.platform.os == 'macos-latest'
run: rustup target add aarch64-apple-darwin
run: rustup target add x86_64-apple-darwin

- name: Install test dependencies
run: pip install --upgrade nox
Expand Down Expand Up @@ -143,10 +153,6 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

- name: Install Rust aarch64-apple-darwin target
if: matrix.os == 'macos-latest'
run: rustup target add aarch64-apple-darwin

- name: Build package
run: pip install -e .

Expand Down Expand Up @@ -307,7 +313,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
targets: aarch64-apple-darwin,x86_64-apple-darwin
- uses: pypa/[email protected]
env:
CIBW_BUILD: cp39-*
Expand Down

0 comments on commit 84435f2

Please sign in to comment.