Skip to content

Commit

Permalink
CI: Add CI to test on free-threaded Python
Browse files Browse the repository at this point in the history
  • Loading branch information
andfoy committed Jun 18, 2024
1 parent 68ed81d commit aa39e74
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,74 @@ jobs:
fi
popd
test_pywavelets_linux_free_threaded:
name: linux-cp${{ matrix.python-version }}t-${{ matrix.OPTIONS_NAME }}
runs-on: ubuntu-latest
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
python-version: ["3.13t"]
MINIMUM_REQUIREMENTS: [0]
USE_SCIPY: [0]
USE_SDIST: [0]
REFGUIDE_CHECK: [0]
PIP_FLAGS: [""]
OPTIONS_NAME: ["default"]
include:
- platform_id: manylinux_x86_64
python-version: "3.10"
USE_SCIPY: 1
OPTIONS_NAME: "with-scipy"
PIP_FLAGS: "--pre -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
steps:
- name: Checkout PyWavelets
uses: actions/checkout@v4

# TODO: replace with setup-python when there is support
- uses: deadsnakes/action@6c8b9b82fe0b4344f4b98f2775fcc395df45e494 # v3.1.0
with:
python-version: '3.13-dev'
nogil: true

- name: Build package
env:
VERSION: ${{ matrix.python-version }}
MINIMUM_REQUIREMENTS: ${{ matrix.MINIMUM_REQUIREMENTS }}
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_SDIST: ${{ matrix.USE_SDIST }}
USE_SCIPY: ${{ matrix.USE_SCIPY }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
OPTIONS_NAME: ${{ matrix.OPTIONS_NAME }}
run: |
uname -a
df -h
ulimit -a
# ccache -s
which python
python --version
# sudo apt-get install libatlas-base-dev
pip install --upgrade --pre pip build
# Set numpy version first, other packages link against it
pip install ${PIP_FLAGS} cython
pip install ${PIP_FLAGS} numpy
if [ "${USE_SCIPY}" == "1" ]; then pip install ${PIP_FLAGS} scipy; fi
pip install matplotlib pytest meson-python ninja
pip install . -v --no-build-isolation
- name: Run tests
env:
USE_SDIST: ${{ matrix.USE_SDIST }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
OPTIONS_NAME: ${{ matrix.OPTIONS_NAME }}
PYTHON_GIL: 0
run: |
set -o pipefail
# Move out of source directory to avoid finding local pywt
pushd demo
pytest --pyargs pywt
popd
test_pywavelets_macos:
name: macos-cp${{ matrix.python-version }}-${{ matrix.OPTIONS_NAME }}
runs-on: macos-latest
Expand Down

0 comments on commit aa39e74

Please sign in to comment.