diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a665209..d043a7e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -165,6 +165,14 @@ jobs: version: latest container: ghcr.io/lfortran/lfortran:latest + # 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 + container: image: ${{ matrix.container }} @@ -174,7 +182,7 @@ jobs: FFLAGS: ${{ matrix.extra_flags }} FPM_FLAGS: --profile release --verbose CURL_OPTIONS: --retry 10 --retry-all-errors --fail -L - BREW_WARNING_FILTER: 's/^[[:punct:]]*warning[[:punct:]]*(You are using macOS)/warn: \1/i' + BREW_WARNING_FILTER: 's/^[[:punct:]]+warning[[:punct:]]+/warning: /i' steps: - name: Checkout code @@ -214,7 +222,8 @@ jobs: chmod +x install-homebrew.sh env CI=1 ./install-homebrew.sh HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" - retry ${HOMEBREW_PREFIX}/bin/brew install -v gcc@${COMPILER_VERSION} binutils + 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" : Homebrew GCC@15 needs binutils 2.44+ @@ -241,7 +250,8 @@ jobs: if: ${{ contains(matrix.os, 'macos') }} run: | # silence Homebrew tap trust warnings: - (set +e ; brew untap -f aws/tap hashicorp/tap 2>&1 | perl -pe 's/^::*//;s/^##*//' ; 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 if [[ -z "${{ matrix.brew_via_install }}" ]] ; then @@ -254,7 +264,8 @@ jobs: - name: Install macOS Dependencies if: contains(matrix.os, 'macos') run: | - retry brew update + 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 @@ -262,6 +273,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 LLVM flang on macOS if: contains(matrix.os, 'macos') && matrix.compiler == 'flang'