diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 000000000..3e71e6cc9 --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,33 @@ +name: CMake + +on: + pull_request: + branches: + - '**' + +env: + BUILD_TYPE: Release + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUAGENT_INSTALLER=ON + + - name: Build + run: | + cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + cd ${{github.workspace}}/build + cpack -C CPackConfig.cmake + cpack -C CPackSourceConfig.cmake + + # - name: Test + # working-directory: ${{github.workspace}}/build + # # Execute tests defined by the CMake configuration. + # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + # run: ctest -C ${{env.BUILD_TYPE}} + diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c464f655..fde0e746a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,7 +84,7 @@ if(UAGENT_FAST_PROFILE) set(_fastdds_version 2.0.2) set(_fastdds_tag v2.0.2) set(_foonathan_memory_tag c619113) # This tag should be updated every time it gets updated in foonathan_memory_vendor eProsima's package - endif() + endif() list(APPEND _deps "fastrtps\;${_fastdds_version}") endif() @@ -556,11 +556,10 @@ if(WIN32 AND UAGENT_INSTALLER AND UAGENT_BUILD_EXECUTABLE) "Uninstall.exe" "Uninstall ${PRODUCT_NAME_SHORT}" ) if(CMAKE_CL_64) - file(TO_NATIVE_PATH $ENV{PROGRAMFILES}/eProsima _install_root) - set(CPACK_NSIS_INSTALL_ROOT ${_install_root}) + file(TO_NATIVE_PATH $ENV{PROGRAMFILES}/eProsima CPACK_NSIS_INSTALL_ROOT) else() set(PF86_STR "PROGRAMFILES(x86)") - set(CPACK_NSIS_INSTALL_ROOT "$ENV{${PF86_STR}}\\eProsima") + file(TO_NATIVE_PATH "$ENV{${PF86_STR}}/eProsima" CPACK_NSIS_INSTALL_ROOT) endif() # Setup configure files for NSIS installer. diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake index ef4da2353..8a5074d14 100644 --- a/cmake/SuperBuild.cmake +++ b/cmake/SuperBuild.cmake @@ -239,8 +239,6 @@ ExternalProject_Add(uagent CMAKE_CACHE_ARGS -DUAGENT_SUPERBUILD:BOOL=OFF -DUAGENT_USE_INTERNAL_GTEST:BOOL=${UAGENT_USE_INTERNAL_GTEST} - INSTALL_COMMAND - "" DEPENDS ${_deps} )