From 53f90838be16c54f76aa794851ee4483fdd7e973 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 4 Oct 2024 14:30:21 -0700 Subject: [PATCH] main.yml: add GCC 14 testing --- .github/workflows/main.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a5fdb63..1a70b39 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,13 +3,21 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest - env: - FC: gfortran-11 - CC: gcc-11 + runs-on: ubuntu-24.04 + strategy: + matrix: + gcc-version: [12,14] steps: + - name: get-gcc + run: | + if [ -z $(type -P ${{ matrix.gcc-version }}) ]; then + sudo apt-get install gcc-${{ matrix.gcc-version }} gfortran-${{ 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: @@ -21,7 +29,7 @@ jobs: uses: actions/cache@v4 with: path: ~/pfunit - key: pfunit-${{ runner.os }}-${{ hashFiles('pfunit/VERSION') }} + key: pfunit-${{ runner.os }}-${{ hashFiles('pfunit/VERSION') }}-gcc${{ matrix.gcc-version }} - name: build-pfunit if: steps.cache-pfunit.outputs.cache-hit != 'true'