This commit is contained in:
parent
7566b3b40d
commit
62fe919b5d
14
.github/workflows/ubuntu.yml
vendored
14
.github/workflows/ubuntu.yml
vendored
@ -11,7 +11,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
ci_test_clang:
|
ci_test_clang:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/nlohmann/json-ci:v2.0.0
|
container: ghcr.io/nlohmann/json-ci:main
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: cmake
|
- name: cmake
|
||||||
@ -21,7 +21,7 @@ jobs:
|
|||||||
|
|
||||||
ci_test_gcc:
|
ci_test_gcc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/nlohmann/json-ci:v2.0.0
|
container: ghcr.io/nlohmann/json-ci:main
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: cmake
|
- name: cmake
|
||||||
@ -31,7 +31,7 @@ jobs:
|
|||||||
|
|
||||||
ci_static_analysis:
|
ci_static_analysis:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/nlohmann/json-ci:v2.0.0
|
container: ghcr.io/nlohmann/json-ci:main
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [ci_clang_tidy, ci_cppcheck, ci_test_valgrind, ci_test_clang_sanitizer, ci_test_amalgamation, ci_clang_analyze, ci_cpplint, ci_cmake_flags, ci_single_binaries, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata, ci_infer]
|
target: [ci_clang_tidy, ci_cppcheck, ci_test_valgrind, ci_test_clang_sanitizer, ci_test_amalgamation, ci_clang_analyze, ci_cpplint, ci_cmake_flags, ci_single_binaries, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata, ci_infer]
|
||||||
@ -44,7 +44,7 @@ jobs:
|
|||||||
|
|
||||||
ci_cmake_options:
|
ci_cmake_options:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/nlohmann/json-ci:v2.0.0
|
container: ghcr.io/nlohmann/json-ci:main
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions]
|
target: [ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions]
|
||||||
@ -57,7 +57,7 @@ jobs:
|
|||||||
|
|
||||||
ci_test_coverage:
|
ci_test_coverage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/nlohmann/json-ci:v2.0.0
|
container: ghcr.io/nlohmann/json-ci:main
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: cmake
|
- name: cmake
|
||||||
@ -77,7 +77,7 @@ jobs:
|
|||||||
|
|
||||||
ci_test_compilers:
|
ci_test_compilers:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/nlohmann/json-ci:v2.0.0
|
container: ghcr.io/nlohmann/json-ci:main
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
compiler: [g++-4.8, g++-4.9, g++-5, g++-6, g++-7, g++-8, g++-9, g++-10, clang++-3.5, clang++-3.6, clang++-3.7, clang++-3.8, clang++-3.9, clang++-4.0, clang++-5.0, clang++-6.0, clang++-7, clang++-8, clang++-9, clang++-10, clang++-11, clang++-12, clang++-13]
|
compiler: [g++-4.8, g++-4.9, g++-5, g++-6, g++-7, g++-8, g++-9, g++-10, clang++-3.5, clang++-3.6, clang++-3.7, clang++-3.8, clang++-3.9, clang++-4.0, clang++-5.0, clang++-6.0, clang++-7, clang++-8, clang++-9, clang++-10, clang++-11, clang++-12, clang++-13]
|
||||||
@ -90,7 +90,7 @@ jobs:
|
|||||||
|
|
||||||
ci_test_standards:
|
ci_test_standards:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/nlohmann/json-ci:v2.0.0
|
container: ghcr.io/nlohmann/json-ci:main
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
standard: [11, 14, 17, 20]
|
standard: [11, 14, 17, 20]
|
||||||
|
|||||||
@ -814,11 +814,17 @@ add_custom_target(ci_cmake_flags
|
|||||||
foreach(COMPILER g++-4.8 g++-4.9 g++-5 g++-6 g++-7 g++-8 g++-9 g++-10 clang++-3.5 clang++-3.6 clang++-3.7 clang++-3.8 clang++-3.9 clang++-4.0 clang++-5.0 clang++-6.0 clang++-7 clang++-8 clang++-9 clang++-10 clang++-11 clang++-12 clang++-13)
|
foreach(COMPILER g++-4.8 g++-4.9 g++-5 g++-6 g++-7 g++-8 g++-9 g++-10 clang++-3.5 clang++-3.6 clang++-3.7 clang++-3.8 clang++-3.9 clang++-4.0 clang++-5.0 clang++-6.0 clang++-7 clang++-8 clang++-9 clang++-10 clang++-11 clang++-12 clang++-13)
|
||||||
find_program(COMPILER_TOOL NAMES ${COMPILER})
|
find_program(COMPILER_TOOL NAMES ${COMPILER})
|
||||||
if (COMPILER_TOOL)
|
if (COMPILER_TOOL)
|
||||||
|
# fix for https://github.com/nlohmann/json/pull/3101#issuecomment-998788786 / https://stackoverflow.com/a/64051725/266378
|
||||||
|
if ("${COMPILER}" STREQUAL "clang++-9")
|
||||||
|
set(ADDITIONAL_FLAGS "-DCMAKE_CXX_FLAGS=--gcc-toolchain=/root/gcc/9")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_custom_target(ci_test_compiler_${COMPILER}
|
add_custom_target(ci_test_compiler_${COMPILER}
|
||||||
COMMAND CXX=${COMPILER} ${CMAKE_COMMAND}
|
COMMAND CXX=${COMPILER} ${CMAKE_COMMAND}
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_compiler_${COMPILER}
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_compiler_${COMPILER}
|
||||||
|
${ADDITIONAL_FLAGS}
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_compiler_${COMPILER}
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_compiler_${COMPILER}
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_compiler_${COMPILER} && ${CMAKE_CTEST_COMMAND} --parallel ${N} --exclude-regex "test-unicode" --output-on-failure
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_compiler_${COMPILER} && ${CMAKE_CTEST_COMMAND} --parallel ${N} --exclude-regex "test-unicode" --output-on-failure
|
||||||
COMMENT "Compile and test with ${COMPILER}"
|
COMMENT "Compile and test with ${COMPILER}"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user