Debian Codegraph @

.github/workflows/test_package_openmpi.yml

raw
1 name: Test package with openmpi
2
3 on:
4 push:
5 branches:
6 - main
7 pull_request:
8 branches:
9 - main
10
11 workflow_call:
12 workflow_dispatch:
13 schedule:
14 - cron: "0 8 * * *"
15
16 jobs:
17 create-datasets:
18 uses: ./.github/workflows/create_legacy_data.yml
19 with:
20 artifact_name: "legacy_ompi"
21
22 create-legacy-datasets:
23 uses: ./.github/workflows/create_legacy_checkpoint.yml
24 with:
25 artifact_name: "legacy_checkpoint_ompi"
26
27 test-code:
28 runs-on: ubuntu-latest
29 needs: [create-datasets, create-legacy-datasets]
30 container: ghcr.io/fenics/test-env:current-openmpi
31 env:
32 DEB_PYTHON_INSTALL_LAYOUT: deb_system
33 PETSC_ARCH: "linux-gnu-real64-32"
34 OMPI_ALLOW_RUN_AS_ROOT: 1
35 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
36 PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe
37 working-directory: ./src
38
39 strategy:
40 matrix:
41 adios2: ["default", "v2.10.2"]
42 steps:
43 - uses: actions/checkout@v5
44
45 - name: Update pip
46 run: python3 -m pip install --break-system-packages --upgrade pip setuptools
47
48 - name: Install DOLFINx
49 uses: jorgensd/actions/[email protected]
50 with:
51 adios2: ${{ matrix.adios2 }}
52 petsc_arch: ${{ env.PETSC_ARCH }}
53 dolfinx: main
54 basix: main
55 ufl: main
56 ffcx: main
57 working-directory: ${{ env.working-directory}}
58
59 - name: Download legacy data
60 uses: actions/download-artifact@v5
61 with:
62 name: legacy_ompi
63 path: ./legacy
64
65 - name: Download legacy data
66 uses: actions/download-artifact@v5
67 with:
68 name: legacy_checkpoint_ompi
69 path: ./legacy_checkpoint
70
71 - name: Install package
72 run: python3 -m pip install --break-system-packages .[test]
73
74 - name: Run tests
75 run: |
76 coverage run --rcfile=.coveragerc -m mpi4py -m pytest -xvs ./tests/
77
78 - name: Run tests in parallel
79 run: |
80 mpirun -n 2 coverage run --rcfile=.coveragerc -m mpi4py -m pytest -xvs ./tests/