Skip to content

Commit

Permalink
Merge pull request #1
Browse files Browse the repository at this point in the history
non-const json
  • Loading branch information
YaRiabtsev authored Nov 3, 2024
2 parents f7e8518 + 497f19a commit 3e537a1
Show file tree
Hide file tree
Showing 14 changed files with 1,494 additions and 745 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand All @@ -42,9 +42,9 @@ jobs:
run: |
cd build
ctest
lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --ignore-errors gcov
lcov --remove coverage.info '/usr/*' '*/tests/*' --output-file coverage_filtered.info
genhtml coverage_filtered.info -t "JSON eval" --demangle-cpp --output-directory ../cov
lcov --capture --directory . --output-file coverage.info --rc branch_coverage=1 --ignore-errors gcov,inconsistent,mismatch
lcov --remove coverage.info '/usr/*' '*/tests/*' --output-file coverage.info --rc branch_coverage=1
genhtml coverage.info -t "JSON eval" --demangle-cpp --branch-coverage --output-directory ../cov
- name: Clean build
run: rm -rf build/
Expand All @@ -56,7 +56,7 @@ jobs:
destination: ./_site

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3

deploy:
environment:
Expand All @@ -67,4 +67,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
21 changes: 13 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit Tests
name: Checks

on:
pull_request:
Expand All @@ -13,12 +13,6 @@ jobs:
- uses: actions/checkout@v4
- uses: MarkusJx/[email protected]

- name: Clang-format
uses: jidicula/[email protected]
with:
clang-format-version: '18'
check-path: '.'

- name: Build project
run: |
mkdir build
Expand All @@ -29,4 +23,15 @@ jobs:
- name: Run unit tests
run: |
cd build
ctest -V
ctest -V
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Clang-format
uses: jidicula/[email protected]
with:
clang-format-version: '18'
check-path: '.'
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ include_directories(include)

add_executable(json_eval
src/main.cpp

src/json.cpp
src/parser.cpp
src/reference.cpp
)

if (BUILD_TESTS)
Expand All @@ -50,12 +52,13 @@ if (BUILD_TESTS)
tests/json_tests.cpp
tests/parse_tests.cpp
tests/path_tests.cpp

src/json.cpp
src/parser.cpp
src/reference.cpp
)

target_link_libraries(
unit_tests
target_link_libraries(unit_tests
GTest::GTest
GTest::Main
Threads::Threads
Expand All @@ -68,7 +71,7 @@ if (BUILD_TESTS)
if (COVERAGE)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
message(STATUS "Enabling coverage reporting")
target_compile_options(unit_tests PUBLIC --coverage -O0 -g)
target_compile_options(unit_tests PUBLIC --coverage -O0)
target_link_libraries(unit_tests gcov)
endif ()
endif ()
Expand Down
Loading

0 comments on commit 3e537a1

Please sign in to comment.