File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,14 +77,16 @@ jobs:
7777 sudo /Applications/CMake.app/Contents/bin/cmake-gui --install
7878 hdiutil detach /Volumes/cmake-3.26.4-macos-universal
7979 rm cmake.dmg
80- export PATH=" /Applications/CMake.app/Contents/bin:$PATH"
80+ echo "CMAKE_PATH= /Applications/CMake.app/Contents/bin" >> $GITHUB_ENV
8181
8282 - name : Configure and build
8383 env :
8484 OPENSSL_ROOT_DIR : /opt/homebrew/opt/openssl@3
8585 OPENSSL_LIBRARIES : /opt/homebrew/opt/openssl@3/lib
8686 OPENSSL_INCLUDE_DIR : /opt/homebrew/opt/openssl@3/include
87+ CMAKE_PATH : /Applications/CMake.app/Contents/bin
8788 run : |
89+ export PATH="/Applications/CMake.app/Contents/bin:$PATH"
8890 ./build.sh -DCMAKE_BUILD_TYPE=debug -DONESDK_WITH_TEST=ON
8991
9092 - name : Run tests
Original file line number Diff line number Diff line change @@ -3,12 +3,19 @@ set -e # Exit on any error
33
44# Function to check CMake version
55check_cmake_version () {
6- if ! command -v cmake & > /dev/null; then
7- echo " Error: CMake is not installed!"
6+ # Use CMAKE_PATH if provided, otherwise use default cmake command
7+ if [ -n " $CMAKE_PATH " ]; then
8+ CMAKE_CMD=" $CMAKE_PATH /cmake"
9+ else
10+ CMAKE_CMD=" cmake"
11+ fi
12+
13+ if ! command -v $CMAKE_CMD & > /dev/null; then
14+ echo " Error: CMake is not installed at $CMAKE_CMD !"
815 exit 1
916 fi
1017
11- cmake_version=$( cmake --version | head -n1 | cut -d' ' -f3)
18+ cmake_version=$( $CMAKE_CMD --version | head -n1 | cut -d' ' -f3)
1219 cmake_major=$( echo $cmake_version | cut -d' .' -f1)
1320 cmake_minor=$( echo $cmake_version | cut -d' .' -f2)
1421
4855mkdir -p build
4956cd build
5057
58+ # Use CMAKE_PATH if provided, otherwise use default cmake command
59+ if [ -n " $CMAKE_PATH " ]; then
60+ CMAKE_CMD=" $CMAKE_PATH /cmake"
61+ else
62+ CMAKE_CMD=" cmake"
63+ fi
64+
5165echo " Running cmake with arguments: $@ "
52- cmake $@ ..
66+ $CMAKE_CMD $@ ..
5367if [ $? -ne 0 ]; then
5468 echo " CMake configuration failed!"
5569 exit 1
You can’t perform that action at this time.
0 commit comments