Skip to content

Commit

Permalink
Fix a few warts in GitHub Actions
Browse files Browse the repository at this point in the history
- Remove the macOS architecture override in pyproject.toml. I completely
  forgot about that and couldn't understand why I'm building universals
  and not testing arm64 on macos-14. As the XXX hoped for, we now have
  M1 runners, so keep it simple. As discussed in pypa/cibuildwheel#1333,
  rather do native builds (and tests) instead of universal wheels.

- The setup-python action only gained arm64 support from version 3.10.11
  onwards, so only test macos-14 on Python 3.10 to 3.12. Add macos-13
  to test the earlier versions on x86_64.

- Restore the sdist formula to the sanctioned cibuildwheel example.

- Shorten wheel job names to see what's going on on the Actions tab,
  and remove duplicate "macos" from the macOS wheel artifact names.
  • Loading branch information
ludwigschwardt committed Apr 19, 2024
1 parent 230892e commit 539cca9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-14]
os: [ubuntu-20.04, macos-13, macos-14]
python: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
# setup-python only gained arm64 from version 3.10.11 onwards
- os: macos-14
python: "3.6"
- os: macos-14
python: "3.7"
- os: macos-14
python: "3.8"
- os: macos-14
python: "3.9"
steps:
- uses: actions/checkout@v4

Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@ on:
workflow_dispatch:

jobs:
make_sdist:
name: Build SDist
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install build
- name: Build SDist
run: python -m build --sdist .
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz

build_wheel_linux:
name: Build wheels on Linux
name: Linux wheels
runs-on: ubuntu-22.04
strategy:
fail-fast: false
Expand All @@ -42,7 +41,7 @@ jobs:
path: wheelhouse/*.whl

build_wheel_macos:
name: Build wheels on macOS
name: macOS wheels
strategy:
fail-fast: false
matrix:
Expand All @@ -65,5 +64,5 @@ jobs:
CIBW_BUILD: ${{ matrix.python }}-macos*
- uses: actions/upload-artifact@v4
with:
name: wheel_macos-${{ matrix.os }}-${{ matrix.python }}
name: wheel_${{ matrix.os }}-${{ matrix.python }}
path: wheelhouse/*.whl
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ before-all = "yum install -y ncurses-devel"

[tool.cibuildwheel.macos]
before-all = "brew install ncurses"
# Support native arm64 and universal2 = Intel + ARM for Apple Silicon
# XXX (but don't test it yet - we first need some M1 runners)
archs = ["x86_64", "arm64", "universal2"]
test-skip = ["*_arm64", "*_universal2:arm64"]

0 comments on commit 539cca9

Please sign in to comment.