Skip to content

Massively expand Level 4 hostile/portability tests #24

Massively expand Level 4 hostile/portability tests

Massively expand Level 4 hostile/portability tests #24

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
cmake-build:
name: CMake (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
fc: gfortran-13
- os: macos-latest
fc: gfortran-13
steps:
- uses: actions/checkout@v4
- name: Set up Fortran (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.fc }}
- name: Set up Fortran (macOS)
if: runner.os == 'macOS'
run: |
brew install gcc@13
- name: Configure CMake
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_Fortran_COMPILER=${{ matrix.fc }}
- name: Build
run: cmake --build build --parallel
- name: Test
run: ctest --test-dir build --output-on-failure -E "test-drive"
cmake-windows:
name: CMake (Windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-cmake make
- name: Configure CMake
shell: msys2 {0}
run: |
cmake -B build -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release
- name: Build
shell: msys2 {0}
run: cmake --build build --parallel
- name: Test
shell: msys2 {0}
run: ctest --test-dir build --output-on-failure -E "test-drive"
fpm-linux:
name: fpm (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Fortran
run: |
sudo apt-get update
sudo apt-get install -y gfortran-13
- name: Install fpm
uses: fortran-lang/setup-fpm@v5
with:
fpm-version: 'v0.10.0'
- name: Build with fpm
run: fpm build --profile release
env:
FPM_FC: gfortran-13
- name: Test with fpm
run: fpm test
env:
FPM_FC: gfortran-13
# fpm-macos and fpm-windows disabled due to fpm version incompatibilities
# CMake builds work fine on all platforms - fpm can be re-enabled when
# brew/msys2 package versions stabilise
#
# fpm-macos:
# name: fpm (macOS)
# runs-on: macos-latest
# ...
#
# fpm-windows:
# name: fpm (Windows)
# runs-on: windows-latest
# ...