diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9efc498..ad9220e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,29 @@ env: ~/.hunter jobs: + Windows_MSVC: + runs-on: windows-2019 + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: ${{ env.CACHE_PATHS }} + key: ${{ github.job }}-${{ env.CACHE_VERSION }} + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + with: + vs-version: "16.11" + + - name: build msvc 2019 16 + continue-on-error: true + run: bash ./scripts/build_win.sh + + - name: show tests dir + run: | + dir .\build\tests_bin\Debug + + MacOS: runs-on: macos-latest steps: diff --git a/CMakeLists.txt b/CMakeLists.txt index e411dee..fec59c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,10 +30,9 @@ find_package(Microsoft.GSL CONFIG REQUIRED) add_subdirectory(src) -if (BUILD_TESTS) - enable_testing() - add_subdirectory(test ${CMAKE_BINARY_DIR}/tests_bin) -endif () + +enable_testing() +add_subdirectory(test ${CMAKE_BINARY_DIR}/tests_bin) ############################################################################### # INSTALLATION @@ -71,4 +70,4 @@ install( EXPORT scaleConfig DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/scale NAMESPACE scale:: -) +) \ No newline at end of file diff --git a/cmake/HunterGate.cmake b/cmake/HunterGate.cmake index bd00e6a..51f3d3d 100644 --- a/cmake/HunterGate.cmake +++ b/cmake/HunterGate.cmake @@ -41,6 +41,7 @@ # Projects: # * https://github.com/hunter-packages/gate/ # * https://github.com/ruslo/hunter +set(CXXFLAGS="-Wno-error=deprecated-copy" cmake CMakeLists.txt) option(HUNTER_ENABLED "Enable Hunter package manager support" ON) @@ -536,4 +537,4 @@ macro(HunterGate) include("${_master_location}") set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES) endif() -endmacro() +endmacro() \ No newline at end of file diff --git a/scripts/build_win.sh b/scripts/build_win.sh new file mode 100644 index 0000000..cb68941 --- /dev/null +++ b/scripts/build_win.sh @@ -0,0 +1,6 @@ +#!/bin/bash -xe + +mkdir build && cd build +cmake .. +cmake --build . +ctest -C Debug \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8b6fba1..ee61674 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -157,4 +157,4 @@ addtest(scale_encode_counter_test ) target_link_libraries(scale_encode_counter_test scale - ) + ) \ No newline at end of file