[WIP] Building wheels #166
Workflow file for this run
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: Build | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
env: | |
CIBW_BEFORE_BUILD: pip install setuptools oldest-supported-numpy | |
CIBW_BUILD_VERBOSITY: 3 | |
# CIBW_TEST_REQUIRES: pytest | |
CIBW_TEST_COMMAND: python -c "import sys, numexpr; sys.exit(0 if numexpr.test().wasSuccessful() else 1)" | |
CIBW_TEST_SKIP: "*macosx*arm64*" | |
CIBW_SKIP: "*musllinux*" | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} for ${{ matrix.arch }} - ${{ matrix.p_ver }} | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: write | |
env: | |
CIBW_BUILD: ${{ matrix.cibw_build }} | |
CIBW_ARCHS_LINUX: ${{ matrix.arch }} | |
CIBW_ARCHS_MACOS: ${{ matrix.arch }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
#arch: [auto64] | |
arch: [x86_64, aarch64] | |
cibw_build: ["cp3{9,10,11,12}-*"] | |
p_ver: ["3.9-3.12"] | |
exclude: | |
- os: windows-latest | |
arch: aarch64 | |
- os: macos-latest | |
arch: aarch64 | |
# include: | |
# - arch: arm64 | |
# os: macos-latest | |
# cibw_build: "cp3{9,10,11,12}-*" | |
# p_ver: "3.7-3.11" | |
# - arch: aarch64 | |
# os: ubuntu-latest | |
# cibw_build: "cp39*" | |
# p_ver: "3.9" | |
# - arch: aarch64 | |
# os: ubuntu-latest | |
# cibw_build: "cp39*" | |
# p_ver: "3.9" | |
# - arch: aarch64 | |
# os: ubuntu-latest | |
# cibw_build: "cp39*" | |
# p_ver: "3.9" | |
# - arch: aarch64 | |
# os: ubuntu-latest | |
# cibw_build: "cp310*" | |
# p_ver: "3.10" | |
# - arch: aarch64 | |
# os: ubuntu-latest | |
# cibw_build: "cp311*" | |
# p_ver: "3.11" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
name: Install Python | |
with: | |
python-version: '3.x' | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel | |
- uses: docker/setup-qemu-action@v2 | |
if: ${{ matrix.arch == 'aarch64' }} | |
name: Set up QEMU | |
- name: Build wheels (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
#CIBW_BUILD: 'cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64' | |
CIBW_TEST_REQUIRES: pytest | |
CIBW_TEST_COMMAND: python -c "import numexpr; numexpr.test()" | |
CIBW_BUILD_VERBOSITY: 1 | |
- name: Build wheels (Linux / Mac OSX) | |
if: runner.os != 'Windows' | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
# CIBW_BUILD: 'cp39-* cp310-* cp311-* cp312-*' | |
#CIBW_SKIP: '*-manylinux*_i686 *-musllinux_* ${{ env.CIBW_SKIP}}' | |
CIBW_ARCHS_LINUX: ${{ matrix.arch }} | |
CIBW_TEST_REQUIRES: pytest | |
CIBW_TEST_COMMAND: python -c "import numexpr; numexpr.test()" | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_ARCHS_MACOS: "x86_64 arm64" | |
- name: Make sdist | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
python -m pip install build | |
python -m build --sdist --outdir wheelhouse . | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/* | |
- name: Upload to GitHub Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: wheelhouse/* |