BhavyeMathur building wheels #5
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
# This workflow builds Python wheels & a source distribution for goopylib | |
name: "Build Wheels" | |
run-name: ${{ github.actor }} building wheels | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: [ Build Binary ] | |
types: | |
- completed | |
push: | |
paths: | |
- goopylib/**/*.cpp | |
- setup.py | |
- tools/setup_extensions.py | |
- pyproject.toml | |
- MANIFEST.in | |
- .github/workflows/build-wheels.yml | |
pull_request: | |
paths: | |
- goopylib/**/*.cpp | |
- CMakeLists.txt | |
- setup.py | |
- tools/setup_extensions.py | |
- pyproject.toml | |
- MANIFEST.in | |
- .github/workflows/build-wheels.yml | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build-source-distribution: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Install dependencies | |
run: python -m pip install build | |
- name: Create source distribution | |
run: python -m build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: goopylib-source-distribution | |
path: dist/ | |
build-wheels: | |
name: Build ${{ matrix.os }} Python wheels | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ windows-latest, macos-latest ] | |
python: [ "cp38-", "cp39-", "cp310-", "cp311-" ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Build Python wheels | |
env: | |
CIBW_BUILD: ${{ matrix.python }}* | |
uses: pypa/[email protected] | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: goopylib-${{ matrix.python }}${{ matrix.os }}-wheels | |
path: wheelhouse/ |