🔨 cleanup
This commit is contained in:
parent
53976034d5
commit
d9bde8ef46
22
.github/workflows/ubuntu.yml
vendored
22
.github/workflows/ubuntu.yml
vendored
@ -45,6 +45,28 @@ jobs:
|
|||||||
- name: build
|
- name: build
|
||||||
run: cmake --build build --target ci_clang_analyze
|
run: cmake --build build --target ci_clang_analyze
|
||||||
|
|
||||||
|
ci_test_clang:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: install_ninja
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install ninja-build
|
||||||
|
shell: bash
|
||||||
|
- name: install_clang
|
||||||
|
run: |
|
||||||
|
wget https://apt.llvm.org/llvm.sh
|
||||||
|
chmod +x llvm.sh
|
||||||
|
sudo ./llvm.sh 11
|
||||||
|
sudo apt-get install clang-tools-11
|
||||||
|
shell: bash
|
||||||
|
- name: cmake
|
||||||
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
|
- name: build
|
||||||
|
run: cmake --build build --target ci_test_clang
|
||||||
|
|
||||||
ci_test_gcc:
|
ci_test_gcc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
|
|||||||
@ -344,14 +344,14 @@ set(GCC_CXXFLAGS "-std=c++11 \
|
|||||||
add_custom_target(ci_test_gcc
|
add_custom_target(ci_test_gcc
|
||||||
COMMAND CXX=${GCC_TOOL} CXXFLAGS=${GCC_CXXFLAGS} ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_gcc -DJSON_BuildTests=ON -GNinja
|
COMMAND CXX=${GCC_TOOL} CXXFLAGS=${GCC_CXXFLAGS} ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_gcc -DJSON_BuildTests=ON -GNinja
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_gcc
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_gcc
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_gcc && ${CMAKE_CTEST_COMMAND} -j10
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_gcc && ${CMAKE_CTEST_COMMAND} -j10 --output-on-failure
|
||||||
COMMENT "Compile and test with GCC"
|
COMMENT "Compile and test with GCC"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target(ci_test_clang
|
add_custom_target(ci_test_clang
|
||||||
COMMAND CXX=${CLANG_TOOL} CXXFLAGS=${CLANG_CXXFLAGS} ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_clang -DJSON_BuildTests=ON -DJSON_MultipleHeaders=ON -GNinja
|
COMMAND CXX=${CLANG_TOOL} CXXFLAGS=${CLANG_CXXFLAGS} ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_clang -DJSON_BuildTests=ON -DJSON_MultipleHeaders=ON -GNinja
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_clang
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_clang
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_clang && ${CMAKE_CTEST_COMMAND} -j10
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_clang && ${CMAKE_CTEST_COMMAND} -j10 --output-on-failure
|
||||||
COMMENT "Compile and test with Clang"
|
COMMENT "Compile and test with Clang"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -364,7 +364,7 @@ set(CLANG_CXX_FLAGS_SANITIZER "-g -O0 -fsanitize=address -fsanitize=undefined -f
|
|||||||
add_custom_target(ci_test_clang_sanitizer
|
add_custom_target(ci_test_clang_sanitizer
|
||||||
COMMAND CXX=${CLANG_TOOL} CXXFLAGS=${CLANG_CXX_FLAGS_SANITIZER} ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_clang_sanitizer -DJSON_BuildTests=ON -GNinja
|
COMMAND CXX=${CLANG_TOOL} CXXFLAGS=${CLANG_CXX_FLAGS_SANITIZER} ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_clang_sanitizer -DJSON_BuildTests=ON -GNinja
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_clang_sanitizer
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_clang_sanitizer
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_clang_sanitizer && ${CMAKE_CTEST_COMMAND} -j10
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_clang_sanitizer && ${CMAKE_CTEST_COMMAND} -j10 --output-on-failure
|
||||||
COMMENT "Compile and test with sanitizers"
|
COMMENT "Compile and test with sanitizers"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -375,7 +375,7 @@ add_custom_target(ci_test_clang_sanitizer
|
|||||||
add_custom_target(ci_test_valgrind
|
add_custom_target(ci_test_valgrind
|
||||||
COMMAND CXX=${GCC_TOOL} ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_valgrind -DJSON_BuildTests=ON -DJSON_Valgrind=ON -GNinja
|
COMMAND CXX=${GCC_TOOL} ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_valgrind -DJSON_BuildTests=ON -DJSON_Valgrind=ON -GNinja
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_valgrind
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_valgrind
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_valgrind && ${CMAKE_CTEST_COMMAND} -L valgrind -j10
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_valgrind && ${CMAKE_CTEST_COMMAND} -L valgrind -j10 --output-on-failure
|
||||||
COMMENT "Compile and test with Valgrind"
|
COMMENT "Compile and test with Valgrind"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -91,56 +91,7 @@ endif()
|
|||||||
# one executable for each unit test file
|
# one executable for each unit test file
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
set(files
|
file(GLOB files src/unit-*.cpp)
|
||||||
src/unit-algorithms.cpp
|
|
||||||
src/unit-allocator.cpp
|
|
||||||
src/unit-alt-string.cpp
|
|
||||||
src/unit-assert_macro.cpp
|
|
||||||
src/unit-bson.cpp
|
|
||||||
src/unit-capacity.cpp
|
|
||||||
src/unit-cbor.cpp
|
|
||||||
src/unit-class_const_iterator.cpp
|
|
||||||
src/unit-class_iterator.cpp
|
|
||||||
src/unit-class_lexer.cpp
|
|
||||||
src/unit-class_parser.cpp
|
|
||||||
src/unit-comparison.cpp
|
|
||||||
src/unit-concepts.cpp
|
|
||||||
src/unit-constructor1.cpp
|
|
||||||
src/unit-constructor2.cpp
|
|
||||||
src/unit-convenience.cpp
|
|
||||||
src/unit-conversions.cpp
|
|
||||||
src/unit-deserialization.cpp
|
|
||||||
src/unit-element_access1.cpp
|
|
||||||
src/unit-element_access2.cpp
|
|
||||||
src/unit-hash.cpp
|
|
||||||
src/unit-inspection.cpp
|
|
||||||
src/unit-items.cpp
|
|
||||||
src/unit-iterators1.cpp
|
|
||||||
src/unit-iterators2.cpp
|
|
||||||
src/unit-json_patch.cpp
|
|
||||||
src/unit-json_pointer.cpp
|
|
||||||
src/unit-large_json.cpp
|
|
||||||
src/unit-merge_patch.cpp
|
|
||||||
src/unit-meta.cpp
|
|
||||||
src/unit-modifiers.cpp
|
|
||||||
src/unit-msgpack.cpp
|
|
||||||
src/unit-noexcept.cpp
|
|
||||||
src/unit-ordered_json.cpp
|
|
||||||
src/unit-ordered_map.cpp
|
|
||||||
src/unit-pointer_access.cpp
|
|
||||||
src/unit-readme.cpp
|
|
||||||
src/unit-reference_access.cpp
|
|
||||||
src/unit-regression1.cpp
|
|
||||||
src/unit-regression2.cpp
|
|
||||||
src/unit-serialization.cpp
|
|
||||||
src/unit-testsuites.cpp
|
|
||||||
src/unit-to_chars.cpp
|
|
||||||
src/unit-ubjson.cpp
|
|
||||||
src/unit-udt.cpp
|
|
||||||
src/unit-udt_macro.cpp
|
|
||||||
src/unit-unicode.cpp
|
|
||||||
src/unit-user_defined_input.cpp
|
|
||||||
src/unit-wstring.cpp)
|
|
||||||
|
|
||||||
foreach(file ${files})
|
foreach(file ${files})
|
||||||
get_filename_component(file_basename ${file} NAME_WE)
|
get_filename_component(file_basename ${file} NAME_WE)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user