Skip to content

Commit

Permalink
add a ci step for Json_Diagnostic_Positions (#4579)
Browse files Browse the repository at this point in the history
* add a ci step for Json_Diagnostic_Positions

Signed-off-by: Harinath Nampally <[email protected]>

* Update ci.cmake to address review comments

Signed-off-by: Harinath Nampally <[email protected]>

* address review comment

Signed-off-by: Harinath Nampally <[email protected]>

* fix typo in the comment

Signed-off-by: Harinath Nampally <[email protected]>

* fix typos in ci.cmake

Signed-off-by: Harinath Nampally <[email protected]>

* invoke the new ci step from ubuntu.yml

Signed-off-by: Harinath Nampally <[email protected]>

---------

Signed-off-by: Harinath Nampally <[email protected]>
  • Loading branch information
hnampally authored Jan 3, 2025
1 parent f038ac4 commit a6255cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
container: ubuntu:focal
strategy:
matrix:
target: [ci_cmake_flags, ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls]
target: [ci_cmake_flags, ci_test_diagnostics, ci_test_diagnostic_positions, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls]
steps:
- name: Install build-essential
run: apt-get update ; apt-get install -y build-essential unzip wget git
Expand Down
16 changes: 15 additions & 1 deletion cmake/ci.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,20 @@ add_custom_target(ci_test_diagnostics
COMMENT "Compile and test with improved diagnostics enabled"
)

###############################################################################
# Enable diagnostic positions support.
###############################################################################

add_custom_target(ci_test_diagnostic_positions
COMMAND ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE=Debug -GNinja
-DJSON_BuildTests=ON -DJSON_Diagnostic_Positions=ON
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_diagnostic_positions
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_diagnostic_positions
COMMAND cd ${PROJECT_BINARY_DIR}/build_diagnostic_positions && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
COMMENT "Compile and test with diagnostic positions enabled"
)

###############################################################################
# Enable legacy discarded value comparison.
###############################################################################
Expand Down Expand Up @@ -910,7 +924,7 @@ endfunction()
ci_get_cmake(3.1.0 CMAKE_3_1_0_BINARY)
ci_get_cmake(3.13.0 CMAKE_3_13_0_BINARY)

set(JSON_CMAKE_FLAGS_3_1_0 JSON_Diagnostics JSON_GlobalUDLs JSON_ImplicitConversions JSON_DisableEnumSerialization
set(JSON_CMAKE_FLAGS_3_1_0 JSON_Diagnostics JSON_Diagnostic_Positions JSON_GlobalUDLs JSON_ImplicitConversions JSON_DisableEnumSerialization
JSON_LegacyDiscardedValueComparison JSON_Install JSON_MultipleHeaders JSON_SystemInclude JSON_Valgrind)
set(JSON_CMAKE_FLAGS_3_13_0 JSON_BuildTests)

Expand Down

0 comments on commit a6255cc

Please sign in to comment.