-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: fix building wheels on GHA (#118)
* 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
1 parent
ae97450
commit 174a6a8
Showing
1 changed file
with
23 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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/[email protected] | ||
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/[email protected] | ||
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 | ||
|