Skip to content

Commit c8360b8

Browse files
committed
Split macOS build into a matrix of jobs.
1 parent ea1e337 commit c8360b8

1 file changed

Lines changed: 11 additions & 22 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -222,40 +222,30 @@ jobs:
222222
twine upload --skip-existing wheelhouse/*
223223
224224
build-macos:
225-
runs-on: ${{ matrix.os }}
225+
runs-on: "macos-10.15"
226226
strategy:
227+
fail-fast: true
227228
matrix:
228-
os: ["macos-10.15"]
229-
python-version: ["3.x"]
229+
python: ["cp38-*_universal2", "cp38-*_x86_64", "cp38-*_arm64", "pp37-*"]
230230
steps:
231231
# v2 breaks `git describe` so v1 is needed.
232232
# https://github.com/actions/checkout/issues/272
233233
- uses: actions/checkout@v1
234234
- name: Checkout submodules
235-
run: |
236-
git submodule update --init --recursive --depth 1
235+
run: git submodule update --init --recursive --depth 1
237236
- name: Print git describe
238-
run: |
239-
git describe
240-
- name: Set up Python ${{ matrix.python-version }}
241-
uses: actions/setup-python@v2
242-
with:
243-
python-version: ${{ matrix.python-version }}
237+
run: git describe
244238
- name: Install Python dependencies
245-
run: |
246-
python -m pip install --upgrade pip
247-
pip install wheel twine
248-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
249-
- name: Prepare package.
239+
run: pip3 install wheel twine -r requirements.txt
240+
- name: Prepare package
250241
# Downloads SDL2 for the later step.
251-
run: |
252-
python setup.py check
242+
run: python3 setup.py check
253243
- name: Build wheels
254244
uses: pypa/cibuildwheel@v2.0.0a4
255245
env:
256-
CIBW_BUILD: cp38-* pp*
246+
CIBW_BUILD: ${{ matrix.python }}
257247
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
258-
CIBW_BEFORE_BUILD_MACOS: pip install --force-reinstall git+https://github.com/matthew-brett/delocate.git@1c07b50
248+
CIBW_BEFORE_BUILD_MACOS: pip install --upgrade delocate
259249
CIBW_BEFORE_TEST: pip install numpy
260250
CIBW_TEST_COMMAND: python -c "import tcod"
261251
CIBW_TEST_SKIP: "pp* *-macosx_arm64 *-macosx_universal2:arm64"
@@ -270,5 +260,4 @@ jobs:
270260
env:
271261
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
272262
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
273-
run: |
274-
twine upload --skip-existing wheelhouse/*
263+
run: twine upload --skip-existing wheelhouse/*

0 commit comments

Comments
 (0)