From ba92f39053a4324642a7899304c44d84414e5e6e Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Sat, 31 Aug 2024 22:13:58 -0700 Subject: [PATCH] Fix CI --- .github/workflows/build.yml | 4 ++-- bfg9000/tools/msvc/__init__.py | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb360baa..99df98e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -212,9 +212,9 @@ jobs: - name: Install macOS dependencies if: startsWith(matrix.os, 'macos-') run: | - brew install bison boost libogg ninja pkg-config qt5 + brew install bison boost gfortran libogg ninja pkg-config qt5 brew link qt5 --force - echo "FC=gfortran-11" >> ${GITHUB_ENV} + echo "FC=/opt/homebrew/bin/gfortran" >> ${GITHUB_ENV} echo "YACC=/opt/homebrew/opt/bison/bin/bison" >> ${GITHUB_ENV} echo "CPATH=/opt/homebrew/include" >> ${GITHUB_ENV} echo "LIBRARY_PATH=/opt/homebrew/lib" >> ${GITHUB_ENV} diff --git a/bfg9000/tools/msvc/__init__.py b/bfg9000/tools/msvc/__init__.py index 5845af5e..6caf708c 100644 --- a/bfg9000/tools/msvc/__init__.py +++ b/bfg9000/tools/msvc/__init__.py @@ -90,8 +90,13 @@ def _parse_brand(env, command, version_output): @staticmethod def check_command(env, command): - return env.execute(command + ['-?'], stdout=shell.Mode.pipe, - stderr=shell.Mode.stdout) + output = env.execute(command + ['-?'], stdout=shell.Mode.pipe, + stderr=shell.Mode.stdout) + # XXX: The `templight` tool exits with zero status even though it + # properly reports that it doesn't understand the "-?" option. + if 'error: unknown argument' in output: + raise shell.CalledProcessError(1, output) + return output @property def flavor(self):