diff --git a/.github/workflows/gfortran.yml b/.github/workflows/gfortran.yml index e4ab7adb..5a575a1f 100644 --- a/.github/workflows/gfortran.yml +++ b/.github/workflows/gfortran.yml @@ -34,11 +34,15 @@ jobs: basic_build: name: Basic build - runs-on: ubuntu-22.04 + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - gcc_v: [9, 12] + os: [ubuntu-22.04] + gcc_v: [9, 13] + include: + - os: macos-14 + gcc_v: 13 env: FC: gfortran GCC_V: ${{ matrix.gcc_v}} @@ -49,11 +53,10 @@ jobs: with: fetch-depth: 2 - - name: Set GFortran version - run: | - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \ - --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \ - --slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V} + - uses: fortran-lang/setup-fortran@v1 + with: + compiler: gcc + version: ${{ matrix.gcc_v }} # pFUnit library is used to build and run unit tests - name: pFUnit build Cache diff --git a/dev_scripts/install_pfunit.sh b/dev_scripts/install_pfunit.sh index 1221c32b..e516d564 100755 --- a/dev_scripts/install_pfunit.sh +++ b/dev_scripts/install_pfunit.sh @@ -17,7 +17,7 @@ git clone --recursive https://github.com/Goddard-Fortran-Ecosystem/pFUnit $REPO_ # This seems to be the last commit that works with GCC-7 # Later commits fail with internal compiler error when compiling fArgParse submodule. -git checkout --recurse-submodules 0a09db354b665f1518e36460396c348c19185e04 +#git checkout --recurse-submodules 0a09db354b665f1518e36460396c348c19185e04 mkdir -p build && cd build export FC=gfortran diff --git a/tests/numdiff.py b/tests/numdiff.py index 496074d3..9c1f14b6 100755 --- a/tests/numdiff.py +++ b/tests/numdiff.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import decimal import os.path diff --git a/tests/test.sh b/tests/test.sh index 77a6530b..cb73dd0d 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -1,6 +1,14 @@ #!/bin/bash + +# Stop on any error set -euo pipefail +# Make sure that '[A-Z]' regex works as expected, +# i.e. only matches capital letters, regardless of global collate settings. +# This workaround is needed for MacOS 15, +# but is probably a good idea in general to make this script robust. +export LC_ALL=C + # Parameters are passed from Makefile. if [[ $# -ne 8 ]]; then echo "ERROR: Incorrect number of parameters passed to $0"