|
11 | 11 | strategy:
|
12 | 12 | # Duplicate changes to this matrix to 'poc_tests'
|
13 | 13 | matrix:
|
14 |
| - os: [ubuntu-latest, macos-11, windows-latest] |
15 |
| - python-version: ['3.9', '3.10'] |
| 14 | + os: [macos-11, macos-12, macos-13, macos-14] |
| 15 | + python-version: ['3.10'] |
16 | 16 | compiler: [""]
|
17 |
| - include: |
18 |
| - - os: ubuntu-latest |
19 |
| - python-version: '3.8' |
20 |
| - - os: ubuntu-latest |
21 |
| - python-version: '3.10' |
22 |
| - compiler: 'g++' |
23 |
| - - os: ubuntu-latest |
24 |
| - python-version: '3.11' |
25 |
| - - os: ubuntu-latest |
26 |
| - python-version: '3.12' |
27 | 17 |
|
28 | 18 | steps:
|
29 | 19 | - uses: actions/checkout@v4
|
@@ -57,370 +47,3 @@ jobs:
|
57 | 47 | run: |
|
58 | 48 | python -m pip install pytest pytest-xdist filelock
|
59 | 49 | python -m pytest --basetemp=.tmpdir --durations=16 -n auto test/
|
60 |
| -
|
61 |
| - main_tests_debug: |
62 |
| - name: Main tests on CPython debug builds |
63 |
| - runs-on: ${{ matrix.os }} |
64 |
| - strategy: |
65 |
| - matrix: |
66 |
| - os: [ubuntu-latest] |
67 |
| - python-version: ['3.12', '3.11', '3.10', '3.9', '3.8'] |
68 |
| - |
69 |
| - steps: |
70 |
| - - uses: actions/checkout@v4 |
71 |
| - |
72 |
| - - name: Set up Python from deadsnakes |
73 |
| - uses: deadsnakes/[email protected] # Upgrading will cause test failures. |
74 |
| - with: |
75 |
| - python-version: ${{ matrix.python-version }} |
76 |
| - debug: true |
77 |
| - |
78 |
| - - name: Check Python debug build |
79 |
| - run: python -c "import sys; print(hasattr(sys, 'gettotalrefcount'))" |
80 |
| - |
81 |
| - - name: Install/Upgrade Python dependencies |
82 |
| - run: python -m pip install --upgrade pip wheel |
83 |
| - |
84 |
| - - name: Build |
85 |
| - run: | |
86 |
| - make |
87 |
| - python -m pip install . |
88 |
| -
|
89 |
| - - name: Run tests |
90 |
| - run: | |
91 |
| - python -m pip install pytest pytest-xdist filelock |
92 |
| - python -m pytest --durations=16 -n auto test/ |
93 |
| -
|
94 |
| - poc_tests: |
95 |
| - name: Proof of concept tests |
96 |
| - runs-on: ${{ matrix.os }} |
97 |
| - strategy: |
98 |
| - matrix: |
99 |
| - os: [ubuntu-latest, macos-11, windows-latest] |
100 |
| - python-version: ['3.10'] |
101 |
| - include: |
102 |
| - - os: ubuntu-latest |
103 |
| - python-version: '3.8' |
104 |
| - - os: ubuntu-latest |
105 |
| - python-version: '3.9' |
106 |
| - - os: ubuntu-latest |
107 |
| - python-version: '3.11' |
108 |
| - - os: ubuntu-latest |
109 |
| - python-version: '3.12' |
110 |
| - |
111 |
| - steps: |
112 |
| - - uses: actions/checkout@v4 |
113 |
| - |
114 |
| - # - template: azure-templates/ccache.yml |
115 |
| - # parameters: |
116 |
| - # pythonVersion: $(python.version) |
117 |
| - # - template: azure-templates/python.yml |
118 |
| - # parameters: |
119 |
| - # pythonVersion: $(python.version) |
120 |
| - |
121 |
| - - name: Set up Python |
122 |
| - uses: actions/setup-python@v5 |
123 |
| - with: |
124 |
| - python-version: ${{ matrix.python-version }} |
125 |
| - allow-prereleases: true |
126 |
| - |
127 |
| - - name: Install/Upgrade Python dependencies |
128 |
| - run: python -m pip install --upgrade pip wheel |
129 |
| - shell: bash |
130 |
| - |
131 |
| - - name: 'Test setup.py --hpy-abi=cpython bdist_wheel' |
132 |
| - run: proof-of-concept/test_pof.sh wheel cpython |
133 |
| - shell: bash |
134 |
| - |
135 |
| - - name: 'Test setup.py --hpy-abi=universal bdist_wheel' |
136 |
| - run: proof-of-concept/test_pof.sh wheel universal |
137 |
| - shell: bash |
138 |
| - |
139 |
| - - name: 'Test setup.py --hpy-abi=cpython install' |
140 |
| - run: proof-of-concept/test_pof.sh setup_py_install cpython |
141 |
| - shell: bash |
142 |
| - |
143 |
| - - name: 'Test setup.py --hpy-abi=universal install' |
144 |
| - run: proof-of-concept/test_pof.sh setup_py_install universal |
145 |
| - shell: bash |
146 |
| - |
147 |
| - - name: 'Test setup.py --hpy-abi=cpython build_ext --inplace' |
148 |
| - run: proof-of-concept/test_pof.sh setup_py_build_ext_inplace cpython |
149 |
| - shell: bash |
150 |
| - |
151 |
| - - name: 'Test setup.py --hpy-abi=universal build_ext --inplace' |
152 |
| - run: proof-of-concept/test_pof.sh setup_py_build_ext_inplace universal |
153 |
| - shell: bash |
154 |
| - |
155 |
| - |
156 |
| - porting_example_tests: |
157 |
| - name: Porting example tests |
158 |
| - runs-on: ${{ matrix.os }} |
159 |
| - continue-on-error: true |
160 |
| - strategy: |
161 |
| - matrix: |
162 |
| - os: [ubuntu-latest, macos-11, windows-latest] |
163 |
| - python-version: ['3.9'] |
164 |
| - |
165 |
| - steps: |
166 |
| - - uses: actions/checkout@v4 |
167 |
| - |
168 |
| - - name: Set up Python |
169 |
| - uses: actions/setup-python@v5 |
170 |
| - with: |
171 |
| - python-version: ${{ matrix.python-version }} |
172 |
| - |
173 |
| - - name: Install/Upgrade Python dependencies |
174 |
| - run: python -m pip install --upgrade pip wheel |
175 |
| - shell: bash |
176 |
| - |
177 |
| - - name: Install HPy |
178 |
| - run: python -m pip install . |
179 |
| - |
180 |
| - - name: Install pytest |
181 |
| - run: | |
182 |
| - python -m pip install pytest |
183 |
| -
|
184 |
| - - name: Run tests |
185 |
| - run: make porting-example-tests |
186 |
| - shell: bash |
187 |
| - |
188 |
| - - name: Run tests of completed port in debug mode |
189 |
| - env: |
190 |
| - HPY_DEBUG: "1" |
191 |
| - TEST_ARGS: "-s -k hpy_final" |
192 |
| - run: make porting-example-tests |
193 |
| - shell: bash |
194 |
| - |
195 |
| - |
196 |
| - valgrind_tests_1: |
197 |
| - name: 'Valgrind tests (1/3)' |
198 |
| - uses: ./.github/workflows/valgrind-tests.yml |
199 |
| - with: |
200 |
| - portion: '1/3' |
201 |
| - |
202 |
| - |
203 |
| - valgrind_tests_2: |
204 |
| - name: 'Valgrind tests (2/3)' |
205 |
| - uses: ./.github/workflows/valgrind-tests.yml |
206 |
| - with: |
207 |
| - portion: '2/3' |
208 |
| - |
209 |
| - |
210 |
| - valgrind_tests_3: |
211 |
| - name: 'Valgrind tests (3/3)' |
212 |
| - uses: ./.github/workflows/valgrind-tests.yml |
213 |
| - with: |
214 |
| - portion: '3/3' |
215 |
| - |
216 |
| - |
217 |
| - docs_examples_tests: |
218 |
| - name: Documentation examples tests |
219 |
| - runs-on: ${{ matrix.os }} |
220 |
| - strategy: |
221 |
| - matrix: |
222 |
| - os: [ubuntu-latest, macos-11, windows-latest] |
223 |
| - python-version: ['3.10'] |
224 |
| - |
225 |
| - steps: |
226 |
| - - uses: actions/checkout@v4 |
227 |
| - |
228 |
| - - name: Set up Python |
229 |
| - uses: actions/setup-python@v5 |
230 |
| - with: |
231 |
| - python-version: ${{ matrix.python-version }} |
232 |
| - |
233 |
| - - name: Install/Upgrade Python dependencies |
234 |
| - run: python -m pip install --upgrade pip wheel |
235 |
| - shell: bash |
236 |
| - |
237 |
| - - name: Install HPy |
238 |
| - run: python -m pip install . |
239 |
| - |
240 |
| - - name: Install pytest |
241 |
| - run: | |
242 |
| - python -m pip install pytest pytest-xdist filelock |
243 |
| - - name: Run tests |
244 |
| - run: make docs-examples-tests |
245 |
| - shell: bash |
246 |
| - |
247 |
| - build_docs: |
248 |
| - name: Build documentation |
249 |
| - runs-on: 'ubuntu-latest' |
250 |
| - steps: |
251 |
| - - uses: actions/checkout@v4 |
252 |
| - |
253 |
| - # - template: azure-templates/python.yml |
254 |
| - |
255 |
| - - name: Install / Upgrade system requirements |
256 |
| - run: sudo apt update && sudo apt install -y libclang-11-dev |
257 |
| - |
258 |
| - - name: Install / Upgrade Python requirements |
259 |
| - run: | |
260 |
| - python -m pip install --upgrade pip |
261 |
| - python -m pip install -r docs/requirements.txt |
262 |
| -
|
263 |
| - - name: Build docs |
264 |
| - run: | |
265 |
| - cd docs; |
266 |
| - python -m sphinx -T -W -E -b html -d _build/doctrees -D language=en . _build/html |
267 |
| -
|
268 |
| - - name: Upload built HTML files |
269 |
| - uses: actions/upload-artifact@v4 |
270 |
| - with: |
271 |
| - name: hpy_html_docs |
272 |
| - path: docs/_build/html/* |
273 |
| - if-no-files-found: error |
274 |
| - retention-days: 5 |
275 |
| - |
276 |
| - c_tests: |
277 |
| - name: C tests |
278 |
| - runs-on: 'ubuntu-latest' |
279 |
| - steps: |
280 |
| - - uses: actions/checkout@v4 |
281 |
| - - run: make -C c_test |
282 |
| - |
283 |
| - |
284 |
| - check_autogen: |
285 |
| - name: Check autogen |
286 |
| - runs-on: 'ubuntu-latest' |
287 |
| - steps: |
288 |
| - - uses: actions/checkout@v4 |
289 |
| - |
290 |
| - # - template: azure-templates/python.yml |
291 |
| - |
292 |
| - - name: Set up Python |
293 |
| - uses: actions/setup-python@v5 |
294 |
| - with: |
295 |
| - # autogen needs distutils |
296 |
| - python-version: '3.11' |
297 |
| - |
298 |
| - - name: Install/Upgrade Python dependencies |
299 |
| - run: python -m pip install --upgrade pip wheel |
300 |
| - |
301 |
| - - name: Install autogen dependencies |
302 |
| - run: pip install -r requirements-autogen.txt |
303 |
| - |
304 |
| - - name: make autogen |
305 |
| - run: | |
306 |
| - make autogen |
307 |
| - if [ -z "$(git status --porcelain)" ]; then |
308 |
| - # clean working copy |
309 |
| - echo "Working copy is clean, everything ok" |
310 |
| - else |
311 |
| - # Uncommitted changes |
312 |
| - echo "ERROR: uncommitted changes after running make autogen" |
313 |
| - echo "git status" |
314 |
| - git status |
315 |
| - echo |
316 |
| - echo "git diff" |
317 |
| - git diff |
318 |
| - exit 1 |
319 |
| - fi |
320 |
| -
|
321 |
| -
|
322 |
| - check_py27_compat: |
323 |
| - name: Check Python 2.7 compatibility |
324 |
| - runs-on: 'ubuntu-20.04' |
325 |
| - steps: |
326 |
| - - uses: actions/checkout@v4 |
327 |
| - |
328 |
| - # - template: azure-templates/python.yml |
329 |
| - # parameters: |
330 |
| - # pythonVersion: "2.7" |
331 |
| - |
332 |
| - - name: Set up Python2 |
333 |
| - # Copied from cython's ci.yml |
334 |
| - run: | |
335 |
| - sudo ln -fs python2 /usr/bin/python |
336 |
| - sudo apt-get update |
337 |
| - sudo apt-get install python-setuptools python2.7 python2.7-dev |
338 |
| - curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py |
339 |
| - sudo python2 get-pip.py |
340 |
| - ls -l /usr/bin/pip* /usr/local/bin/pip* |
341 |
| - which pip |
342 |
| -
|
343 |
| - - name: Install/Upgrade Python dependencies |
344 |
| - run: python -m pip install --upgrade pip wheel |
345 |
| - |
346 |
| - - name: check_py27_compat.py |
347 |
| - run: | |
348 |
| - python -m pip install pytest pytest-xdist filelock pathlib |
349 |
| - python test/check_py27_compat.py |
350 |
| -
|
351 |
| -
|
352 |
| - cpp_check: |
353 |
| - name: Cppcheck static analysis |
354 |
| - runs-on: 'ubuntu-22.04' |
355 |
| - continue-on-error: true |
356 |
| - steps: |
357 |
| - - uses: actions/checkout@v4 |
358 |
| - |
359 |
| - - name: Set up Python |
360 |
| - uses: actions/setup-python@v5 |
361 |
| - with: |
362 |
| - python-version: '3.10' |
363 |
| - |
364 |
| - - name: Install Cppcheck |
365 |
| - run: sudo apt-get -qq -y install cppcheck=2.7-1 |
366 |
| - |
367 |
| - - name: Run Cppcheck |
368 |
| - run: make cppcheck |
369 |
| - |
370 |
| - |
371 |
| - infer: |
372 |
| - name: Infer static analysis |
373 |
| - runs-on: 'ubuntu-latest' |
374 |
| - steps: |
375 |
| - - uses: actions/checkout@v4 |
376 |
| - |
377 |
| - # - template: azure-templates/python.yml |
378 |
| - |
379 |
| - - name: Set up Python |
380 |
| - uses: actions/setup-python@v5 |
381 |
| - with: |
382 |
| - python-version: '3.10' |
383 |
| - |
384 |
| - - name: Install/Upgrade Python dependencies |
385 |
| - run: python -m pip install --upgrade pip wheel |
386 |
| - |
387 |
| - - name: Install Infer |
388 |
| - run: | |
389 |
| - python -m pip install compiledb wheel; |
390 |
| - VERSION=1.1.0; \ |
391 |
| - curl -sSL "https://github.com/facebook/infer/releases/download/v$VERSION/infer-linux64-v$VERSION.tar.xz" \ |
392 |
| - | sudo tar -C /opt -xJ && \ |
393 |
| - echo "/opt/infer-linux64-v$VERSION/bin" >> $GITHUB_PATH |
394 |
| -
|
395 |
| - - name: Run Infer |
396 |
| - run: make infer |
397 |
| - |
398 |
| - check_microbench: |
399 |
| - name: Check micro benchmarks |
400 |
| - runs-on: 'ubuntu-latest' |
401 |
| - steps: |
402 |
| - - uses: actions/checkout@v4 |
403 |
| - |
404 |
| - - name: Set up Python |
405 |
| - uses: actions/setup-python@v5 |
406 |
| - with: |
407 |
| - python-version: '3.x' |
408 |
| - |
409 |
| - - name: Install / Upgrade system dependencies |
410 |
| - run: sudo apt update && sudo apt install -y valgrind |
411 |
| - |
412 |
| - - name: Install / Upgrade Python requirements |
413 |
| - run: | |
414 |
| - python -m pip install --upgrade pip wheel 'setuptools>=60.2' |
415 |
| - python -m pip install pytest cffi |
416 |
| -
|
417 |
| - - name: Build and install HPy |
418 |
| - run: | |
419 |
| - make |
420 |
| - python -m pip install . |
421 |
| -
|
422 |
| - - name: Run microbenchmarks |
423 |
| - run: | |
424 |
| - cd microbench |
425 |
| - python setup.py build_ext -i |
426 |
| - python -m pytest -v |
0 commit comments