Feature/ccpp #2
Workflow file for this run
This file contains 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: CI | |
on: | |
push: | |
branches: [main, feature/catchem_begins] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
compiler: [gfortran-10, gfortran-11, gfortran-12] | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
BUILD_DIR: build | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Get Intel compilers with APT | |
if: ${{ matrix.compiler == 'ifort' }} | |
uses: fortran-lang/setup-fortran@v1 | |
with: | |
compiler: intel-classic | |
version: "2021.9" # oneAPI 2023.1.0 | |
- name: Install dependencies | |
if: ${{ startsWith(matrix.compiler, 'gfortran') }} | |
run: sudo apt-get update && sudo apt-get install -y libnetcdf-dev libnetcdff-dev | |
- name: Build | |
run: | | |
cmake -B $BUILD_DIR | |
cmake --build $BUILD_DIR | |
env: | |
FC: ${{ matrix.compiler }} | |
- name: Test | |
run: ctest --test-dir ${BUILD_DIR}/tests --output-on-failure |