Added flang to build matrix #12
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
# SPDX-FileCopyrightText: 2025 Helmholtz-Zentrum hereon GmbH | |
# SPDX-License-Identifier: CC0-1.0 | |
# SPDX-FileContributor Carsten Lemmen <carsten.lemmen@hereon.de> | |
name: Build and test | |
on: push | |
jobs: | |
gfortran: | |
strategy: | |
matrix: | |
version: [14] | |
os: ["ubuntu-latest"] | |
include: | |
- version: 14 | |
os: ubuntu-24.04 | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install compiler | |
run: | | |
sudo apt-get update | |
sudo apt-get install gfortran-${{ matrix.version }} | |
- name: Clone gotm (including fabm) | |
uses: actions/checkout@v4 | |
with: | |
repository: gotm-model/code | |
path: gotm | |
submodules: recursive | |
- name: Clone fabm-oxypom | |
uses: actions/checkout@v4 | |
with: | |
path: fabm-oxypom | |
- name: Build gotm with fabm and oxypom | |
run: | | |
cmake -B gotm/build -S gotm -DCMAKE_Fortran_COMPILER=gfortran-${{ matrix.version }} -DGOTM_USE_FABM=ON -DGOTM_USE_NetCDF=OFF ${{ matrix.cmake_args }} | |
conda-forge: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
defaults: | |
run: | |
shell: bash -el {0} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
- name: Clone gotm | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
repository: gotm-model/code | |
- name: Install conda packages (Linux, Mac) | |
if: matrix.os != 'windows-latest' | |
run: conda install -c conda-forge fortran-compiler netcdf-fortran | |
- name: Install conda packages (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
conda install -c conda-forge m2w64-gcc-fortran m2w64-make netcdf-fortran | |
echo "CMAKE_GENERATOR=MinGW Makefiles" >> "$GITHUB_ENV" | |
- name: build | |
run: | | |
cmake -B build -S . -DGOTM_USE_STIM=ON -DGOTM_USE_SEAGRASS=ON -DCMAKE_BUILD_TYPE=Release | |
cmake --build build --config Release |