Skip to content

Commit cfb27c9

Browse files
committed
move linker flags
1 parent 674cab2 commit cfb27c9

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

ci/github-actions/setup.sh

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,7 @@ else
126126
ulimit -a
127127
ulimit -n 4096
128128
ulimit -a
129-
130-
if [[ "${INTEL}" == "false" ]]; then
131-
# Ensure gmp exists for native gems (bigdecimal link step uses -lgmp)
132-
brew install gmp
133-
134-
# Help the portable ruby toolchain find ARM Homebrew libs/headers
135-
export CPPFLAGS="${CPPFLAGS:-} -I/opt/homebrew/include"
136-
export LDFLAGS="${LDFLAGS:-} -L/opt/homebrew/lib"
137-
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:-}:/opt/homebrew/lib/pkgconfig"
138-
fi
129+
139130
elif [ "${ImageOS}" == "ubuntu22" ]; then
140131
echo "Setting up Ubuntu for unit tests and Rubocop"
141132
# install pipe viewer to throttle printing logs to screen (not a big deal in linux, but it is in osx)
@@ -198,6 +189,19 @@ else
198189
# test openssl
199190
ruby ${GITHUB_WORKSPACE}/ci/github-actions/verify_openstudio.rb
200191

192+
if [[ "${ImageOS}" == "macos15" && "${INTEL}" == "false" ]]; then
193+
brew list gmp >/dev/null 2>&1 || brew install gmp
194+
BREW_PREFIX="$(brew --prefix)"
195+
GMP_PREFIX="$(brew --prefix gmp 2>/dev/null || echo "${BREW_PREFIX}")"
196+
197+
export CPPFLAGS="-I${BREW_PREFIX}/include ${CPPFLAGS:-}"
198+
export LDFLAGS="-L${BREW_PREFIX}/lib ${LDFLAGS:-}"
199+
export PKG_CONFIG_PATH="${BREW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
200+
201+
# (optional but helpful) force this one gem’s build to use gmp prefix
202+
export BUNDLE_BUILD__BIGDECIMAL="--with-opt-dir=${GMP_PREFIX}"
203+
fi
204+
201205
ruby "${GITHUB_WORKSPACE}/bin/openstudio_meta" install_gems --with_test_develop --debug --verbose --use_cached_gems
202206
bundle -v
203207
# create dir for output files which will be generated in case of failure

0 commit comments

Comments
 (0)