Skip to content

Commit 75a5004

Browse files
committed
run tests both on ubuntu 18.04 and 20.04 for both openmpi and mpich implementations
1 parent 0aad2ea commit 75a5004

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/unittests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ on:
66

77
jobs:
88
test:
9-
runs-on: ubuntu-20.04
9+
runs-on: ${{ matrix.os }}
1010
defaults:
1111
run:
1212
shell: bash -l {0}
1313
strategy:
1414
fail-fast: false
1515
matrix:
16+
os: [ubuntu-18.04, ubuntu-20.04]
1617
mpi_install: [system, conda]
18+
mpi_impl: [openmpi, mpich]
1719
python: [3.8]
1820
steps:
1921
- uses: actions/checkout@v2
@@ -28,6 +30,7 @@ jobs:
2830
./ci/install_mpi.sh
2931
env:
3032
MPI_INSTALL: ${{ matrix.mpi_install }}
33+
MPI_IMPL: ${{ matrix.mpi_impl }}
3134
- name: Run unit tests
3235
run: |
3336
pip install -e .[test]

ci/install_mpi.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,23 @@ set -euo pipefail
33

44
case "$MPI_INSTALL" in
55
"conda")
6-
conda install -y openmpi mpi4py
6+
conda install -y "$MPI_IMPL" mpi4py
77
;;
88
"system")
99
sudo apt-get update
10-
sudo apt-get install -qy libopenmpi-dev openmpi-bin
10+
case "$MPI_IMPL" in
11+
"openmpi")
12+
sudo apt-get install -qy libopenmpi-dev openmpi-bin
13+
;;
14+
"mpich")
15+
sudo apt-get install -qy mpich
16+
;;
17+
*)
18+
false
19+
;;
20+
esac
1121
;;
1222
*)
13-
false;;
23+
false;;
1424
esac
25+

0 commit comments

Comments
 (0)