Skip to content

Commit

Permalink
chore(ci): don't use gcc on macOS MONGOSH-2029 (#2390)
Browse files Browse the repository at this point in the history
* chore(ci): use toolchain v4 for arm64 runners

* Don't use gcc on macOS

* print clang versions
  • Loading branch information
nirinchev authored Mar 3, 2025
1 parent 1ab24fd commit 06242f9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
28 changes: 18 additions & 10 deletions .evergreen/install-node-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,25 @@ else
echo "[INFO] Choosing v3 because OS_ARCH is $OS_ARCH"
export TOOLCHAIN_PATH='/opt/mongodbtoolchain/v3/bin'
fi
export PATH="$TOOLCHAIN_PATH:/opt/mongodbtoolchain/v4/bin:/opt/mongodbtoolchain/v3/bin:${ORIGINAL_PATH}"
export PATH="$TOOLCHAIN_PATH:${ORIGINAL_PATH}"

export PATH="/opt/mongodbtoolchain/v4/bin:/opt/mongodbtoolchain/v3/bin:${ORIGINAL_PATH}"
export CC=gcc
export CXX=g++

if [ `uname` = Darwin ]; then
echo "Using clang version:"
(which clang && clang --version)

echo "Using clang++ version:"
(which clang++ && clang++ --version)
else
export CC=gcc
export CXX=g++

echo "Using gcc version:"
(which gcc && gcc --version)

echo "Using g++ version:"
(which g++ && g++ --version)
fi

NODE_JS_TARBALL_FILE="node-v${NODE_JS_VERSION}.tar.gz"
NODE_JS_TARBALL_PATH="${EVGDIR}/${NODE_JS_TARBALL_FILE}"
Expand All @@ -29,12 +43,6 @@ NODE_JS_SOURCE_PATH="${EVGDIR}/node-v${NODE_JS_VERSION}"
# scripts to simply do `nvm use`
NODE_JS_INSTALL_DIR="${NVM_DIR}/versions/node/v${NODE_JS_VERSION}"

echo "Using gcc version:"
(which gcc && gcc --version)

echo "Using g++ version:"
(which g++ && g++ --version)

echo "Using python3 version:"
(which python3 && python3 --version) || true

Expand Down
22 changes: 15 additions & 7 deletions .evergreen/setup-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set -e
set -x

OS_ARCH="$(uname "-m")"
if [ "$OS_ARCH" = "ppc64le" ] || [ "$OS_ARCH" = "ppc64" ] ; then
if [ "$OS_ARCH" = "ppc64le" ] || [ "$OS_ARCH" = "ppc64" ]; then
echo "[INFO] Choosing v4 because OS_ARCH is $OS_ARCH"
export TOOLCHAIN_PATH='/opt/mongodbtoolchain/v4/bin'
else
Expand Down Expand Up @@ -38,14 +38,22 @@ if [ "$OS" != "Windows_NT" ]; then
set -x
export PATH="$NVM_BIN:$PATH"

export CC=gcc
export CXX=g++
if [ `uname` = Darwin ]; then
echo "Using clang version:"
(which clang && clang --version)

echo "Using gcc version:"
(which gcc && gcc --version)
echo "Using clang++ version:"
(which clang++ && clang++ --version)
else
export CC=gcc
export CXX=g++

echo "Using g++ version:"
(which g++ && g++ --version)
echo "Using gcc version:"
(which gcc && gcc --version)

echo "Using g++ version:"
(which g++ && g++ --version)
fi

if [ -x "$BASEDIR/git-2/git" ]; then
export GIT_EXEC_PATH="$BASEDIR/git-2"
Expand Down

0 comments on commit 06242f9

Please sign in to comment.