Skip to content

Commit a6255cc

Browse files
authored
add a ci step for Json_Diagnostic_Positions (#4579)
* add a ci step for Json_Diagnostic_Positions Signed-off-by: Harinath Nampally <harinath922@gmail.com> * Update ci.cmake to address review comments Signed-off-by: Harinath Nampally <harinath922@gmail.com> * address review comment Signed-off-by: Harinath Nampally <harinath922@gmail.com> * fix typo in the comment Signed-off-by: Harinath Nampally <harinath922@gmail.com> * fix typos in ci.cmake Signed-off-by: Harinath Nampally <harinath922@gmail.com> * invoke the new ci step from ubuntu.yml Signed-off-by: Harinath Nampally <harinath922@gmail.com> --------- Signed-off-by: Harinath Nampally <harinath922@gmail.com>
1 parent f038ac4 commit a6255cc

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
container: ubuntu:focal
109109
strategy:
110110
matrix:
111-
target: [ci_cmake_flags, ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls]
111+
target: [ci_cmake_flags, ci_test_diagnostics, ci_test_diagnostic_positions, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls]
112112
steps:
113113
- name: Install build-essential
114114
run: apt-get update ; apt-get install -y build-essential unzip wget git

cmake/ci.cmake

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,20 @@ add_custom_target(ci_test_diagnostics
551551
COMMENT "Compile and test with improved diagnostics enabled"
552552
)
553553

554+
###############################################################################
555+
# Enable diagnostic positions support.
556+
###############################################################################
557+
558+
add_custom_target(ci_test_diagnostic_positions
559+
COMMAND ${CMAKE_COMMAND}
560+
-DCMAKE_BUILD_TYPE=Debug -GNinja
561+
-DJSON_BuildTests=ON -DJSON_Diagnostic_Positions=ON
562+
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_diagnostic_positions
563+
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_diagnostic_positions
564+
COMMAND cd ${PROJECT_BINARY_DIR}/build_diagnostic_positions && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
565+
COMMENT "Compile and test with diagnostic positions enabled"
566+
)
567+
554568
###############################################################################
555569
# Enable legacy discarded value comparison.
556570
###############################################################################
@@ -910,7 +924,7 @@ endfunction()
910924
ci_get_cmake(3.1.0 CMAKE_3_1_0_BINARY)
911925
ci_get_cmake(3.13.0 CMAKE_3_13_0_BINARY)
912926

913-
set(JSON_CMAKE_FLAGS_3_1_0 JSON_Diagnostics JSON_GlobalUDLs JSON_ImplicitConversions JSON_DisableEnumSerialization
927+
set(JSON_CMAKE_FLAGS_3_1_0 JSON_Diagnostics JSON_Diagnostic_Positions JSON_GlobalUDLs JSON_ImplicitConversions JSON_DisableEnumSerialization
914928
JSON_LegacyDiscardedValueComparison JSON_Install JSON_MultipleHeaders JSON_SystemInclude JSON_Valgrind)
915929
set(JSON_CMAKE_FLAGS_3_13_0 JSON_BuildTests)
916930

0 commit comments

Comments
 (0)