Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,23 @@ jobs:
# with the commit diff, because the merge may affect line numbers.
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

- name: Set up Python ${{ inputs.python-version }}
# installs using setup-python do not work for arm macOS 3.9 and below
- if: ${{ !(inputs.os == 'macos-latest' && contains(fromJSON('["3.7", "3.8", "3.9"]'), inputs.python-version) && inputs.python-architecture == 'x64') }}
name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
architecture: ${{ inputs.python-architecture }}
# PyPy can have FFI changes within Python versions, which creates pain in CI
check-latest: ${{ startsWith(inputs.python-version, 'pypy') }}

# workaround for the above, only available for 3.9
- if: ${{ inputs.os == 'macos-latest' && contains(fromJSON('["3.9"]'), inputs.python-version) && inputs.python-architecture == 'x64' }}
name: Set up Python ${{ inputs.python-version }}
uses: astral-sh/setup-uv@v5
with:
python-version: cpython-${{ inputs.python-version }}-macos-x86-64

- name: Install nox
run: python -m pip install --upgrade pip && pip install nox[uv]

Expand Down
55 changes: 15 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,13 @@ jobs:
matrix:
rust: [stable]
python-version: ["3.13"]
platform: [
platform:
[
{
os: "macos-latest", # first available arm macos runner
os: "macos-latest",
python-architecture: "arm64",
rust-target: "aarch64-apple-darwin",
},
{
os: "macos-13", # last available x86_64 macos runner
python-architecture: "x64",
rust-target: "x86_64-apple-darwin",
},
{
os: "ubuntu-latest",
python-architecture: "x64",
Expand Down Expand Up @@ -316,7 +312,7 @@ jobs:
python-version: "3.13"
platform:
{
os: "macos-13",
os: "macos-latest",
python-architecture: "x64",
rust-target: "x86_64-apple-darwin",
}
Expand All @@ -330,32 +326,17 @@ jobs:
rust-target: "x86_64-unknown-linux-gnu",
}

# 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",
}
# arm64 macOS Python not available on GitHub Actions until 3.10,
# and 3.7 & 3.8 not available to install from uv, but can backfill 3.9 with x64 from uv
# FIXME: setup-uv issue prevents this from working, https://github.com/astral-sh/setup-uv/issues/554
# - rust: stable
# python-version: "3.9"
# platform:
# {
# os: "macos-latest",
# python-architecture: "x64",
# rust-target: "x86_64-apple-darwin",
# }
# arm64 Linux runner is in public preview, so test 3.13 on it
- rust: stable
python-version: "3.13"
Expand Down Expand Up @@ -618,12 +599,6 @@ jobs:
- os: "ubuntu-latest"
target: "x86_64-pc-windows-gnu"
flags: "-i python3.13 --features generate-import-lib"
# macos x86_64 -> aarch64
- os: "macos-13" # last x86_64 macos runners
target: "aarch64-apple-darwin"
# macos aarch64 -> x86_64
- os: "macos-latest"
target: "x86_64-apple-darwin"
# windows x86_64 -> aarch64
- os: "windows-latest"
target: "aarch64-pc-windows-msvc"
Expand Down
Loading