[CI] Run tests with CMake on Windows
Build and run tests on Windows with CMake
This commit is contained in:
committed by
Nick Terrell
parent
94c102038b
commit
c1e995321e
@@ -272,14 +272,15 @@ jobs:
|
|||||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
|
||||||
- name: Add MSBuild to PATH
|
- name: Add MSBuild to PATH
|
||||||
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # tag=v2.0.0
|
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # tag=v2.0.0
|
||||||
- name: Build
|
- name: Build & Test
|
||||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||||
run: |
|
run: |
|
||||||
cd build\cmake
|
cd build\cmake
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake.exe -G "${{matrix.generator}}" ${{matrix.flags}} ..
|
cmake.exe -G "${{matrix.generator}}" ${{matrix.flags}} -DCMAKE_BUILD_TYPE=Debug -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_ZSTREAM_FLAGS=-T30s -DZSTD_FUZZER_FLAGS=-T30s -DZSTD_FULLBENCH_FLAGS=-i0 ..
|
||||||
cmake.exe --build .
|
cmake.exe --build .
|
||||||
|
ctest.exe -V -C Debug
|
||||||
|
|
||||||
msbuild-visual-studio:
|
msbuild-visual-studio:
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ if (NOT MSVC)
|
|||||||
target_compile_options(fullbench PRIVATE "-Wno-deprecated-declarations")
|
target_compile_options(fullbench PRIVATE "-Wno-deprecated-declarations")
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(fullbench libzstd_static)
|
target_link_libraries(fullbench libzstd_static)
|
||||||
add_test(NAME fullbench COMMAND fullbench ${ZSTD_FULLBENCH_FLAGS})
|
add_test(NAME fullbench COMMAND "$<TARGET_FILE:fullbench>" ${ZSTD_FULLBENCH_FLAGS})
|
||||||
|
|
||||||
#
|
#
|
||||||
# fuzzer
|
# fuzzer
|
||||||
@@ -73,7 +73,7 @@ endif()
|
|||||||
target_link_libraries(fuzzer libzstd_static)
|
target_link_libraries(fuzzer libzstd_static)
|
||||||
AddTestFlagsOption(ZSTD_FUZZER_FLAGS "$ENV{FUZZERTEST} $ENV{FUZZER_FLAGS}"
|
AddTestFlagsOption(ZSTD_FUZZER_FLAGS "$ENV{FUZZERTEST} $ENV{FUZZER_FLAGS}"
|
||||||
"Semicolon-separated list of flags to pass to the fuzzer test (see `fuzzer -h` for usage)")
|
"Semicolon-separated list of flags to pass to the fuzzer test (see `fuzzer -h` for usage)")
|
||||||
add_test(NAME fuzzer COMMAND fuzzer ${ZSTD_FUZZER_FLAGS})
|
add_test(NAME fuzzer COMMAND "$<TARGET_FILE:fuzzer>" ${ZSTD_FUZZER_FLAGS})
|
||||||
# Disable the timeout since the run time is too long for the default timeout of
|
# Disable the timeout since the run time is too long for the default timeout of
|
||||||
# 1500 seconds and varies considerably between low-end and high-end CPUs.
|
# 1500 seconds and varies considerably between low-end and high-end CPUs.
|
||||||
# set_tests_properties(fuzzer PROPERTIES TIMEOUT 0)
|
# set_tests_properties(fuzzer PROPERTIES TIMEOUT 0)
|
||||||
@@ -88,7 +88,7 @@ endif()
|
|||||||
target_link_libraries(zstreamtest libzstd_static)
|
target_link_libraries(zstreamtest libzstd_static)
|
||||||
AddTestFlagsOption(ZSTD_ZSTREAM_FLAGS "$ENV{ZSTREAM_TESTTIME} $ENV{FUZZER_FLAGS}"
|
AddTestFlagsOption(ZSTD_ZSTREAM_FLAGS "$ENV{ZSTREAM_TESTTIME} $ENV{FUZZER_FLAGS}"
|
||||||
"Semicolon-separated list of flags to pass to the zstreamtest test (see `zstreamtest -h` for usage)")
|
"Semicolon-separated list of flags to pass to the zstreamtest test (see `zstreamtest -h` for usage)")
|
||||||
add_test(NAME zstreamtest COMMAND zstreamtest ${ZSTD_ZSTREAM_FLAGS})
|
add_test(NAME zstreamtest COMMAND "$<TARGET_FILE:zstreamtest>" ${ZSTD_ZSTREAM_FLAGS})
|
||||||
|
|
||||||
#
|
#
|
||||||
# playTests.sh
|
# playTests.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user