Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 6 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,17 @@ jobs:
- checkout

- run:
name: Install sudo
command: 'apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*'
name: Install required tools
command: 'apt-get update && apt-get install -y gcc g++ git cmake'
- run:
name: Install GCC
command: 'apt-get update && apt-get install -y gcc g++'
name: Show versions
command: 'g++ --version ; uname -a; cmake --version'
- run:
name: Install CMake
command: 'apt-get update && sudo apt-get install -y cmake'
- run:
name: Create build files
name: Run CMake
command: 'mkdir build ; cd build ; cmake ..'
- run:
name: Versions
command: 'g++ --version ; uname -a'
- run:
name: Compile
command: 'cmake --build build'
- run:
name: Execute test suite
command: 'cd build ; ctest -j 2'
command: 'cd build ; ctest --output-on-failure -j 2'
21 changes: 3 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ all:
@echo "ChangeLog.md - generate ChangeLog file"
@echo "check - compile and execute test suite"
@echo "check-amalgamation - check whether sources have been amalgamated"
@echo "check-fast - compile and execute test suite (skip long-running tests)"
@echo "clean - remove built files"
@echo "coverage - create coverage information with lcov"
@echo "coverage-fast - create coverage information with fastcov"
@echo "cppcheck - analyze code with cppcheck"
@echo "cpplint - analyze code with cpplint"
@echo "clang_tidy - analyze code with Clang-Tidy"
Expand Down Expand Up @@ -65,10 +63,6 @@ json_unit:
check:
$(MAKE) check -C test

# run unit tests and skip expensive tests
check-fast:
$(MAKE) check -C test TEST_PATTERN=""


##########################################################################
# coverage
Expand All @@ -77,21 +71,12 @@ check-fast:
coverage:
rm -fr build_coverage
mkdir build_coverage
cd build_coverage ; CXX=g++-8 cmake .. -GNinja -DJSON_Coverage=ON -DJSON_MultipleHeaders=ON
cd build_coverage ; cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DJSON_Coverage=ON -DJSON_MultipleHeaders=ON
cd build_coverage ; ninja
cd build_coverage ; ctest -E '.*_default' -j10
cd build_coverage ; ctest -j10
cd build_coverage ; ninja lcov_html
open build_coverage/test/html/index.html

coverage-fast:
rm -fr build_coverage
mkdir build_coverage
cd build_coverage ; CXX=g++-9 cmake .. -GNinja -DJSON_Coverage=ON -DJSON_MultipleHeaders=ON
cd build_coverage ; ninja
cd build_coverage ; ctest -E '.*_default' -j10
cd build_coverage ; ninja fastcov_html
open build_coverage/test/html/index.html

##########################################################################
# documentation tests
##########################################################################
Expand Down Expand Up @@ -485,7 +470,7 @@ clang_sanitize:
mkdir clang_sanitize_build
cd clang_sanitize_build ; CXX=$(COMPILER_DIR)/clang++ cmake .. -DJSON_Sanitizer=On -DJSON_MultipleHeaders=ON -GNinja
cd clang_sanitize_build ; ninja
cd clang_sanitize_build ; ctest -E '.*_default' -j10
cd clang_sanitize_build ; ctest -j10


##########################################################################
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,6 @@ The library itself consists of a single header file licensed under the MIT licen
- [**doctest**](https://github.com/onqtam/doctest) for the unit tests
- [**Doozer**](https://doozer.io) for [continuous integration](https://doozer.io/nlohmann/json) on Linux (CentOS, Raspbian, Fedora)
- [**Doxygen**](http://www.stack.nl/~dimitri/doxygen/) to generate [documentation](https://nlohmann.github.io/json/)
- [**fastcov**](https://github.com/RPGillespie6/fastcov) to process coverage information
- [**git-update-ghpages**](https://github.com/rstacruz/git-update-ghpages) to upload the documentation to gh-pages
- [**GitHub Changelog Generator**](https://github.com/skywinder/github-changelog-generator) to generate the [ChangeLog](https://github.com/nlohmann/json/blob/develop/ChangeLog.md)
- [**Google Benchmark**](https://github.com/google/benchmark) to implement the benchmarks
Expand Down
11 changes: 4 additions & 7 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ add_subdirectory(thirdparty/benchmark)
include_directories(thirdparty)
include_directories(${CMAKE_SOURCE_DIR}/../single_include)

# copy test files to build folder
file(COPY ${CMAKE_SOURCE_DIR}/data DESTINATION .)
file(COPY ${CMAKE_SOURCE_DIR}/../test/data/regression/floats.json
${CMAKE_SOURCE_DIR}/../test/data/regression/unsigned_ints.json
${CMAKE_SOURCE_DIR}/../test/data/regression/signed_ints.json
${CMAKE_SOURCE_DIR}/../test/data/regression/small_signed_ints.json
DESTINATION data/numbers)
# download test data
include(${CMAKE_SOURCE_DIR}/../cmake/download_test_data.cmake)

# benchmark binary
add_executable(json_benchmarks src/benchmarks.cpp)
target_compile_features(json_benchmarks PRIVATE cxx_std_11)
target_link_libraries(json_benchmarks benchmark ${CMAKE_THREAD_LIBS_INIT})
add_dependencies(json_benchmarks download_test_data)
target_include_directories(json_benchmarks PRIVATE ${CMAKE_BINARY_DIR}/include)
1 change: 0 additions & 1 deletion benchmarks/data/jeopardy/jeopardy.json

This file was deleted.

9 changes: 0 additions & 9 deletions benchmarks/data/nativejson-benchmark/canada.json

This file was deleted.

Loading