Skip to content

Linux.yml: test with multiple gcc versions #88

Linux.yml: test with multiple gcc versions

Linux.yml: test with multiple gcc versions #88

Workflow file for this run

# This is a GitHub actions workflow for the NCEPLIBS-bacio project.
#
# This workflow does the Linux build.
#
# Ed Hartnett 1/19/23
name: Linux
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
Linux:
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 install gcc-${{ matrix.gcc-version }}
fi
- name: checkout
uses: actions/checkout@v4
- name: build
run: |
export CC=gcc-${{ matrix.gcc-version }} ; export FC=gfortran-${{ matrix.gcc-version }}
cmake -B build
cmake --build build --parallel 2 --verbose
- name: test
run: |
set -e
ctest --test-dir build --output-on-failure --rerun-failed --verbose