Skip to content

Commit

Permalink
Support running inside a container
Browse files Browse the repository at this point in the history
  • Loading branch information
gerlero committed Aug 15, 2024
1 parent f0e148f commit fb4f3a9
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,44 @@ jobs:
- run: test ${{ steps.setup3.outputs.mpi }} == intelmpi
- run: command -v impi_info

container:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- debian
- ubuntu
container: ${{ matrix.image }}
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Setup MPICH
id: setup1
uses: ./
with:
mpi: mpich
- run: test ${{ steps.setup1.outputs.mpi }} = mpich
- run: command -v mpichversion

- name: Setup Open MPI
id: setup2
uses: ./
with:
mpi: openmpi
- run: test ${{ steps.setup2.outputs.mpi }} = openmpi
- run: command -v ompi_info

- name: Setup Intel MPI
id: setup3
uses: ./
with:
mpi: intelmpi
- run: test ${{ steps.setup3.outputs.mpi }} = intelmpi
- run: command -v impi_info

macOS:
runs-on: macos-latest
steps:
Expand Down
8 changes: 8 additions & 0 deletions setup-mpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ case $MPI in
;;
esac

sudo () {
[ $(id -u) -eq 0 ] || set -- command sudo "$@"
"$@"
}

setup-apt-intel-oneapi () {
# ensure the required packages are installed
sudo apt update
sudo apt install -y -q ca-certificates curl gnupg procps
apt_repo_url=https://apt.repos.intel.com/
gpg_key_url=$apt_repo_url/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
keyring=/usr/share/keyrings/oneapi-archive-keyring.gpg
Expand Down

0 comments on commit fb4f3a9

Please sign in to comment.