From fcf7e16d7103b26b3d8cc4bdc6f9fe7b94d3e606 Mon Sep 17 00:00:00 2001 From: Wenduo Wang Date: Thu, 18 Jul 2024 17:08:37 -0700 Subject: [PATCH] workflow: add macOS check Increase CI coverage to prevent #12693 Signed-off-by: Wenduo Wang --- .github/workflows/macos-checks.yaml | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/macos-checks.yaml diff --git a/.github/workflows/macos-checks.yaml b/.github/workflows/macos-checks.yaml new file mode 100644 index 00000000000..0b90adeb9a3 --- /dev/null +++ b/.github/workflows/macos-checks.yaml @@ -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