Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for more wheels #167

Merged
merged 7 commits into from
Nov 21, 2021
Merged
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
100 changes: 90 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,42 @@ env:
CIBW_TEST_COMMAND: pytest {project}/test/PyGLM_test.py -v

jobs:
build_wheels_win_mac:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
build_wheels_windows:
name: Build wheels on Windows (${{ matrix.arch }})
runs-on: windows-latest
strategy:
matrix:
os: [macos-latest, windows-latest]
arch: [AMD64, x86]

env:
CIBW_ARCHS: ${{matrix.arch}}

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.10'

- name: Build wheels
uses: pypa/cibuildwheel@v2.2.2

- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

build_wheels_mac:
name: Build wheels on MacOS (${{ matrix.arch }})
runs-on: macos-latest
strategy:
matrix:
arch: [x86_64, arm64]

env:
CIBW_ARCHS: ${{matrix.arch}}

steps:
- uses: actions/checkout@v2
Expand All @@ -28,35 +58,85 @@ jobs:
python-version: '3.10'

- name: Build wheels
uses: pypa/cibuildwheel@v2.1.3
uses: pypa/cibuildwheel@v2.2.2

- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

build_wheels_manylinux:
name: Build wheels on ${{ matrix.distro }}
name: Build wheels on ${{ matrix.distro }} for ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
matrix:
distro: [manylinux2010, manylinux_2_24]
arch: [x86_64, i686]
include:
- distro: manylinux_2_24
arch: aarch64
- distro: manylinux_2_24
arch: s390x

env:
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.distro }}
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.distro }}
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.distro }}
CIBW_MANYLINUX_S390X_IMAGE: ${{ matrix.distro }}
CIBW_BUILD: cp3*-manylinux*
CIBW_ARCHS: ${{matrix.arch}}

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Set up QEMU
if: ${{ matrix.arch != 'x86_64' && matrix.arch != 'i686' }}
uses: docker/setup-qemu-action@v1

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.10'

- name: Build wheels
uses: pypa/cibuildwheel@v2.2.2

- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

build_wheels_musllinux:
name: Build wheels on musllinux_1_1 for ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64, i686, aarch64, s390x]

env:
CIBW_MUSLLINUX_X86_64_IMAGE: musllinux_1_1
CIBW_MUSLLINUX_I686_IMAGE: musllinux_1_1
CIBW_MUSLLINUX_AARCH64_IMAGE: musllinux_1_1
CIBW_MUSLLINUX_S390X_IMAGE: musllinux_1_1
CIBW_BUILD: cp3*-musllinux*
CIBW_ARCHS: ${{matrix.arch}}

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Set up QEMU
if: ${{ matrix.arch != 'x86_64' && matrix.arch != 'i686' }}
uses: docker/setup-qemu-action@v1

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.10'

- name: Build wheels
uses: pypa/cibuildwheel@v2.1.3
uses: pypa/cibuildwheel@v2.2.2

- uses: actions/upload-artifact@v2
with:
Expand All @@ -83,7 +163,7 @@ jobs:
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels_win_mac, build_wheels_manylinux, build_sdist]
needs: [build_wheels_windows, build_wheels_mac, build_wheels_manylinux, build_wheels_musllinux, build_sdist]
runs-on: ubuntu-latest

#if: github.event_name == 'release' && github.event.action == 'published'
Expand All @@ -98,5 +178,5 @@ jobs:
with:
user: __token__
password: ${{ secrets.pypi_password }}
#password: ${{ secrets.testpypi_password }}
#repository_url: https://test.pypi.org/legacy/
# password: ${{ secrets.testpypi_password }}
# repository_url: https://test.pypi.org/legacy/