diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f316ca1e6..15f15259b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -28,12 +28,19 @@ jobs: - name: Install OpenSSL uses: ./.github/actions/install-openssl id: install-openssl - - run: ./scripts/configure-cmake-integration-tests.sh + - name: Configure CMake Integration Tests + run: ./scripts/configure-cmake-integration-tests.sh env: # Note: these are consumed by the SDK's CMake project, and then will be passed into the cmake integration tests # so that the test projects will know where to find Boost and OpenSSL. More info in the README. BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} - - run: | + - name: Run CMake Integration Tests + run: | export CTEST_OUTPUT_ON_FAILURE=1 cd build/cmake-tests && ctest + env: + # Note: these are consumed by the SDK's CMake project, and then will be passed into the cmake integration tests + # so that the test projects will know where to find Boost and OpenSSL. More info in the README. + BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} + OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} diff --git a/cmake-tests/declareProjectTest.cmake b/cmake-tests/declareProjectTest.cmake index 0cca96356..2d6cd1dc7 100644 --- a/cmake-tests/declareProjectTest.cmake +++ b/cmake-tests/declareProjectTest.cmake @@ -33,8 +33,6 @@ macro(declare_add_subdirectory_test name) -DLAUNCHDARKLY_SOURCE_DIR=${PROJECT_SOURCE_DIR} # Do not setup all of the SDK's testing machinery, which would normally happen when calling add_subdirectory. -DBUILD_TESTING=OFF - # Forward variables from the SDK project to the test project, if set. - $<$:-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}> ${CMAKE_CURRENT_SOURCE_DIR}/project ) @@ -78,8 +76,6 @@ macro(declare_find_package_test name) # Since project/CMakeLists.txt uses find_package(), it needs to know where to find # ldserverapiConfig.cmake. That can be found where the SDK is installed, which is CMAKE_INSTALL_PREFIX. -DCMAKE_PREFIX_PATH=${CMAKE_INSTALL_PREFIX} - # Forward variables from the SDK project to the test project, if set. - $<$:-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}> ${CMAKE_CURRENT_SOURCE_DIR}/project )