17
17
# Don't immediately kill all if one Python version fails
18
18
fail-fast : false
19
19
matrix :
20
- python-version : ['3.8 ', '3.9 ', '3.10 ', '3.11 ']
20
+ python-version : ['3.9 ', '3.10 ', '3.11 ', '3.12 ']
21
21
env :
22
22
CC : mpicc
23
23
PETSC_DIR : ${{ github.workspace }}/petsc
@@ -58,15 +58,15 @@ jobs:
58
58
working-directory : ${{ env.PETSC_DIR }}/src/binding/petsc4py
59
59
run : |
60
60
python -m pip install --upgrade pip
61
- python -m pip install --upgrade wheel ' cython<3' numpy
61
+ python -m pip install --upgrade wheel cython numpy
62
62
python -m pip install --no-deps .
63
63
64
64
- name : Checkout PyOP2
65
65
uses : actions/checkout@v2
66
66
with :
67
67
path : PyOP2
68
68
69
- - name : Install PyOP2
69
+ - name : Install PyOP2 dependencies
70
70
shell : bash
71
71
working-directory : PyOP2
72
72
run : |
76
76
python -m pip install pulp
77
77
python -m pip install -U flake8
78
78
python -m pip install -U pytest-timeout
79
- python -m pip install .
79
+
80
+ - name : Install PyOP2 (Python <3.12)
81
+ if : ${{ matrix.python-version != '3.12' }}
82
+ shell : bash
83
+ working-directory : PyOP2
84
+ run : python -m pip install .
85
+
86
+ # Not sure if this is a bug in setuptools or something PyOP2 is doing wrong
87
+ - name : Install PyOP2 (Python == 3.12)
88
+ if : ${{ matrix.python-version == '3.12' }}
89
+ shell : bash
90
+ working-directory : PyOP2
91
+ run : |
92
+ python -m pip install -U setuptools
93
+ python setup.py install
80
94
81
95
- name : Run linting
82
96
shell : bash
@@ -86,7 +100,10 @@ jobs:
86
100
- name : Run tests
87
101
shell : bash
88
102
working-directory : PyOP2
89
- run : pytest --tb=native --timeout=480 --timeout-method=thread -o faulthandler_timeout=540 -v test
103
+ run : |
104
+ # Running parallel test cases separately works around a bug in pytest-mpi
105
+ pytest -k "not parallel" --tb=native --timeout=480 --timeout-method=thread -o faulthandler_timeout=540 -v test
106
+ mpiexec -n 3 pytest -k "parallel[3]" --tb=native --timeout=480 --timeout-method=thread -o faulthandler_timeout=540 -v test
90
107
timeout-minutes : 10
91
108
92
109
- name : Build documentation
0 commit comments