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 runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v1.0.0 container: ghcr.io/nlohmann/json-ci:v1.0.0
steps: 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 }}." - run: echo "🔎 Branch name is ${{ github.ref }} and repository is ${{ github.repository }}."
- name: Clone nlohmann json - name: Clone nlohmann json
uses: actions/checkout@master uses: actions/checkout@master
@ -25,13 +23,13 @@ jobs:
- name: Build and install nlohmann json - name: Build and install nlohmann json
run: | run: |
cd nlohmann-json 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) cmake --build build --target install -j$(nproc)
cd .. cd ..
- name: Clone json-schema-validator - name: Clone json-schema-validator
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: cmake - name: cmake
run: cmake -S . -B build run: cmake -S . -DJSON_VALIDATOR_BUILD_EXAMPLES=ON -DJSON_VALIDATOR_BUILD_TESTS=ON -B build
- name: build - name: build
run: cmake --build build --target all -j$(nproc) run: cmake --build build --target all -j$(nproc)
- name: test - name: test
@ -40,8 +38,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v1.0.0 container: ghcr.io/nlohmann/json-ci:v1.0.0
steps: 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 }}." - run: echo "🔎 Branch name is ${{ github.ref }} and repository is ${{ github.repository }}."
- name: Clone json-schema-validator - name: Clone json-schema-validator
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -51,8 +47,3 @@ jobs:
run: cmake --build build --target all -j$(nproc) run: cmake --build build --target all -j$(nproc)
- name: Test - name: Test
run: cd build && ctest 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 project(nlohmann_json_schema_validator
LANGUAGES CXX) LANGUAGES CXX)
set(PROJECT_VERSION 2.1.2) set(PROJECT_VERSION 2.2.0)
include(FetchContent) include(FetchContent)
# find nlohmann_json if not found simply fetch it # 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) add_executable(format-json-schema app/format.cpp)
target_link_libraries(format-json-schema nlohmann_json_schema_validator) target_link_libraries(format-json-schema nlohmann_json_schema_validator)
install(TARGETS json-schema-validate readme-json-schema format-json-schema install(TARGETS json-schema-validate DESTINATION bin)
DESTINATION bin)
endif() endif()
if (JSON_VALIDATOR_BUILD_TESTS) if (JSON_VALIDATOR_BUILD_TESTS)