Skip to content

Commit 8b07a9b

Browse files
committed
ci: separate windows and unix
1 parent 6f13054 commit 8b07a9b

File tree

3 files changed

+45
-30
lines changed

3 files changed

+45
-30
lines changed

.github/workflows/unix-cmake.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: unix-cmake
2+
3+
on:
4+
push:
5+
paths:
6+
- "**.f90"
7+
- "**.F90"
8+
- "**.cmake"
9+
- "**/CMakeLists.txt"
10+
- ".github/workflows/unix-cmake.yml"
11+
12+
13+
jobs:
14+
15+
linux:
16+
name: CMake build on Linux
17+
timeout-minutes: 15
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
mpi: [openmpi]
23+
# For some reason, mpich GitHub Actions MPIEXEC only
24+
# uses one CPU for MPICH
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: install prereqs (linux)
30+
if: runner.os == 'Linux'
31+
run: sudo apt install --no-install-recommends lib${{ matrix.mpi }}-dev
32+
33+
- name: install prereqs (mac)
34+
if: runner.os == 'macOS'
35+
run: brew install ${{ matrix.mpi }}
36+
37+
- run: cmake --workflow --preset debug
38+
39+
- run: cmake --workflow --preset release

.github/workflows/cmake.yml renamed to .github/workflows/windows-cmake.yml

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: cmake
1+
name: windows-cmake
22

33
on:
44
push:
@@ -7,38 +7,11 @@ on:
77
- "**.F90"
88
- "**.cmake"
99
- "**/CMakeLists.txt"
10-
- ".github/workflows/cmake.yml"
10+
- ".github/workflows/windows-cmake.yml"
1111

1212

1313
jobs:
1414

15-
linux:
16-
name: CMake build on Linux
17-
timeout-minutes: 15
18-
runs-on: ubuntu-latest
19-
20-
strategy:
21-
matrix:
22-
mpi: [openmpi]
23-
# For some reason, mpich GitHub Actions MPIEXEC only
24-
# uses one CPU for MPICH
25-
26-
steps:
27-
- uses: actions/checkout@v4
28-
29-
- name: install prereqs (linux)
30-
if: runner.os == 'Linux'
31-
run: sudo apt install --no-install-recommends lib${{ matrix.mpi }}-dev
32-
33-
- name: install prereqs (mac)
34-
if: runner.os == 'macOS'
35-
run: brew install ${{ matrix.mpi }}
36-
37-
- run: cmake --workflow --preset debug
38-
39-
- run: cmake --workflow --preset release
40-
41-
4215
windows:
4316
runs-on: windows-latest
4417
name: CMake build on Windows
@@ -52,6 +25,7 @@ jobs:
5225
install: >-
5326
mingw-w64-ucrt-x86_64-gcc
5427
mingw-w64-ucrt-x86_64-gcc-fortran
28+
mingw-w64-ucrt-x86_64-msmpi
5529
5630
- name: Put MSYS2_MinGW64 on PATH
5731
run: echo "${{ steps.msys2.outputs.msys2-location }}/ucrt64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Fortran MPI Examples
22

3-
[![cmake](https://github.com/scivision/fortran-mpi-examples/actions/workflows/cmake.yml/badge.svg)](https://github.com/scivision/fortran-mpi-examples/actions/workflows/cmake.yml)
3+
[![cmake](https://github.com/scivision/fortran-mpi-examples/actions/workflows/unix-cmake.yml/badge.svg)](https://github.com/scivision/fortran-mpi-examples/actions/workflows/unix-cmake.yml)
4+
[![cmake](https://github.com/scivision/fortran-mpi-examples/actions/workflows/windows-cmake.yml/badge.svg)](https://github.com/scivision/fortran-mpi-examples/actions/workflows/windows-cmake.yml)
5+
46
A few very basic examples, perhaps use to test MPI-3 Fortran library functionality.
57

68
Free, popular MPI-3 interfaces for C and Fortran include:

0 commit comments

Comments
 (0)