From 8e4c06879ea1be5c627ee8c5d50904234e22d4f1 Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Thu, 8 Oct 2026 21:07:26 -0700 Subject: [PATCH] CI: Add LFortran on macOS --- .github/workflows/build.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d67e6f9..ed971576 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,6 +149,14 @@ jobs: # --- lfortran coverage --- + # https://github.com/fortran-lang/homebrew-fortran + - os: macos-15 + compiler: lfortran + version: 0.67.0 + - os: macos-26 + compiler: lfortran + version: 0.67.0 + # https://github.com/lfortran/lfortran/pkgs/container/lfortran - os: ubuntu-22.04 compiler: lfortran @@ -331,6 +339,9 @@ jobs: run: | retry apt update retry apt install -y build-essential pkg-config make git curl cmake + if [[ ${{ matrix.compiler }} == 'lfortran' ]] ; then + retry apt install -y llvm clang + fi - name: Install Ubuntu Native Dependencies if: ${{ contains(matrix.os, 'ubuntu') && matrix.container == '' && !matrix.brew_via_install }} @@ -361,7 +372,7 @@ jobs: if: ${{ contains(matrix.os, 'macos') && !matrix.macports }} run: | # silence Homebrew tap trust warnings: - (set +e ; brew untap -f aws/tap hashicorp/tap ; brew trust azure/bicep ; echo ) \ + (set +e ; brew untap -f aws/tap hashicorp/tap ; brew trust azure/bicep ) \ 2>&1 | perl -pe "$BREW_WARNING_FILTER" # set some Homebrew knobs to accelerate installation # but only when we are not simulating the user environment brew-via-install workflow @@ -388,6 +399,10 @@ jobs: retry brew install gcc@${COMPILER_VERSION} \ 2>&1 | perl -pe "$BREW_WARNING_FILTER" ; test ${PIPESTATUS[0]} = 0 fi + if [[ ${{ matrix.compiler }} == 'lfortran' ]] ; then + retry brew install fortran-lang/fortran/lfortran \ + 2>&1 | perl -pe "$BREW_WARNING_FILTER" ; test ${PIPESTATUS[0]} = 0 + fi - name: Install macOS Dependencies (Macports) if: matrix.macports @@ -482,8 +497,6 @@ jobs: - name: Setup lfortran dependencies and variables if: ${{ matrix.compiler == 'lfortran' }} run: | - retry apt update - retry apt install -y llvm clang if [ ${{ contains(matrix.container, 'ghcr.io/lfortran') }} = true ]; then ls -alR /app # Add container lfortran to PATH: