review tweaks : version + single example install

This commit is contained in:
Thomas Vincent 2021-12-10 12:15:12 -05:00
parent f390b74ab8
commit 15085fe56f
2 changed files with 4 additions and 14 deletions

View File

@ -13,8 +13,6 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub."
- run: echo "🔎 Branch name is ${{ github.ref }} and repository is ${{ github.repository }}."
- name: Clone nlohmann json
uses: actions/checkout@master
@ -25,13 +23,13 @@ jobs:
- name: Build and install nlohmann json
run: |
cd nlohmann-json
cmake -S . -DJSON_VALIDATOR_BUILD_EXAMPLES=ON -DJSON_VALIDATOR_BUILD_TESTS=ON -B build
cmake -S . -B build
cmake --build build --target install -j$(nproc)
cd ..
- name: Clone json-schema-validator
uses: actions/checkout@v2
- name: cmake
run: cmake -S . -B build
run: cmake -S . -DJSON_VALIDATOR_BUILD_EXAMPLES=ON -DJSON_VALIDATOR_BUILD_TESTS=ON -B build
- name: build
run: cmake --build build --target all -j$(nproc)
- name: test
@ -40,8 +38,6 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub."
- run: echo "🔎 Branch name is ${{ github.ref }} and repository is ${{ github.repository }}."
- name: Clone json-schema-validator
uses: actions/checkout@v2
@ -51,8 +47,3 @@ jobs:
run: cmake --build build --target all -j$(nproc)
- name: Test
run: cd build && ctest
- name: Publish Test
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: build/Testing/**/Test.xml

View File

@ -7,7 +7,7 @@ option(JSON_VALIDATOR_BUILD_EXAMPLES "Build examples" OFF)
project(nlohmann_json_schema_validator
LANGUAGES CXX)
set(PROJECT_VERSION 2.1.2)
set(PROJECT_VERSION 2.2.0)
include(FetchContent)
# find nlohmann_json if not found simply fetch it
@ -86,8 +86,7 @@ if (JSON_VALIDATOR_BUILD_EXAMPLES)
add_executable(format-json-schema app/format.cpp)
target_link_libraries(format-json-schema nlohmann_json_schema_validator)
install(TARGETS json-schema-validate readme-json-schema format-json-schema
DESTINATION bin)
install(TARGETS json-schema-validate DESTINATION bin)
endif()
if (JSON_VALIDATOR_BUILD_TESTS)