1717 # Don't immediately kill all if one Python version fails
1818 fail-fast : false
1919 matrix :
20- python-version : ['3.8 ', '3.9 ', '3.10 ', '3.11 ']
20+ python-version : ['3.9 ', '3.10 ', '3.11 ', '3.12 ']
2121 env :
2222 CC : mpicc
2323 PETSC_DIR : ${{ github.workspace }}/petsc
@@ -58,15 +58,15 @@ jobs:
5858 working-directory : ${{ env.PETSC_DIR }}/src/binding/petsc4py
5959 run : |
6060 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
6262 python -m pip install --no-deps .
6363
6464 - name : Checkout PyOP2
6565 uses : actions/checkout@v2
6666 with :
6767 path : PyOP2
6868
69- - name : Install PyOP2
69+ - name : Install PyOP2 dependencies
7070 shell : bash
7171 working-directory : PyOP2
7272 run : |
7676 python -m pip install pulp
7777 python -m pip install -U flake8
7878 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
8094
8195 - name : Run linting
8296 shell : bash
@@ -86,7 +100,10 @@ jobs:
86100 - name : Run tests
87101 shell : bash
88102 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
90107 timeout-minutes : 10
91108
92109 - name : Build documentation
0 commit comments