Skip to content

Commit

Permalink
ci: attempt to add Homebrew headers and shared libraries to search path
Browse files Browse the repository at this point in the history
On `macos-14` arm64 runners, Homebrew is installed in `/opt/homebrew`
instead of `/usr/local` prefix, and its headers and shared libraries
are not in the default search path. Add them by setting `CPPFLAGS`
and `LDFLAGS`. This is required by `pygraphviz`, which needs to
build its extension and link it against Homebrew-installed `graphviz`.
  • Loading branch information
rokm committed Jan 7, 2025
1 parent 80851d3 commit 0b1296f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ jobs:
# Requires by pygraphviz
brew install graphviz
# On macos-14 arm64 runners, Homebrew is installed in /opt/homebrew instead of /usr/local prefix, and
# its headers and shared libraries are not in the default search path. Add them by setting CPPFLAGS
# and LDFLAGS. This is required by `pygraphviz`.
if [ "$(brew --prefix)" = "/opt/homebrew" ]; then
echo "CPPFLAGS=-I/opt/homebrew/include${CPPFLAGS+ ${CPPFLAGS}}" >> $GITHUB_ENV
echo "LDFLAGS=-L/opt/homebrew/lib${LDFLAGS+ ${LDFLAGS}}" >> $GITHUB_ENV
fi
- name: Install dependencies
shell: bash
run: |
Expand Down

0 comments on commit 0b1296f

Please sign in to comment.