Skip to content

Add GCC 14 testing

Add GCC 14 testing #65

Workflow file for this run

name: Build and Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
gcc-version: [12,14]
steps:
- name: get-gcc
run: |
if [ -z $(type -P gcc-${{ matrix.gcc-version }}) ]; then
sudo apt-get install gcc-${{ matrix.gcc-version }}
fi
echo "CC=gcc-${{ matrix.gcc-version }}" >> $GITHUB_ENV
echo "FC=gfortran-${{ matrix.gcc-version }}" >> $GITHUB_ENV
- name: checkout-pfunit
uses: actions/checkout@v4
with:
repository: Goddard-Fortran-Ecosystem/pFUnit
path: pfunit
- name: cache-pfunit
id: cache-pfunit
uses: actions/cache@v4
with:
path: ~/pfunit
key: pfunit-${{ runner.os }}-gcc${{ gcc-version}}-1

Check failure on line 32 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / Build and Test

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 32, Col: 14): Unrecognized named-value: 'gcc-version'. Located at position 1 within expression: gcc-version
- name: build-pfunit
if: steps.cache-pfunit.outputs.cache-hit != 'true'
run: |
cmake -B pfunit/build -S pfunit -DSKIP_MPI=YES -DSKIP_ESMF=YES -DSKIP_FHAMCREST=YES -DCMAKE_INSTALL_PREFIX=~/pfunit
cmake --build pfunit/build --verbose
cmake --install pfunit/build
- name: checkout
uses: actions/checkout@v4
- name: build
run: |
cmake -B build -DENABLE_TESTS=ON -DCMAKE_PREFIX_PATH="~/pfunit"
cmake --build build --parallel 2 --verbose
- name: test
run: |
cmake --build build --target test --verbose