Skip to content

Commit f212875

Browse files
Added macos tests
Signed-off-by: sougata-progress <sougatab@progress.com>
1 parent 04448a8 commit f212875

1 file changed

Lines changed: 35 additions & 23 deletions

File tree

.expeditor/scripts/verify/run_cargo_test.sh

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,33 +38,39 @@ case "$(uname)" in
3838
export PATH=$PATH:$old_path
3939
;;
4040
"Darwin")
41-
echo "--- Setting up macOS environment (using homebrew - habitat packages have filesystem restrictions on macOS)"
42-
# Install dependencies using homebrew due to habitat macOS filesystem restrictions
43-
if ! command -v pkg-config &> /dev/null || ! pkg-config --exists libzmq; then
44-
if ! brew list zeromq &>/dev/null; then
45-
echo "Installing zeromq..."
46-
brew install zeromq
47-
fi
48-
fi
49-
50-
if ! command -v protoc &> /dev/null; then
51-
if ! brew list protobuf &>/dev/null; then
52-
echo "Installing protobuf..."
53-
brew install protobuf
54-
fi
55-
fi
56-
41+
echo "--- Setting up macOS environment (following existing macOS build patterns)"
42+
# Follow the same approach as existing macOS builds: minimal homebrew installs
43+
# Based on support/mac/install_dev_0_mac_latest.sh and build_mac_package.sh
44+
5745
# Install rust toolchain
5846
install_rustup
5947
install_rust_toolchain "$toolchain"
6048

61-
# Set up environment variables for macOS
62-
export LIBZMQ_PREFIX
63-
LIBZMQ_PREFIX=$(brew --prefix zeromq)
49+
# Install minimal dependencies (following existing patterns)
50+
if ! command -v pkg-config &> /dev/null; then
51+
echo "Installing pkg-config..."
52+
brew install pkg-config
53+
fi
6454

65-
# Use DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH for macOS
66-
export DYLD_LIBRARY_PATH
67-
DYLD_LIBRARY_PATH="$(brew --prefix zeromq)/lib"
55+
if ! command -v protoc &> /dev/null; then
56+
echo "Installing protobuf (minimal)..."
57+
brew install protobuf
58+
fi
59+
60+
# Only install zeromq if pkg-config doesn't find it
61+
if ! pkg-config --exists libzmq; then
62+
echo "Installing zeromq..."
63+
brew install zeromq --without-libnorm --without-libsodium
64+
fi
65+
66+
# Set up environment variables for macOS (following existing patterns)
67+
if pkg-config --exists libzmq; then
68+
export LIBZMQ_PREFIX
69+
LIBZMQ_PREFIX=$(pkg-config --variable=prefix libzmq)
70+
export DYLD_LIBRARY_PATH
71+
DYLD_LIBRARY_PATH="$LIBZMQ_PREFIX/lib"
72+
echo "Using zeromq at $LIBZMQ_PREFIX"
73+
fi
6874
;;
6975
esac
7076

@@ -75,7 +81,13 @@ case "$(uname)" in
7581
PROTOC=$(hab pkg path core/protobuf)/bin/protoc
7682
;;
7783
"Darwin")
78-
PROTOC=$(brew --prefix protobuf)/bin/protoc
84+
if command -v protoc &> /dev/null; then
85+
PROTOC=$(command -v protoc)
86+
echo "Using protoc at $PROTOC"
87+
else
88+
echo "Warning: protoc not found"
89+
unset PROTOC
90+
fi
7991
;;
8092
esac
8193

0 commit comments

Comments
 (0)