diff --git a/.ci/build.sh b/.ci/build.sh index 0c6172f2413a0..c7aaeef4ba486 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -138,7 +138,10 @@ echo "=====================================" mkdir build && cd build if [ "$OSTYPE" = "linux-gnu" ]; then install_prefix_option="-DCMAKE_INSTALL_PREFIX=/usr/" +elif [ "$OSTYPE" = "darwin" ]; then + install_prefix_option="-DCMAKE_INSTALL_PREFIX=/usr/local/" fi + cmake .. \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -DDART_VERBOSE=ON \ @@ -195,6 +198,7 @@ fi # dartpy: run a Python example using installed dartpy if [ "$BUILD_DARTPY" = "ON" ]; then + echo $PYTHONPATH cd $BUILD_DIR/python/examples/hello_world python3 main.py fi diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 76b9ec91ba72c..8350d2a431e63 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -25,6 +25,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Setup upterm session + uses: lhotari/action-upterm@v1 - name: Install Dependencies env: INSTALL_OSG_HEAD: OFF # To avoid building OSG, until 3.7 is released. diff --git a/python/examples/CMakeLists.txt b/python/examples/CMakeLists.txt index d197725e4c442..b2ef7663019a3 100644 --- a/python/examples/CMakeLists.txt +++ b/python/examples/CMakeLists.txt @@ -11,7 +11,7 @@ function(dartpy_add_example example_name) # ARGN for source file endif() add_custom_target(${example_name} COMMAND ${CMAKE_COMMAND} -E echo "Running pytest by: PYTHONPATH=${DART_DARTPY_BUILD_DIR} ${PYTHON_EXECUTABLE} ${source}" - COMMAND PYTHONPATH=${DART_DARTPY_BUILD_DIR} ${PYTHON_EXECUTABLE} ${source} + COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${DART_DARTPY_BUILD_DIR} ${PYTHON_EXECUTABLE} ${source}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} SOURCES ${source} )