Skip to content

Commit

Permalink
run tests both on ubuntu 18.04 and 20.04 for both openmpi and mpich i…
Browse files Browse the repository at this point in the history
…mplementations
  • Loading branch information
hndgzkn committed Mar 2, 2021
1 parent fa0be0a commit aaa4638
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ on:

jobs:
test:
runs-on: ubuntu-20.04
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
mpi_install: [system, conda]
mpi_impl: [openmpi, mpich]
python: [3.8]
steps:
- uses: actions/checkout@v2
Expand All @@ -27,6 +29,7 @@ jobs:
./ci/install_mpi.sh
env:
MPI_INSTALL: ${{ matrix.mpi_install }}
MPI_IMPL: ${{ matrix.mpi_impl }}
- name: Run unit tests
run: |
pip install -e .[test]
Expand Down
19 changes: 16 additions & 3 deletions ci/install_mpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,22 @@ set -euo pipefail

case "$MPI_INSTALL" in
"conda")
conda install -y openmpi mpi4py;;
conda install -y "$MPI_IMPL" mpi4py
;;
"system")
sudo apt-get install -qy libopenmpi-dev openmpi-bin;;
case "$MPI_IMPL" in
"openmpi")
sudo apt-get install -qy libopenmpi-dev openmpi-bin
;;
"mpich")
sudo apt-get install -qy mpich
;;
*)
false
;;
esac
;;
*)
false;;
false;;
esac

0 comments on commit aaa4638

Please sign in to comment.