Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -71,4 +70,4 @@ install(
EXPORT scaleConfig
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/scale
NAMESPACE scale::
)
)
3 changes: 2 additions & 1 deletion cmake/HunterGate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -536,4 +537,4 @@ macro(HunterGate)
include("${_master_location}")
set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
endif()
endmacro()
endmacro()
6 changes: 6 additions & 0 deletions scripts/build_win.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -xe

mkdir build && cd build
cmake ..
cmake --build .
ctest -C Debug
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ addtest(scale_encode_counter_test
)
target_link_libraries(scale_encode_counter_test
scale
)
)