mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
[CI] windows-[2019,2022]
This commit is contained in:
parent
c39fd30f93
commit
79a235223d
8
.github/workflows/cmake.yml
vendored
8
.github/workflows/cmake.yml
vendored
@ -22,6 +22,8 @@ jobs:
|
||||
macos-12,
|
||||
macos-13,
|
||||
macos-14,
|
||||
windows-2019,
|
||||
windows-2022,
|
||||
]
|
||||
cpp_version: [11, 14]
|
||||
|
||||
@ -35,16 +37,16 @@ jobs:
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
run: cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}}
|
||||
run: cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration
|
||||
# run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
run: cmake --build ${{github.workspace}}/build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest
|
||||
run: ctest -C ${{env.BUILD_TYPE}}
|
||||
|
||||
|
@ -19,6 +19,8 @@ ADD_DEFINITIONS(-O3 -Wall -g)
|
||||
ADD_SUBDIRECTORY(test)
|
||||
|
||||
ENABLE_TESTING()
|
||||
ADD_TEST(NAME ./test/test.run COMMAND ./test/test.run)
|
||||
ADD_TEST(NAME ./load_test COMMAND ./load_test)
|
||||
ADD_TEST(NAME ./demo COMMAND ./demo)
|
||||
if(NOT MSVC)
|
||||
ADD_TEST(NAME ./test/test.run COMMAND ./test/test.run)
|
||||
ADD_TEST(NAME ./load_test COMMAND ./load_test)
|
||||
endif()
|
||||
|
@ -7,5 +7,7 @@ ADD_LIBRARY(gtest STATIC ${GTEST_ROOT_DIR}/src/gtest-all.cc)
|
||||
TARGET_LINK_LIBRARIES(gtest pthread)
|
||||
|
||||
ADD_EXECUTABLE(demo demo.cpp)
|
||||
ADD_EXECUTABLE(load_test load_test.cpp)
|
||||
ADD_SUBDIRECTORY(unittest)
|
||||
if(NOT MSVC)
|
||||
ADD_EXECUTABLE(load_test load_test.cpp)
|
||||
ADD_SUBDIRECTORY(unittest)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user