Skip to content

Commit

Permalink
Streamline wheel builds, skipping muslinux, and adding source distrib…
Browse files Browse the repository at this point in the history
…ution.
  • Loading branch information
robbmcleod committed Sep 12, 2023
1 parent 44561e5 commit 5de2fe3
Showing 1 changed file with 18 additions and 26 deletions.
44 changes: 18 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ name: Build
on: [push, pull_request]

env:
CIBW_BEFORE_BUILD: pip install setuptools oldest-supported-numpy
# CIBW_BUILD_VERBOSITY: 1
# CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: python -c "import sys, pyfastnoisesimd; sys.exit(0 if pyfastnoisesimd.test().wasSuccessful() else 1)"
CIBW_SKIP: "*musllinux*"

jobs:
build_wheels:
Expand All @@ -14,47 +16,37 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
cibw_build: ["cp3{8,9,10,11}-*"]
p_ver: ["3.8-3.11"]

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.10'
python-version: '3.x'

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel
- name: Build wheels for CPython 3.8
- name: Build wheels for Python
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp38-*"
CIBW_BEFORE_BUILD: pip install setuptools oldest-supported-numpy

- name: Build wheels for CPython 3.9
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp39-*"
CIBW_BEFORE_BUILD: pip install setuptools oldest-supported-numpy

- name: Build wheels for CPython 3.10
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp310-*"
CIBW_BEFORE_BUILD: pip install setuptools oldest-supported-numpy

- name: Build wheels for CPython 3.11
- name: Make sdist
if: ${{ matrix.os == 'windows-latest' }}
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp311-*"
CIBW_BEFORE_BUILD: pip install setuptools oldest-supported-numpy
python -m pip install build
python -m build --sdist --outdir wheelhouse .
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
path: ./wheelhouse/*

- name: Upload to GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: wheelhouse/*

0 comments on commit 5de2fe3

Please sign in to comment.