Skip to content

Support running inside a container #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading