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>
(cherry picked from commit fcf7e16)
  • Loading branch information
wenduwan committed Jul 22, 2024
1 parent 7a702e8 commit 6f87bcb
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/macos-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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: Build examples
run: |
pushd examples
make
popd
- name: Test ring
run: |
mpirun --map-by ppr:1:core examples/ring_c

0 comments on commit 6f87bcb

Please sign in to comment.