.github/workflows/wheel.yml #1286
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
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '30 13 * * *' | |
jobs: | |
linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
- 'quay.io/pypa/manylinux2010_i686' | |
- 'quay.io/pypa/manylinux2010_x86_64' | |
- 'quay.io/pypa/manylinux2014_aarch64' | |
- 'quay.io/pypa/manylinux2014_i686' | |
- 'quay.io/pypa/manylinux2014_x86_64' | |
py: | |
- 'cp37-cp37m' | |
- 'cp38-cp38' | |
- 'cp39-cp39' | |
- 'cp310-cp310' | |
- 'cp311-cp311' | |
exclude: | |
# manylinux2010 dropped in Python 3.11. | |
- image: 'quay.io/pypa/manylinux2010_i686' | |
py: 'cp311-cp311' | |
- image: 'quay.io/pypa/manylinux2010_x86_64' | |
py: 'cp311-cp311' | |
runs-on: 'ubuntu-22.04' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
if: ${{ matrix.image == 'quay.io/pypa/manylinux2014_aarch64' }} | |
uses: docker/setup-qemu-action@v1 | |
- name: Build Wheel | |
run: | | |
docker run -e PYPATH=/opt/python/${{ matrix.py }} -e ZSTD_WARNINGS_AS_ERRORS=1 --rm -v `pwd`:/project ${{ matrix.image }} /project/ci/build-manylinux-wheel.sh | |
- name: Upload Wheel | |
uses: actions/upload-artifact@v2 | |
with: | |
path: dist | |
macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
py: | |
- 'cp37-*' | |
- 'cp38-*' | |
- 'cp39-*' | |
- 'cp310-*' | |
- 'cp311-*' | |
arch: ['x86_64'] | |
include: | |
- py: 'cp38-*' | |
arch: 'arm64' | |
- py: 'cp39-*' | |
arch: 'arm64' | |
- py: 'cp310-*' | |
arch: 'arm64' | |
- py: 'cp311-*' | |
arch: 'arm64' | |
runs-on: 'macos-12' | |
env: | |
CIBW_ARCHS: ${{ matrix.arch }} | |
CIBW_BUILD: ${{ matrix.py }} | |
CIBW_BUILD_VERBOSITY: '1' | |
CIBW_PRERELEASE_PYTHONS: '1' | |
ZSTD_WARNINGS_AS_ERRORS: '1' | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.8' | |
if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }} | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
python -m pip install --require-hashes -r ci/requirements.macoswheels.txt | |
if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }} | |
- name: Install Dependencies | |
run: | | |
/Applications/Xcode_13.2.1.app/Contents/Developer/usr/bin/pip3 install --user --require-hashes -r ci/requirements.macoswheels.txt | |
/Applications/Xcode_13.2.1.app/Contents/Developer/usr/bin/pip3 install --user wheel | |
if: ${{ matrix.py == 'cp38-*' && matrix.arch == 'arm64' }} | |
- name: Build Wheel | |
run: | | |
cibuildwheel --output-dir dist | |
if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }} | |
- name: Build Wheel | |
run: | | |
/Applications/Xcode_13.2.1.app/Contents/Developer/usr/bin/python3 setup.py bdist_wheel | |
env: | |
_PYTHON_HOST_PLATFORM: 'macosx-11.0-arm64' | |
ARCHFLAGS: '-arch arm64' | |
MACOSX_DEPLOYMENT_TARGET: '11.0' | |
SDKROOT: '/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk' | |
if: ${{ matrix.py == 'cp38-*' && matrix.arch == 'arm64' }} | |
- name: Upload Wheel | |
uses: actions/upload-artifact@v2 | |
with: | |
path: dist | |
windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
py: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
arch: | |
- 'x86' | |
- 'x64' | |
runs-on: 'windows-2022' | |
env: | |
ZSTD_WARNINGS_AS_ERRORS: '1' | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.py }} | |
architecture: ${{ matrix.arch }} | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies | |
shell: bash | |
run: | | |
python -m pip install --require-hashes -r ci/requirements.txt | |
- name: Build Wheel | |
run: | | |
python setup.py bdist_wheel | |
- name: Upload Wheel | |
uses: actions/upload-artifact@v2 | |
with: | |
path: dist |