From 72fb073da6dd8d520c9005f858e3d51835bd5cfd Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Fri, 20 Nov 2026 15:24:46 -0800 Subject: [PATCH 1/5] CI: Disable brew update on macos --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32ff4ae..050484f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -268,8 +268,9 @@ jobs: - name: Install macOS Dependencies if: contains(matrix.os, 'macos') run: | - retry brew update \ - 2>&1 | perl -pe "$BREW_WARNING_FILTER" ; test ${PIPESTATUS[0]} = 0 + # Brew update takes a VERY long time to do cleanup and we don't care + #retry brew update \ + # 2>&1 | perl -pe "$BREW_WARNING_FILTER" ; test ${PIPESTATUS[0]} = 0 # fpm binary distribution for macOS requires gfortran shared libraries from gcc@12 retry brew install gcc@12 \ 2>&1 | perl -pe "$BREW_WARNING_FILTER" ; test ${PIPESTATUS[0]} = 0 From a1557297930d871fc3ca69ba8904d4ac80ef04d1 Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Fri, 20 Nov 2026 15:38:13 -0800 Subject: [PATCH 2/5] CI: Use GITHUB_PATH for all PATH modifications Setting PATH in GITHUB_ENV is unreliable, because it gets overwritten by any use of GITHUB_PATH --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 050484f..f4a31a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -229,7 +229,7 @@ jobs: retry ${HOMEBREW_PREFIX}/bin/brew install -v gcc@${COMPILER_VERSION} binutils \ 2>&1 | perl -pe "$BREW_WARNING_FILTER" ; test ${PIPESTATUS[0]} = 0 ls -al ${HOMEBREW_PREFIX}/bin - echo "PATH=${HOMEBREW_PREFIX}/bin:${PATH}" >> "$GITHUB_ENV" + echo "${HOMEBREW_PREFIX}/bin" >> "$GITHUB_PATH" : Homebrew GCC@15 needs binutils 2.44+ HOMEBREW_BINUTILS=$(ls -d ${HOMEBREW_PREFIX}/Cellar/binutils/2.*/bin ) ls -al ${HOMEBREW_BINUTILS} @@ -292,7 +292,7 @@ jobs: for p in /opt/homebrew /usr/local $(brew --prefix) ; do find $p/Cellar/flang -name ISO_Fortran_binding.h 2>/dev/null || true ; done echo "CFLAGS=-I$(dirname $(find $(brew --prefix)/Cellar/flang -name ISO_Fortran_binding.h | head -1)) ${CFLAGS}" >> "$GITHUB_ENV" # Prepend homebrew clang to PATH: - echo "PATH=$(brew --prefix)/opt/llvm/bin:${PATH}" >> "$GITHUB_ENV" + echo "$(brew --prefix)/opt/llvm/bin" >> "$GITHUB_PATH" - name: Setup Compilers run: | @@ -341,7 +341,7 @@ jobs: cd fpm-temp curl $CURL_OPTIONS https://github.com/fortran-lang/fpm/releases/download/v$FPM_VERSION/fpm-$FPM_VERSION.F90 -o fpm.F90 $GFORTRAN -fopenmp -o bin/fpm fpm.F90 - echo "PATH=$PWD/bin:${PATH}" >> "$GITHUB_ENV" + echo "$PWD/bin" >> "$GITHUB_PATH" - name: Version info run: | From a44e11c0089cc4300e36725d469610fe630396ef Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Fri, 20 Nov 2026 15:53:56 -0800 Subject: [PATCH 3/5] CI: Improve robustness of Linux gfortran install via brew The -B option is not documented as allowing a space, so don't use one# --- .github/workflows/build.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f4a31a8..98481c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -219,7 +219,8 @@ jobs: retry sudo apt-get update #sudo apt list -a 'gfortran-*' retry sudo apt install -y build-essential - if [[ ${COMPILER_VERSION} -lt 15 ]] ; then + [[ ${{ matrix.compiler }} == 'gfortran' ]] # assert no container means gfortran + if [[ ${COMPILER_VERSION} -lt 15 ]] || type -p gfortran-${COMPILER_VERSION} ; then retry sudo apt install -y gfortran-${COMPILER_VERSION} else curl $CURL_OPTIONS https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh -o install-homebrew.sh @@ -227,15 +228,16 @@ jobs: env CI=1 ./install-homebrew.sh HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" retry ${HOMEBREW_PREFIX}/bin/brew install -v gcc@${COMPILER_VERSION} binutils \ - 2>&1 | perl -pe "$BREW_WARNING_FILTER" ; test ${PIPESTATUS[0]} = 0 + 2>&1 | perl -pe "$BREW_WARNING_FILTER" ; test ${PIPESTATUS[0]} = 0 ls -al ${HOMEBREW_PREFIX}/bin echo "${HOMEBREW_PREFIX}/bin" >> "$GITHUB_PATH" : Homebrew GCC@15 needs binutils 2.44+ HOMEBREW_BINUTILS=$(ls -d ${HOMEBREW_PREFIX}/Cellar/binutils/2.*/bin ) ls -al ${HOMEBREW_BINUTILS} - echo "FFLAGS=$FFLAGS -B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" - echo "CFLAGS=$CFLAGS -B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" - echo "CXXFLAGS=$CXXFLAGS -B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" + echo "FFLAGS=${FFLAGS:+"$FFLAGS" }-B${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" + echo "CFLAGS=${CFLAGS:+"$CFLAGS" }-B${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" + echo "CXXFLAGS=${CXXFLAGS:+"$CXXFLAGS" }-B${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" + echo "LDFLAGS=${LDFLAGS:+"$LDFLAGS" }-B${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" fi - name: Install Ubuntu Container Dependencies From 22fe14f3090a95a35413f863e401200da2099fd2 Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Fri, 20 Nov 2026 18:36:35 -0800 Subject: [PATCH 4/5] CI: Adjust FPM logic for FPM 0.14.0 Use Setup FPM by default Remove libgcc12 dependency, no longer needed by setup-fpm with 0.14+ Update Build FPM rule (disabled) --- .github/workflows/build.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98481c6..885ae59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -273,9 +273,6 @@ jobs: # Brew update takes a VERY long time to do cleanup and we don't care #retry brew update \ # 2>&1 | perl -pe "$BREW_WARNING_FILTER" ; test ${PIPESTATUS[0]} = 0 - # fpm binary distribution for macOS requires gfortran shared libraries from gcc@12 - retry brew install gcc@12 \ - 2>&1 | perl -pe "$BREW_WARNING_FILTER" ; test ${PIPESTATUS[0]} = 0 if [[ ${{ matrix.compiler }} == 'gfortran' && ${COMPILER_VERSION} -gt 15 ]] ; then retry brew install gcc@${COMPILER_VERSION} \ 2>&1 | perl -pe "$BREW_WARNING_FILTER" ; test ${PIPESTATUS[0]} = 0 @@ -324,24 +321,29 @@ jobs: fi - name: Setup FPM - if: ${{ !(runner.os == 'Linux' && runner.arch == 'ARM64') }} + if: true uses: fortran-lang/setup-fpm@main with: github-token: ${{ secrets.GITHUB_TOKEN }} fpm-version: latest - name: Build FPM - if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }} + if: false run: | - export FPM_VERSION=0.13.0 + export FPM_VERSION=0.14.0 for suff in -14 -15 -16 "" -13 -12 ; do GFORTRAN=gfortran$suff if type -P $GFORTRAN ; then break ; fi done - [[ -n "$GFORTRAN" ]] + type -p "$GFORTRAN" mkdir -p fpm-temp/bin cd fpm-temp - curl $CURL_OPTIONS https://github.com/fortran-lang/fpm/releases/download/v$FPM_VERSION/fpm-$FPM_VERSION.F90 -o fpm.F90 + if [[ $FPM_VERSION == 'current' ]] ; then + FPM_ASSET=current/fpm.F90 + else + FPM_ASSET=v$FPM_VERSION/fpm-$FPM_VERSION.F90 + fi + curl $CURL_OPTIONS https://github.com/fortran-lang/fpm/releases/download/$FPM_ASSET -o fpm.F90 $GFORTRAN -fopenmp -o bin/fpm fpm.F90 echo "$PWD/bin" >> "$GITHUB_PATH" From 7c05c16af5a74400d46c2eca5d02587d7a206cc0 Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Fri, 20 Nov 2026 18:44:56 -0800 Subject: [PATCH 5/5] CI: Add LFortran 0.69 --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 885ae59..605f6d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -164,6 +164,10 @@ jobs: compiler: lfortran version: 0.68.0 container: ghcr.io/lfortran/lfortran:v0.68.0 + - os: ubuntu-22.04 + compiler: lfortran + version: 0.69.0 + container: ghcr.io/lfortran/lfortran:v0.69.0 - os: ubuntu-22.04 compiler: lfortran version: latest