Skip to content

Commit

Permalink
ci unittest update
Browse files Browse the repository at this point in the history
  • Loading branch information
injae committed Feb 28, 2022
1 parent 5200f57 commit 1924bb3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 28 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
ubuntu-bionic-gcc:
runs-on: ubuntu-18.04
env:
CMAKE_FLAGS: '-DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON -DSERDEPP_USE_RAPIDJSON=ON -DSERDEPP_USE_FMT=ON'
CMAKE_FLAGS: '-DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON -DSERDEPP_USE_RAPIDJSON=ON -DSERDEPP_USE_FMT=ON -DSERDEPP_BUILD_TESTING=ON -DSERDEPP_USE_CATCH2=ON'
strategy:
matrix:
build-type: ['Release', 'Debug']
Expand Down Expand Up @@ -35,14 +35,12 @@ jobs:
- name: Run Test Script
run: |
cd build/${{matrix.build-type}}
./serde_example
./serde_example1
./simple_example
ctest .
ubuntu-bionic-llvm:
runs-on: ubuntu-18.04
env:
CMAKE_FLAGS: '-DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON -DSERDEPP_USE_RAPIDJSON=ON -DSERDEPP_USE_FMT=ON'
CMAKE_FLAGS: '-DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON -DSERDEPP_USE_RAPIDJSON=ON -DSERDEPP_USE_FMT=ON -DSERDEPP_BUILD_TESTING=ON -DSERDEPP_USE_CATCH2=ON'
strategy:
matrix:
build-type: ['Release', 'Debug']
Expand Down Expand Up @@ -73,7 +71,5 @@ jobs:
- name: Run Test Script
run: |
cd build/${{matrix.build-type}}
./serde_example
./serde_example1
./simple_example
ctest .
6 changes: 2 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
macos-clang:
runs-on: macos-latest
env:
CMAKE_FLAGS: '-DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON -DSERDEPP_USE_RAPIDJSON=ON -DSERDEPP_USE_FMT=ON'
CMAKE_FLAGS: '-DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON -DSERDEPP_USE_RAPIDJSON=ON -DSERDEPP_USE_FMT=ON -DSERDEPP_BUILD_TESTING=ON -DSERDEPP_USE_CATCH2=ON'
strategy:
matrix:
build-type: ['Release', 'Debug']
Expand All @@ -32,7 +32,5 @@ jobs:
- name: Run Test Script
run: |
cd build/${{matrix.build-type}}
./serde_example
./serde_example1
./simple_example
ctest .
6 changes: 2 additions & 4 deletions .github/workflows/window.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
windows-msvc:
runs-on: windows-2019
env:
CMAKE_FLAGS: '-DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON -DSERDEPP_USE_RAPIDJSON=ON -DSERDEPP_USE_FMT=ON'
CMAKE_FLAGS: '-DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON -DSERDEPP_USE_RAPIDJSON=ON -DSERDEPP_USE_FMT=ON -DSERDEPP_BUILD_TESTING=ON -DSERDEPP_USE_CATCH2=ON'
strategy:
matrix:
build-type: ['Release', 'Debug']
Expand All @@ -23,6 +23,4 @@ jobs:
- name: Run Test Script
run: |
cd build/${{matrix.build-type}}
./serde_example
./serde_example1
./simple_example
ctest .
11 changes: 2 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@ cppm_compiler_option(DEFAULT)
find_cppkg(benchmark 1.5.2 MODULE benchmark::benchmark TYPE lib OPTIONAL OFF)
find_cppkg(RapidJSON 1.1.1 MODULE rapidjson TYPE lib OPTIONAL OFF)
find_cppkg(nlohmann_json 3.10.5 MODULE nlohmann_json::nlohmann_json TYPE lib OPTIONAL OFF)
find_cppkg(Catch2 2.9.1 MODULE Catch2::Catch2 TYPE lib OPTIONAL OFF)
find_cppkg(toml11 3.7.0 MODULE toml11::toml11 TYPE lib OPTIONAL OFF)
find_cppkg(yaml-cpp 0.7.0 MODULE yaml-cpp TYPE lib OPTIONAL OFF)
find_cppkg(fmt 8.0.1 MODULE fmt::fmt-header-only TYPE lib OPTIONAL OFF)
find_cppkg(magic_enum 0.7.3 MODULE magic_enum::magic_enum TYPE lib)
find_cppkg(nameof 0.10.0 MODULE nameof::nameof TYPE lib)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
find_cppkg(Catch2 2.9.1 MODULE Catch2::Catch2 TYPE lib)
find_cppkg(benchmark 1.5.2 MODULE benchmark::benchmark TYPE lib OPTIONAL OFF)
endif()


cppm_target_define(serdepp STATIC
SOURCES
Expand Down Expand Up @@ -125,11 +121,8 @@ SOURCES

endif()

set(serdepp_global_deps PRIVATE benchmark
set(serdepp_global_deps PRIVATE benchmark Catch2
PUBLIC RapidJSON nlohmann_json toml11 yaml-cpp fmt magic_enum nameof)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND serdepp_global_deps PRIVATE Catch2 benchmark)
endif()
cppm_target_dependencies(serdepp
${serdepp_global_deps})

Expand Down
5 changes: 2 additions & 3 deletions cppm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,11 @@ source = ["tests/.*"]
nlohmann_json = { version="3.10.5", link="public", optional=true}
RapidJSON = { version="1.1.1", link="public", optional=true}
benchmark = { version="1.5.2", optional=true}
Catch2 = {version="2.9.1", optional=true}
#pybind11 = "2.9.0"
#hiredis = "git"
#"redis++" = "1.3.2"
#simdjson = {version="0.9.7", link="public"}
#ryml = { version= "0.2.0", link="public", optional=true}
#sol2 = { version="3.2.2"}
[dev-dependencies]
benchmark = {version="1.5.2", optional=true}
Catch2 = "2.9.1"
#[dev-dependencies]

0 comments on commit 1924bb3

Please sign in to comment.