Skip to content

Commit

Permalink
.circleci/config.yml: introduce NUTCI_HOMEBREW_BASEDIR to parameteriz…
Browse files Browse the repository at this point in the history
…e location of Homebrew libs, includes and ccache [networkupstools#2502]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jul 3, 2024
1 parent 94f03ae commit 7ef30f7
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ jobs:
BREW_MORE:
type: string
default: "" # e.g. "avahi" for all-driver tests
NUTCI_HOMEBREW_BASEDIR:
# See https://docs.brew.sh/Installation :
# * /opt/homebrew for Apple Silicon,
# * /usr/local for macOS Intel and
# * /home/linuxbrew/.linuxbrew for Linux
type: string
default: "/opt/homebrew" # since July 2024 CircleCI only serves Apple Silicon instances
#default: "/usr/local" # was when CircleCI builders had x86

environment:
CC: << parameters.CC >>
Expand Down Expand Up @@ -111,15 +119,14 @@ jobs:
# uses of sem_init() and sem_destroy() in nut-scanner.c)
# NOTE: CANBUILD_NIT_TESTS=yes to check if single-executor environments
# do not have a problem with it.
# NOTE: x86 Homebrew versions used CI_CCACHE_SYMLINKDIR="/usr/local/opt/ccache/libexec"
- run:
name: "ci_build"
command: |-
CI_CCACHE_SYMLINKDIR="/opt/homebrew/opt/ccache/libexec" \
CI_CCACHE_SYMLINKDIR="${NUTCI_HOMEBREW_BASEDIR}/opt/ccache/libexec" \
CANBUILD_NIT_TESTS=yes \
CFLAGS="$CC_STDVER -Wno-poison-system-directories -Wno-deprecated-declarations -I/opt/homebrew/include" \
CXXFLAGS="$CXX_STDVER -Wno-poison-system-directories -I/opt/homebrew/include" \
LDFLAGS="-L/opt/homebrew/lib -L/usr/local/lib" \
CFLAGS="$CC_STDVER -Wno-poison-system-directories -Wno-deprecated-declarations -I${NUTCI_HOMEBREW_BASEDIR}/include" \
CXXFLAGS="$CXX_STDVER -Wno-poison-system-directories -I${NUTCI_HOMEBREW_BASEDIR}/include" \
LDFLAGS="-L${NUTCI_HOMEBREW_BASEDIR}/lib -L/usr/local/lib" \
./ci_build.sh
- run:
Expand Down

0 comments on commit 7ef30f7

Please sign in to comment.