forked from pyccel/psydac
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (71 loc) · 2.53 KB
/
Copy pathtest-psydac.yml
File metadata and controls
89 lines (71 loc) · 2.53 KB
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
name: Test feectools
on:
push:
branches: [devel-tiny]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test_feectools:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.12' ]
compile_language: ['c', 'fortran']
name: Test feectools on ${{ matrix.os }} / Python ${{ matrix.python-version }} / ${{ matrix.compile_language }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install prerequisites
uses: ./.github/actions/install/psydac-req
- name: Install project without mpi
run: |
python -m pip install ".[test]" --no-cache-dir
python -m pip freeze
- name: Compile feectools kernels
run: |
psydac-accelerate --language ${{ matrix.compile_language }}
# - name: Test Pyccel optimization flags
# run: |
# pytest --pyargs psydac -m pyccel --capture=no
- name: Initialize test directory
run: |
mkdir pytest
cp mpi_tester.py pytest
- name: Run coverage tests on macOS
if: matrix.os == 'macos-14'
working-directory: ./pytest
run: >-
python -m pytest -n auto
--cov feectools
--cov-config $GITHUB_WORKSPACE/pyproject.toml
--cov-report xml
--pyargs feectools -m "not parallel and not petsc"
- name: Run single-process tests with Pytest on Ubuntu
if: matrix.os == 'ubuntu-latest'
working-directory: ./pytest
run: |
python -m pytest -n auto --pyargs feectools -m "not parallel and not petsc"
- name: Run single-process PETSc tests with Pytest
working-directory: ./pytest
run: |
python -m pytest -n auto --pyargs feectools -m "not parallel and petsc"
- name: Install project with mpi
run: |
python -m pip install ".[mpi]"
python -m pip freeze
- name: Run MPI tests with Pytest
working-directory: ./pytest
run: |
python mpi_tester.py --mpirun="mpiexec -n 4 ${MPI_OPTS}" --pyargs feectools -m "parallel and not petsc"
- name: Run MPI PETSc tests with Pytest
working-directory: ./pytest
run: |
python mpi_tester.py --mpirun="mpiexec -n 4 ${MPI_OPTS}" --pyargs feectools -m "parallel and petsc"
- name: Remove test directory
if: always()
run: |
rm -rf pytest