ci: windows install mpi #118
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cmake | |
on: | |
push: | |
paths: | |
- "**.f90" | |
- "**.F90" | |
- "**.cmake" | |
- "**/CMakeLists.txt" | |
- ".github/workflows/cmake.yml" | |
jobs: | |
linux: | |
name: CMake build on Linux | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
mpi: [openmpi] | |
# For some reason, mpich GitHub Actions MPIEXEC only | |
# uses one CPU for MPICH | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install prereqs (linux) | |
if: runner.os == 'Linux' | |
run: sudo apt install --no-install-recommends lib${{ matrix.mpi }}-dev | |
- name: install prereqs (mac) | |
if: runner.os == 'macOS' | |
run: brew install ${{ matrix.mpi }} | |
- run: cmake --workflow --preset debug | |
- run: cmake --workflow --preset release | |
windows: | |
runs-on: windows-latest | |
name: CMake build on Windows | |
timeout-minutes: 15 | |
steps: | |
- uses: msys2/setup-msys2@v2 | |
id: msys2 | |
with: | |
update: true | |
install: >- | |
mingw-w64-ucrt-x86_64-gcc | |
mingw-w64-ucrt-x86_64-gcc-fortran | |
- name: Put MSYS2_MinGW64 on PATH | |
run: echo "${{ steps.msys2.outputs.msys2-location }}/ucrt64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Setup Microsoft MPI | |
uses: mpi4py/setup-mpi@v1 | |
with: | |
mpi: msmpi | |
- uses: actions/checkout@v4 | |
- run: cmake --workflow --preset debug | |
- run: cmake --workflow --preset release |