Skip to content

Commit

Permalink
CI: fix building wheels on GHA (#118)
Browse files Browse the repository at this point in the history
* ci: fix wheel build command

* ci: remove references to submodules

* ci: fix sdist command and remove Python 3.6 from the matrix

* ci: slightly alter invocation

* ci: disable emulation

* ci: smaller matrix

* ci: use a small matrix but with all python versions

* ci: use manylinux 2010 for CPython 3.9+

* ci: split again matrix per python version given how slow emulation is

Fix also the artifact upload

* ci: fix typo

* ci: typo
  • Loading branch information
MatthieuDartiailh committed Aug 27, 2021
1 parent ae97450 commit 174a6a8
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Test sdist
run: |
pip install pytest
pip install --no-index --find-links dist atom
pip install --no-index --find-links dist kiwisolver
cd ..
python -m pytest kiwi/py/tests
- name: Store artifacts
Expand All @@ -43,49 +43,54 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: [cp36, cp37, cp38, cp39, cp310, pp37]
python: [cp37, cp38, cp39, cp310, pp3.7]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update repo
run: |
git submodule update --init
cd kiwi
git checkout ${{ env.BUILD_COMMIT }}
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
python -m pip install wheel cibuildwheel
python-version: '3.9'
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.1.1
if: matrix.python == 'cp37' || matrix.python == 'cp38'
env:
CIBW_BUILD: ${{ matrix.python }}-*
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
# configure cibuildwheel to build native archs ('auto'), and some
# emulated ones
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: python -m pytest {package}/py/tests -v
# Move to 2010 or 2014 when matplotlib does
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
CIBW_MANYLINUX_I686_IMAGE: manylinux1
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: python -m pytest {package}/py/tests -v
# Do not link against VC2014_1 on Windows
KIWI_DISABLE_FH4: 1
- name: Build wheels
uses: pypa/cibuildwheel@v2.1.1
if: matrix.python != 'cp37' && matrix.python != 'cp38'
env:
CIBW_BUILD: "cp39-* cp310-* pp37-*"
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
# configure cibuildwheel to build native archs ('auto'), and some
# emulated ones
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: python -m pytest {package}/py/tests -v
# Do not link against VC2014_1 on Windows
KIWI_DISABLE_FH4: 1
run: |
python -m cibuildwheel kiwi --output-dir dist
- name: Store artifacts
uses: actions/upload-artifact@v2
with:
name: artifact
path: dist/*.whl
path: ./wheelhouse/*.whl

release_upload:
name: Create Release and Upload Release Asset
Expand Down

0 comments on commit 174a6a8

Please sign in to comment.