CI: Add single-header build
This commit is contained in:
parent
ee1cef2f2b
commit
a8df5da3f8
10
.github/workflows/ubuntu.yml
vendored
10
.github/workflows/ubuntu.yml
vendored
@ -43,6 +43,16 @@ jobs:
|
||||
- name: build
|
||||
run: cmake --build build --target ${{ matrix.target }}
|
||||
|
||||
ci_test_single_header:
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: cmake
|
||||
run: cmake -S . -B build -DJSON_CI=On
|
||||
- name: build
|
||||
run: cmake --build build --target ci_test_single_header
|
||||
|
||||
ci_cmake_options:
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
||||
|
||||
@ -581,6 +581,20 @@ add_custom_target(ci_test_amalgamation
|
||||
COMMENT "Check amalgamation and indentation"
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Build and test using the amalgamated header
|
||||
###############################################################################
|
||||
|
||||
add_custom_target(ci_test_single_header
|
||||
COMMAND CXX=${GCC_TOOL} CXXFLAGS="${GCC_CXXFLAGS}" ${CMAKE_COMMAND}
|
||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
||||
-DJSON_BuildTests=ON -DJSON_MultipleHeader=OFF -DJSON_FastTests=ON
|
||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_single_header
|
||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_single_header
|
||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_single_header && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
||||
COMMENT "Compile and test single-header version"
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Valgrind.
|
||||
###############################################################################
|
||||
|
||||
Loading…
Reference in New Issue
Block a user