-
-
Notifications
You must be signed in to change notification settings - Fork 482
250 lines (233 loc) · 7.99 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
name: Test
on:
push:
branches:
- master
- v1.**
pull_request:
branches:
- master
- v1.**
jobs:
test_pywavelets_linux:
name: linux-cp${{ matrix.python-version }}-${{ matrix.OPTIONS_NAME }}
runs-on: ubuntu-latest
env:
MPLBACKEND: Agg
CYTHON_TRACE: 1
CYTHONSPEC: cython
NUMPY_MIN: numpy==1.22.4
CYTHON_MIN: cython==0.29.35
SCIPY_MIN: scipy==1.8.0
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
python-version: [3.9, '3.10', '3.11', '3.12-dev']
MINIMUM_REQUIREMENTS: [0]
USE_SCIPY: [0]
USE_SDIST: [0]
USE_WHEEL: [0]
REFGUIDE_CHECK: [0]
PIP_FLAGS: [""]
OPTIONS_NAME: ["default"]
include:
- platform_id: manylinux_x86_64
python-version: 3.9
MINIMUM_REQUIREMENTS: 1
OPTIONS_NAME: "minimum-req"
- platform_id: manylinux_x86_64
python-version: 3.9
USE_SCIPY: 1
OPTIONS_NAME: "with-scipy"
- platform_id: manylinux_x86_64
python-version: 3.9
USE_SDIST: 1
OPTIONS_NAME: "install-from-sdist"
- platform_id: manylinux_x86_64
python-version: 3.9
USE_WHEEL: 1
OPTIONS_NAME: "install-from-wheel"
- platform_id: manylinux_x86_64
python-version: '3.11'
PIP_FLAGS: "--pre"
OPTIONS_NAME: "pre-releases"
- platform_id: manylinux_x86_64
python-version: '3.12-dev'
CIBW_ENVIRONMENT: PIP_PRE=1
OPTIONS_NAME: "pre-releases"
exclude:
- python-version: '3.12-dev'
PIP_FLAGS: [""]
steps:
- name: Checkout PyWavelets
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version}}
- name: Build package
env:
VERSION: ${{ matrix.python-version }}
MINIMUM_REQUIREMENTS: ${{ matrix.MINIMUM_REQUIREMENTS }}
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
USE_SCIPY: ${{ matrix.USE_SCIPY }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
run: |
uname -a
df -h
ulimit -a
# ccache -s
which python
python --version
# sudo apt-get install libatlas-base-dev
pip install --upgrade pip build
# Set numpy version first, other packages link against it
if [ "${MINIMUM_REQUIREMENTS}" == "1" ]; then
pip install ${CYTHON_MIN}
pip install ${NUMPY_MIN}
if [ "${USE_SCIPY}" == "1" ]; then pip install ${SCIPY_MIN}; fi
else
pip install cython
pip install numpy
if [ "${USE_SCIPY}" == "1" ]; then pip install scipy; fi
fi
pip install matplotlib pytest
set -o pipefail
if [ "${USE_WHEEL}" == "1" ]; then
# Need verbose output or TravisCI will terminate after 10 minutes
pip wheel . -v
pip install pywavelets*.whl
elif [ "${USE_SDIST}" == "1" ]; then
python -m build --sdist
pip install dist/pyw*.tar.gz -v
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
pip install sphinx numpydoc
pip install . -v
else
pip install . -v
fi
- name: Run tests
env:
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
run: |
set -o pipefail
# Move out of source directory to avoid finding local pywt
pushd demo
if [ "${USE_WHEEL}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${USE_SDIST}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
python util/refguide_check.py --doctests
else
pytest --pyargs pywt
fi
popd
test_pywavelets_macos:
name: macos-cp${{ matrix.python-version }}-${{ matrix.OPTIONS_NAME }}
runs-on: macos-latest
env:
MPLBACKEND: Agg
CYTHON_TRACE: 1
CYTHONSPEC: cython
NUMPY_MIN: numpy==1.22.4
CYTHON_MIN: cython==0.29.35
SCIPY_MIN: scipy==1.8.0
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
python-version: [3.9, '3.11', '3.12-dev']
MINIMUM_REQUIREMENTS: [0]
USE_SCIPY: [0]
USE_SDIST: [0]
USE_WHEEL: [0]
REFGUIDE_CHECK: [0]
PIP_FLAGS: [""]
OPTIONS_NAME: ["default"]
include:
- python-version: '3.9'
MINIMUM_REQUIREMENTS: 1
OPTIONS_NAME: "osx-minimum-req"
- python-version: '3.11'
PIP_FLAGS: "--pre"
OPTIONS_NAME: "pre-releases"
- python-version: '3.12-dev'
PIP_FLAGS: "--pre"
OPTIONS_NAME: "pre-releases"
steps:
- name: Checkout PyWavelets
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version}}
- name: Build package
env:
VERSION: ${{ matrix.python-version }}
MINIMUM_REQUIREMENTS: ${{ matrix.MINIMUM_REQUIREMENTS }}
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
USE_SCIPY: ${{ matrix.USE_SCIPY }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
CC: /usr/bin/clang
CXX: /usr/bin/clang++
run: |
uname -a
df -h
ulimit -a
which python
python --version
pip install --upgrade pip build
# Set numpy version first, other packages link against it
if [ "${MINIMUM_REQUIREMENTS}" == "1" ]; then
pip install ${CYTHON_MIN} ${NUMPY_MIN}
if [ "${USE_SCIPY}" == "1" ]; then pip install ${SCIPY_MIN}; fi
else
pip install cython numpy
if [ "${USE_SCIPY}" == "1" ]; then pip install scipy; fi
fi
pip install matplotlib pytest
set -o pipefail
if [ "${USE_WHEEL}" == "1" ]; then
pip wheel . -v
pip install pywavelets*.whl -v
elif [ "${USE_SDIST}" == "1" ]; then
python -m build --sdist
pip install pywavelets* -v
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
pip install sphinx numpydoc
pip install . -v
else
pip install . -v
fi
- name: Run tests
env:
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
run: |
# Move out of source directory to avoid finding local pywt
pushd demo
if [ "${USE_WHEEL}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${USE_SDIST}" == "1" ]; then
pytest --pyargs pywt
python ../pywt/tests/test_doc.py
elif [ "${REFGUIDE_CHECK}" == "1" ]; then
python util/refguide_check.py --doctests
else
pytest --pyargs pywt
fi
popd