Skip to content

Commit

Permalink
ci(macOS): 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 committed Sep 6, 2024
1 parent 97cabb8 commit e1859a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/Build_and_Run_Standalone_Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
elif [ ${{ runner.os }} == 'macOS' ]
then
brew install netcdf netcdf-cxx netcdf-fortran
echo "LIBRARY_PATH=/usr/local/lib/:$LIBRARY_PATH" >> $GITHUB_ENV
echo "LDFLAGS=-L/usr/local/lib" >> $GITHUB_ENV
echo "INCLUDE=/usr/local/include" >> $GITHUB_ENV
echo "NETCDF=/usr/local" >> $GITHUB_ENV
echo "LIBRARY_PATH=$(brew --prefix)/lib/:$LIBRARY_PATH" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix)/lib" >> $GITHUB_ENV
echo "INCLUDE=$(brew --prefix)/include" >> $GITHUB_ENV
echo "NETCDF=$(brew --prefix)" >> $GITHUB_ENV
fi
# Build and run noah executable
Expand Down

0 comments on commit e1859a5

Please sign in to comment.