Test numexpr against pytest-run-parallel on 3.13t #267
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 pytest | |
CIBW_ENVIRONMENT: > | |
IS_FREETHREADED=$(python -c "import sysconfig;print(sysconfig.get_config_var('Py_GIL_DISABLED'))") | |
PYTEST_RUN_PARALLEL=$([ "$IS_FREETHREADED" == "1" ] && echo "pytest-run-parallel" || echo "") | |
PARALLEL_THREADS=$([ "$IS_FREETHREADED" == "1" ] && echo "--parallel-threads=4" || echo "") | |
CIBW_BEFORE_BUILD_LINUX: > | |
pip install setuptools oldest-supported-numpy pytest $PYTEST_RUN_PARALLEL | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_TEST_COMMAND: pytest $PARALLEL_THREADS numexpr/tests | |
CIBW_TEST_SKIP: "*macosx*arm64*" | |
# Building for musllinux and aarch64 takes way too much time. | |
# Moreover, NumPy is not providing musllinux for x86_64 either, so it's not worth it. | |
CIBW_SKIP: "*musllinux*aarch64* *musllinux*x86_64*" | |
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: "x86_64 arm64" | |
CIBW_ENABLE: true | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
arch: [x86_64, aarch64] | |
cibw_build: ["cp3{10,11,12,13,13t}-*"] | |
p_ver: ["3.10-3.13+3.13t"] | |
exclude: | |
- os: windows-latest | |
arch: aarch64 | |
# cibuild is already in charge to build aarch64 (see CIBW_ARCHS_MACOS) | |
- os: macos-latest | |
arch: aarch64 | |
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 | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
- name: Make sdist | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
python -m pip install build | |
python -m build --sdist --outdir wheelhouse . | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse/* | |
- name: Upload to GitHub Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: wheelhouse/* |