Skip to content

Commit

Permalink
ci: brew prefix
Browse files Browse the repository at this point in the history
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
  • Loading branch information
aaraney authored and program-- committed Sep 6, 2024
1 parent 1cb6e41 commit ad55e71
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/actions/ngen-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ad55e71

Please sign in to comment.