added appveyor and lgtm

This commit is contained in:
Marius Bancila 2018-11-15 13:38:55 +02:00
parent 6a1cc32637
commit d1538cb326
3 changed files with 48 additions and 0 deletions

View File

@ -7,6 +7,8 @@ include_directories(${CMAKE_SOURCE_DIR}/catch)
file(GLOB headers ${CMAKE_SOURCE_DIR}/include/*.h)
file(GLOB SOURCES "test/*.cpp" "include/*.cpp")
include(CTest)
if(WIN32)
message(status "Setting MSVC flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHc /std:c++latest")
@ -36,3 +38,16 @@ else()
endif()
message(status "** CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
enable_testing()
add_test(NAME "test_uuid" COMMAND "test_uuid" "-r compact")
set_tests_properties("test_uuid"
PROPERTIES
PASS_REGULAR_EXPRESSION "Passed all.*")
set_tests_properties("test_uuid"
PROPERTIES
FAIL_REGULAR_EXPRESSION "Failed \\d+ test cases")
set_tests_properties("test_uuid"
PROPERTIES
TIMEOUT 120)

28
appveyor.yml Normal file
View File

@ -0,0 +1,28 @@
version: '{build}'
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
platform: x86
FLAGS: ""
GENERATOR: Visual Studio 15 2017
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
platform: x64
FLAGS: ""
GENERATOR: Visual Studio 15 2017
init:
- cmake --version
- msbuild /version
before_build:
- mkdir build
- cd build
- cmake .. -G "%GENERATOR%" -DCMAKE_CXX_FLAGS="%FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin"
build_script:
- cmake --build . --config Release
test_script:
- ctest -C Release -V -j

5
lgtm.yml Normal file
View File

@ -0,0 +1,5 @@
path_classifiers:
test:
- "test"
- exclude: "catch"