From 68b983ca308e1fab192804eb7377ccb64fc34d3d Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Fri, 6 Sep 2024 11:51:00 -0400 Subject: [PATCH] ci: brew prefix On intel macOS, brew installs into /usr/local On apple silicon, brew installs into /opt/homebrew Use brew --prefix to resolve the right brew prefix in a platform independent manor --- .github/actions/ngen-build/action.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/ngen-build/action.yaml b/.github/actions/ngen-build/action.yaml index ae9a96383d..cfd01eacaa 100644 --- a/.github/actions/ngen-build/action.yaml +++ b/.github/actions/ngen-build/action.yaml @@ -82,11 +82,11 @@ runs: elif [ ${{ runner.os }} == 'macOS' ] then brew install netcdf netcdf-cxx netcdf-fortran - echo "LIBRARY_PATH=/usr/local/lib/:$LIBRARY_PATH" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH" >> $GITHUB_ENV - echo "LDFLAGS=-L/usr/local/lib" >> $GITHUB_ENV + echo "LIBRARY_PATH=$(brew --prefix)/lib/:$LIBRARY_PATH" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=$(brew --prefix)/lib/:$LD_LIBRARY_PATH" >> $GITHUB_ENV + echo "LDFLAGS=-L$(brew --prefix)/lib" >> $GITHUB_ENV echo "LIB=$LD_LIBRARY_PATH" >> $GITHUB_ENV - echo "NETCDF=/usr/local" >> $GITHUB_ENV + echo "NETCDF=$(brew --prefix)" >> $GITHUB_ENV fi shell: bash