312 wheels #124
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
name: CI | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
release: | |
types: published | |
jobs: | |
tar_gz: | |
name: Package | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@master | |
with: | |
python-version: 3.12 | |
- run: pip install -r requirements-build-3_12.txt | |
- run: python setup.py sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
whl_3_8: | |
name: Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13, ubuntu-22.04, windows-2022] | |
minor: [8] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@master | |
- run: echo '::add-matcher::.github/problem-matchers/gcc.json' | |
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-22.04' | |
- run: echo '::add-matcher::.github/problem-matchers/msvc.json' | |
if: matrix.os == 'windows-2022' | |
- uses: pypa/[email protected] | |
with: | |
output-dir: dist | |
env: | |
CIBW_BUILD: cp3${{ matrix.minor }}-* | |
CIBW_ARCHS_WINDOWS: x86 AMD64 | |
CIBW_ARCHS_MACOS: x86_64 universal2 arm64 | |
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_08.txt | |
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_08.txt | |
CIBW_TEST_COMMAND: pytest {project} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
whl_gte_3_9_to_3_11: | |
name: Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13, ubuntu-22.04, windows-2022] | |
minor: [9, 10, 11] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@master | |
- run: echo '::add-matcher::.github/problem-matchers/gcc.json' | |
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-22.04' | |
- run: echo '::add-matcher::.github/problem-matchers/msvc.json' | |
if: matrix.os == 'windows-2022' | |
- uses: pypa/[email protected] | |
with: | |
output-dir: dist | |
env: | |
CIBW_BUILD: cp3${{ matrix.minor }}-* | |
CIBW_ARCHS_WINDOWS: x86 AMD64 | |
CIBW_ARCHS_MACOS: x86_64 universal2 arm64 | |
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_11.txt | |
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_11.txt | |
CIBW_TEST_COMMAND: pytest {project} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
whl_3_12: | |
name: Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13, ubuntu-22.04, windows-2022] | |
minor: [12] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@master | |
- run: echo '::add-matcher::.github/problem-matchers/gcc.json' | |
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-22.04' | |
- run: echo '::add-matcher::.github/problem-matchers/msvc.json' | |
if: matrix.os == 'windows-2022' | |
- uses: pypa/[email protected] | |
with: | |
output-dir: dist | |
env: | |
CIBW_BUILD: cp3${{ matrix.minor }}-* | |
CIBW_ARCHS_WINDOWS: x86 AMD64 | |
CIBW_ARCHS_MACOS: x86_64 universal2 arm64 | |
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_12.txt | |
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_12.txt | |
CIBW_TEST_COMMAND: pytest {project} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
upload: | |
name: Publish | |
if: github.event_name == 'release' && github.event.action == 'published' | |
needs: [tar_gz, whl_3_8, whl_gte_3_9_to_3_11, whl_3_12] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_TOKEN }} | |
skip_existing: true |