Skip to content

Commit

Permalink
workflow: add macOS check
Browse files Browse the repository at this point in the history
Increase CI coverage to prevent open-mpi#12693

Signed-off-by: Wenduo Wang <wenduwan@amazon.com>
  • Loading branch information
wenduwan committed Jul 22, 2024
1 parent a6d5b36 commit 6c3509a
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/macos-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: macOS

on: [pull_request]

jobs:
macOS:
runs-on: macos-latest
steps:
- name: Setup macOS
run: |
# Copied from mpi4py/mpi-publish
# create gfortran symlink
cd $(brew --prefix)/bin
gfortran=$(ls gfortran-* | sort | head -n 1)
sudo ln -s $gfortran gfortran
# install autotools
brew install autoconf
brew install automake
brew install libtool
# unlink libevent
brew unlink libevent || true
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build Open MPI
run: |
./autogen.pl
./configure --prefix=/opt/openmpi
make -j $(sysctl -n hw.logicalcpu)
- name: Run unit tests
run: |
make check
- name: Install Open MPI
run: |
sudo make install
- name: Add Open MPI to PATH
run: echo /opt/openmpi/bin >> $GITHUB_PATH
- name: Test ring
run: |
cd examples
mpicc -o ring ring_c.c
mpirun --map-by ppr:1:core ring

0 comments on commit 6c3509a

Please sign in to comment.