13
# avoid duplicate runs on both pushes and PRs
14
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15
cancel-in-progress: true
18
# Coloured output for GitHub Actions
20
# Some common environment variables for both GNU/Linux and macOS jobs
24
NUMPY_MIN: numpy==1.23.0
25
CYTHON_MIN: cython==3.0.4
26
SCIPY_MIN: scipy==1.9.0
29
test_pywavelets_linux:
30
name: linux-cp${{ matrix.python-version }}-${{ matrix.OPTIONS_NAME }}
31
runs-on: ubuntu-latest
33
# Ensure that a wheel builder finishes even if another fails
36
python-version: ["3.10", "3.11", "3.12"]
37
MINIMUM_REQUIREMENTS: [0]
42
OPTIONS_NAME: ["default"]
44
- platform_id: manylinux_x86_64
45
python-version: "3.10"
46
MINIMUM_REQUIREMENTS: 1
47
OPTIONS_NAME: "minimum-req"
48
- platform_id: manylinux_x86_64
49
python-version: "3.10"
51
OPTIONS_NAME: "with-scipy"
52
- platform_id: manylinux_x86_64
53
python-version: "3.10"
55
OPTIONS_NAME: "install-from-sdist"
56
- platform_id: manylinux_x86_64
57
python-version: "3.12"
59
OPTIONS_NAME: "pre-releases"
60
- platform_id: manylinux_x86_64
61
python-version: "3.12"
62
OPTIONS_NAME: "editable-install"
64
- name: Checkout PyWavelets
65
uses: actions/checkout@v4
68
uses: actions/setup-python@v5
70
python-version: ${{ matrix.python-version}}
71
allow-prereleases: true
75
VERSION: ${{ matrix.python-version }}
76
MINIMUM_REQUIREMENTS: ${{ matrix.MINIMUM_REQUIREMENTS }}
77
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
78
USE_SDIST: ${{ matrix.USE_SDIST }}
79
USE_SCIPY: ${{ matrix.USE_SCIPY }}
80
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
81
OPTIONS_NAME: ${{ matrix.OPTIONS_NAME }}
89
# sudo apt-get install libatlas-base-dev
90
pip install --upgrade pip build
91
# Set numpy version first, other packages link against it
92
if [ "${MINIMUM_REQUIREMENTS}" == "1" ]; then
93
pip install ${CYTHON_MIN}
94
pip install ${NUMPY_MIN}
95
if [ "${USE_SCIPY}" == "1" ]; then pip install ${SCIPY_MIN}; fi
97
pip install ${PIP_FLAGS} cython
98
pip install ${PIP_FLAGS} numpy
99
if [ "${USE_SCIPY}" == "1" ]; then pip install ${PIP_FLAGS} scipy; fi
101
pip install ${PIP_FLAGS} matplotlib pytest
104
if [ "${USE_SDIST}" == "1" ]; then
105
python -m build --sdist
106
pip install dist/pyw*.tar.gz -v
107
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
108
pip install sphinx numpydoc scipy-doctest
114
if [ "${OPTIONS_NAME}" == "editable-install" ]; then
115
pip install meson-python>=0.16.0 matplotlib pytest ninja
116
pip install -e . --no-build-isolation
121
USE_SDIST: ${{ matrix.USE_SDIST }}
122
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
123
OPTIONS_NAME: ${{ matrix.OPTIONS_NAME }}
126
# Move out of source directory to avoid finding local pywt
128
if [ "${USE_SDIST}" == "1" ]; then
130
python ../pywt/tests/test_doc.py
131
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
133
pytest --doctest-modules --pyargs pywt -v --doctest-collect=api
134
# Run Sphinx HTML docs builder, converting warnings to errors
135
# Move back out of demo/ to root directory
137
pip install -r util/readthedocs/requirements.txt
138
sphinx-build -b html -W --keep-going -d _build/doctrees doc/source doc/build
144
test_pywavelets_linux_free_threaded:
145
name: linux-cp313t-with-scipy
146
runs-on: ubuntu-latest
148
# Ensure that a wheel builder finishes even if another fails
152
- name: Checkout PyWavelets
153
uses: actions/checkout@v4
155
# TODO: replace with setup-python when there is support
156
- uses: deadsnakes/action@6c8b9b82fe0b4344f4b98f2775fcc395df45e494 # v3.1.0
158
python-version: "3.13-dev"
161
- name: Build package
165
pip install --upgrade pip build
166
# We need nightly wheels for free-threaded support and latest fixes
167
pip install --pre -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython numpy scipy
168
pip install pytest meson-python ninja
169
pip install . -v --no-build-isolation
175
# Move out of source directory to avoid finding local pywt
179
test_pywavelets_macos:
180
name: macos-cp${{ matrix.python-version }}-${{ matrix.OPTIONS_NAME }}
181
runs-on: macos-latest
183
# Ensure that a wheel builder finishes even if another fails
186
python-version: ["3.10", "3.12"]
187
MINIMUM_REQUIREMENTS: [0]
192
OPTIONS_NAME: ["default"]
194
- python-version: "3.10"
195
MINIMUM_REQUIREMENTS: 1
196
OPTIONS_NAME: "osx-minimum-req"
197
- python-version: "3.12"
199
OPTIONS_NAME: "pre-releases"
202
- name: Checkout PyWavelets
203
uses: actions/checkout@v4
206
uses: actions/setup-python@v5
208
python-version: ${{ matrix.python-version}}
209
allow-prereleases: true
211
- name: Build package
213
VERSION: ${{ matrix.python-version }}
214
MINIMUM_REQUIREMENTS: ${{ matrix.MINIMUM_REQUIREMENTS }}
215
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
216
USE_SDIST: ${{ matrix.USE_SDIST }}
217
USE_SCIPY: ${{ matrix.USE_SCIPY }}
218
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
220
CXX: /usr/bin/clang++
227
pip install --upgrade pip build
228
# Set numpy version first, other packages link against it
229
if [ "${MINIMUM_REQUIREMENTS}" == "1" ]; then
230
pip install ${CYTHON_MIN} ${NUMPY_MIN}
231
if [ "${USE_SCIPY}" == "1" ]; then pip install ${SCIPY_MIN}; fi
233
pip install ${PIP_FLAGS} cython numpy
234
if [ "${USE_SCIPY}" == "1" ]; then pip install ${PIP_FLAGS} scipy; fi
236
pip install ${PIP_FLAGS} matplotlib pytest
239
if [ "${USE_SDIST}" == "1" ]; then
240
python -m build --sdist
241
pip install pywavelets* -v
242
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
243
pip install sphinx numpydoc scipy-doctest
251
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
252
USE_SDIST: ${{ matrix.USE_SDIST }}
253
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
255
# Move out of source directory to avoid finding local pywt
257
if [ "${USE_SDIST}" == "1" ]; then
259
python ../pywt/tests/test_doc.py
260
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
261
# doctests docstrings
262
pytest --doctest-modules --pyargs pywt -v --doctest-collect=api
263
pytest --doctest-modules --pyargs pywt.data -v