Skip to content

Commit

Permalink
Replace matrix with explicit list in the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aradi committed Sep 27, 2024
1 parent e5c0a2d commit 61cf674
Showing 1 changed file with 49 additions and 23 deletions.
72 changes: 49 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,41 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [gnu, intel]
interface: [serial, mpi]
exclude:
- os: macos-latest
compiler: intel
include:
- interface: serial
- os: ubuntu-latest
compiler: gnu
mpi: nompi
- interface: mpi
os: ubuntu-latest
interface: serial
- os: ubuntu-latest
compiler: gnu
mpi: mpich
- interface: mpi
os: ubuntu-latest
interface: mpi
# CMake config file of OpenMPI is broken on ubuntu 22.04
# - os: ubuntu-latest
# compiler: gnu
# mpi: openmpi
# interface: mpi
- os: ubuntu-latest
compiler: intel
mpi: nompi
interface: serial
- os: ubuntu-latest
compiler: intel
mpi: impi
- interface: mpi
os: macos-latest
interface: mpi
- os: macos-latest
compiler: gnu
mpi: nompi
interface: serial
# MPICH on MacOS lacks mpi_f08 interface
# - os: macos-latest
# compiler: gnu
# mpi: mpich
# interface: mpi
- os: macos-latest
compiler: gnu
mpi: openmpi
interface: mpi

steps:

Expand Down Expand Up @@ -82,31 +97,42 @@ jobs:
echo "FC=${{ env.FC }}" >> ${GITHUB_ENV}
echo "FPM_FC=${{ env.FC }}" >> ${GITHUB_ENV}
- name: Setup MPI on Ubuntu
if: ${{ contains(matrix.os, 'ubuntu') && contains(matrix.interface, 'mpi') }}
- name: Setup MPICH on Ubuntu
if: ${{ contains(matrix.os, 'ubuntu') && contains(matrix.mpi, 'mpich') }}
run: |
sudo apt-get update
sudo apt-get install -y mpich
- name: Setup MPI on MacOS
if: ${{ contains(matrix.os, 'macos') && contains(matrix.interface, 'mpi') }}
- name: Setup OpenMPI on Ubuntu
if: ${{ contains(matrix.os, 'ubuntu') && contains(matrix.mpi, 'openmpi') }}
run: |
sudo apt-get update
sudo apt-get install -y openmpi-common openmpi-bin
- name: Setup MPICH on MacOS
if: ${{ contains(matrix.os, 'macos') && contains(matrix.mpi, 'mpich') }}
run: |
brew install mpich
- name: Setup OpenMPI on MacOS
if: ${{ contains(matrix.os, 'macos') && contains(matrix.mpi, 'openmpi') }}
run: |
brew install openmpi
- name: Setup serial interface options
if: ${{ contains(matrix.interface, 'serial') }}
run: |
echo "CMAKE_OPTIONS=-DFORTUNO_BUILD_SERIAL_INTERFACE=ON -DFORTUNO_BUILD_MPI_INTERFACE=OFF" >> ${GITHUB_ENV}
echo "MESON_OPTIONS=-Dbuild_serial_interface=true -Dbuild_mpi_interface=false" >> ${GITHUB_ENV}
echo "MESON_FALLBACK_OPTIONS=-Dfortuno:build_serial_interface=true -Dfortuno:build_mpi_interface=false" >> ${GITHUB_ENV}
echo "CMAKE_OPTIONS=-DFORTUNO_BUILD_SERIAL_INTERFACE=ON" >> ${GITHUB_ENV}
echo "MESON_OPTIONS=-Dbuild_serial_interface=true" >> ${GITHUB_ENV}
echo "MESON_FALLBACK_OPTIONS=-Dfortuno:build_serial_interface=true" >> ${GITHUB_ENV}
echo "INTERFACE=serial" >> ${GITHUB_ENV}
- name: Setup mpi interface options
if: ${{ contains(matrix.interface, 'mpi') }}
run: |
echo "CMAKE_OPTIONS=-DFORTUNO_BUILD_SERIAL_INTERFACE=OFF -DFORTUNO_BUILD_MPI_INTERFACE=ON" >> ${GITHUB_ENV}
echo "MESON_OPTIONS=-Dbuild_serial_interface=false -Dbuild_mpi_interface=true" >> ${GITHUB_ENV}
echo "MESON_FALLBACK_OPTIONS=-Dfortuno:build_serial_interface=false -Dfortuno:build_mpi_interface=true" >> ${GITHUB_ENV}
echo "CMAKE_OPTIONS=-DFORTUNO_BUILD_MPI_INTERFACE=ON" >> ${GITHUB_ENV}
echo "MESON_OPTIONS=-Dbuild_mpi_interface=true" >> ${GITHUB_ENV}
echo "MESON_FALLBACK_OPTIONS=-Dfortuno:build_mpi_interface=true" >> ${GITHUB_ENV}
echo "INTERFACE=mpi" >> ${GITHUB_ENV}
- name: Setup build tools
Expand Down

0 comments on commit 61cf674

Please sign in to comment.