Commit Graph

190 Commits

Author SHA1 Message Date
Niels Lohmann
f2020da0dd
🔖 set version to 3.11.1 2022-08-01 23:27:58 +02:00
Florian Albrechtskirchinger
cbaf1033be
Fix global UDLs (#3646)
* Add ci_test_noglobaludls to CI

* Really default JSON_GLOBAL_UDLS to 1

* Test global UDLs

* Suppress warnings

* Clarify documentation
2022-08-01 22:42:35 +02:00
Niels Lohmann
ce0e13ccea
🔖 set version to 3.11.0 2022-07-31 23:19:06 +02:00
Niels Lohmann
d1d79b930d
Adjust JSON Pointer examples (#3622)
* 📝 adjust JSON Pointer examples

* 👷 add test for documentation

* 📝 note platform-dependent output on some examples
2022-07-29 14:28:37 +02:00
Florian Albrechtskirchinger
7777300442
Install MinGW from GitHub NuGet registry (#3618)
Attempt to workaround recent, frequent failures of the MinGW jobs by
installing an internalized Chocolatey package hosted on GitHub.
2022-07-28 21:54:12 +02:00
Florian Albrechtskirchinger
298e4a9449
Use concurrency (#3610)
Use concurrency in GitHub workflows to cancel in-progress or pending
runs for the same ref.
2022-07-28 21:51:32 +02:00
Niels Lohmann
527da54dcb
Use REUSE framework (#3546)
* 📄 add licenses

* 👷 add REUSE compliance check

* 📝 add badge for REUSE

Co-authored-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
2022-07-20 12:38:07 +02:00
Florian Albrechtskirchinger
e80945da2c
CI: Enable 32bit unit test (3) (#3532)
* Enable JSON_MultipleHeaders by default

* CI: Add single-header build

* CI: Enable 32bit unit test

* Fix "-Wuseless-cast" warnings

* Remove coverage exclusion

* Fix 32bit test case
2022-06-14 08:54:12 +02:00
Niels Lohmann
af34396129
Use new CI image (#3528)
* ⬆️ use new CI image

* ⬆️ use new CI image

* 🚨 fix warning

* 🔧 remove duplicate warning flags

* 💚 fix test

* 📝 update compiler versions
2022-06-12 14:31:07 +02:00
Niels Lohmann
6058d9a8b3
Add more macOS builders (#3485)
* 👷 add more macOS builders

* 👷 add more macOS builders

* 💚 fix macOS build

* 📝 document new Xcode versions
2022-06-03 14:03:14 +02:00
Florian Albrechtskirchinger
6b97599a27
Fix C++20/gcc-12 issues (Part 2) (#3446)
* Add C++20 3-way comparison operator and fix broken comparisons

Fixes #3207.
Fixes #3409.

* Fix iterators to meet (more) std::ranges requirements

Fixes #3130.
Related discussion: #3408

* Add note about CMake standard version selection to unit tests

Document how CMake chooses which C++ standard version to use when
building tests.

* Update documentation

* CI: add legacy discarded value comparison

* Fix internal linkage errors when building a module
2022-05-29 13:08:06 +02:00
Florian Albrechtskirchinger
bdc21ad1a7
Add build step for ICPC (with fixes) (#3465)
* ⬆️ Doctest 2.4.7

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* ⬇️ downgrade to Doctest 2.4.6

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* 🔇 suppress warning #2196: routine is both "inline" and "noinline"

* Re-enable <filesystem> detection on ICPC

* Limit regression test for #3070 to Clang and GCC >=8.4

* Disable deprecation warnings on ICPC

* Disable regression test for #1647 on ICPC (C++20)

* Fix compilation failure of regression test for #3077 on ICPC

* Disable wstring unit test on ICPC

Fixes:
  error 913: invalid multibyte character sequence

* Add ICPC to README

Co-authored-by: Niels Lohmann <mail@nlohmann.me>
2022-05-01 22:46:45 +02:00
Niels Lohmann
b21c345179
Reorganize directories (#3462)
* 🚚 move files
* 🚚 rename doc folder to docs
* 🚚 rename test folder to tests
2022-05-01 09:41:50 +02:00
Niels Lohmann
448b173ccf
Update CI image (#3420)
* ⬆️ use new CI image

* ⬆️ use new CI image

* 🚨 suppress Clang-Tidy warnings

* 💚 use proper scan-build version

* 🚨 suppress Clang-Tidy warnings

* ⬆️ use more recent GitHub actions

* 💚 add missing compiler

* 📝 update used compilers

* 🚨 fix duplicate inclusion
2022-04-06 15:14:14 +02:00
Florian Albrechtskirchinger
33b75e513a
CI: windows-2016 has been deprecated; remove jobs (#3416) 2022-04-04 13:18:00 +02:00
Niels Lohmann
66f6b4b6a0
🔧 overwork issue template #3348 2022-03-25 10:16:21 +01:00
Niels Lohmann
1ba736893e
🔧 overwork issue template #3348 2022-03-25 10:12:33 +01:00
Niels Lohmann
f7490e33da
🔧 overwork issue template #3348 2022-03-25 10:10:21 +01:00
Florian Albrechtskirchinger
ad103e5b45
Improve unit testing (Part 1) (#3380)
* Refactor unit test creation

Add functions for creating tests and to supply test- and
standard-specific build settings.

Raises minimum CMake version to 3.13 in test directory.

json_test_add_test_for(
    <file>
    MAIN <main>
    [CXX_STANDARDS <version_number>...] [FORCE])

Given a <file> unit-foo.cpp, produces

    test-foo_cpp<version_number>

if C++ standard <version_number> is supported by the compiler and
thesource file contains JSON_HAS_CPP_<version_number>.  Use FORCE to
create the test regardless of the file containing
JSON_HAS_CPP_<version_number>.  Test targets are linked against <main>.
CXX_STANDARDS defaults to "11".

json_test_set_test_options(
    all|<tests>
    [CXX_STANDARDS all|<args>...]
    [COMPILE_DEFINITIONS <args>...]
    [COMPILE_FEATURES <args>...]
    [COMPILE_OPTIONS <args>...]
    [LINK_LIBRARIES <args>...]
    [LINK_OPTIONS <args>...])

Supply test- and standard-specific build settings.
Specify multiple tests using a list e.g., "test-foo;test-bar".

Must be called BEFORE the test is created.

* Use CMAKE_MODULE_PATH

* Don't undef some macros if JSON_TEST_KEEP_MACROS is defined

* Use JSON_TEST_KEEP_MACROS

Incidentally enables the regression tests for #2546 and #3070.

A CHECK_THROWS_WITH_AS in #3070 was disabled which is tracked in #3377
and a line in from_json(..., std_fs::path&) was marked with LCOV_EXCL_LINE.

* Add three-way comparison feature test macro

* Disable broken comparison if JSON_HAS_THREE_WAY_COMPARISON

* Fix redefinition of inline constexpr statics

Redelcaration of inline constexpr static data members in namespace scope
was deprecated in C++17. Fixes -Werror=deprecated compilation failures.

* Fix more test build failures due to missing noexcept

* CI: update cmake_flags test to use CMake 3.13 in test directory

Also change default for JSON_BuildTests option to depend on CMake
version.

* CI: turn *_CXXFLAGS into CMake lists

* CI: use JSON_TestStandards to set CXX_STANDARD

* CI: pass extra CXXFLAGS to standards tests
2022-03-24 07:54:07 +01:00
Florian Albrechtskirchinger
d1e57df48b
Fix and update CI (#3368)
* CI: add workflow_dispatch trigger

* CI: change msvc2019*/clang* runners to windows-2019

GitHub updated their runners. windows-latest is now based on Windows
Server 2022 and comes with different tool versions.
MSVC 2019 is still available via the windows-2019 runner.
2022-03-06 13:54:00 +01:00
Thomas Braun
4d4c273036
.github/workflows/windows.yml: Add support for Visual Studio 2022 (#3295)
* .github/workflows/windows.yml: Add support for Visual Studio 2022

This is available in github actions since some time now [1].

[1]: https://github.com/actions/virtual-environments/issues/3949

* README.md: Add VS 2022 [skip ci]

The version and the build engine version (aka MSBuild version) were
taken from [1].

[1]: https://github.com/actions/virtual-environments/blob/win22/20220116.1/images/win/Windows2022-Readme.md
2022-01-26 09:57:23 +01:00
Niels Lohmann
b5364faf9d
🔖 set version to 3.10.5 2022-01-02 22:35:35 +01:00
Niels Lohmann
1aca6cb949
Add build step for NVCC and fix a warning (#3227)
* 👷 add step for NVCC build #2676
* 🚨 fix warning (code taken from #2736)
* 👷 use version 2.2.0 of the CI image
2021-12-30 13:40:15 +01:00
Niels Lohmann
6d3115924c
Add C++17 copies of the test binaries (#3101)
* ⚗️ add C++17 copies of the test binaries
* ⚗️ use proper header for filesystem
* 🚨 fix warnings
* ⚗️ do not use too old compilers with C++17
*  add test
* 🔨 add more constraints #3097
* ⚗️ use fix from https://github.com/nlohmann/json/pull/3101#issuecomment-998788786
* ⚗️ use fix from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90050
* 👷 use published CI image
2021-12-29 09:47:05 +01:00
Niels Lohmann
7440786b81
Update CI (#3088)
* 👷 prepare GitHub actions for new Docker image

* 👷 use experimental docker image

* 👷 use Clang-Analyzer 14

* 🔇 suppress readability-identifier-length

* 🔇 suppress more Clang-Tidy warnings

* ♻️ simplify code

* 🔇 suppress more Clang-Tidy warnings

* 🔇 suppress more Clang-Tidy warnings

* 🚨 fix warning

* 🚨 fix warning

* 🚨 fix warning

* 👷 use new Docker image
2021-10-29 21:27:34 +02:00
Niels Lohmann
a09bfa5faa
🔖 set version to 3.10.4 2021-10-16 13:34:31 +02:00
Niels Lohmann
ab6a2c7425
🔖 set version to 3.10.3 2021-10-08 13:58:48 +02:00
Niels Lohmann
fd0aa4fb0d
👷 re-add Clang 12 (#2986) 2021-08-30 10:54:14 +02:00
Niels Lohmann
e0b02c355e
Use new Docker image (#2981) 2021-08-29 18:05:31 +02:00
Niels Lohmann
33b674b4b2
🔖 set version to 3.10.2 2021-08-26 08:13:04 +02:00
Niels Lohmann
8ad66e9136
🔖 set version to 3.10.1 2021-08-24 20:19:55 +02:00
Niels Lohmann
f03127eb69
Set stack size for some unit tests when using MSVC (#2961)
* 🏁 set stack size for some unit tests
2021-08-21 13:55:06 +02:00
Niels Lohmann
1de378f580
🔖 set version to 3.10.0 2021-08-17 15:23:23 +02:00
Niels Lohmann
f1e63a8322
👷 run CI for release branches 2021-08-16 15:40:57 +02:00
Niels Lohmann
fa5d3b5a9b
👷 run CI for release branches 2021-08-15 22:49:31 +02:00
Niels Lohmann
0a0eb7a850
Merge branch 'develop' of https://github.com/nlohmann/json into issue2863
 Conflicts:
	.github/workflows/windows.yml
2021-08-14 11:19:48 +02:00
Niels Lohmann
fecb01858b
⚗️ add -WX flag to MSVC builds 2021-08-13 13:28:17 +02:00
Niels Lohmann
e65db83448
⚗️ add -WX flag to MSVC builds 2021-08-13 12:42:38 +02:00
Niels Lohmann
db7ccafbda
💚 fix MSVC build 2021-08-07 13:55:25 +02:00
Niels Lohmann
c5928501b0
💚 fix MSVC build 2021-08-07 13:19:25 +02:00
Niels Lohmann
b74474e3fd
💚 fix MSVC build 2021-08-07 13:14:00 +02:00
Niels Lohmann
fde6e1f800
Merge branch 'develop' of https://github.com/nlohmann/json into macos_standards 2021-06-14 07:17:47 +02:00
Niels Lohmann
802895b483
👷 remove Clang 10 2021-06-13 14:14:10 +02:00
Niels Lohmann
032f32ebe4
👷 add Clang 12 2021-06-13 14:04:20 +02:00
Niels Lohmann
30e52eb046
👷 execute all tests 2021-05-30 13:28:58 +02:00
Niels Lohmann
2b685c744b
👷 reduce load 2021-05-29 13:10:28 +02:00
Niels Lohmann
9f5ee3f145
👷 fix syntax 2021-05-28 22:27:46 +02:00
Niels Lohmann
311730bc3d
👷 add C++ standards to macOS matrix #2491 2021-05-28 22:23:50 +02:00
Niels Lohmann
cdfe865486
📝 add documentation for numbers 2021-04-28 20:33:05 +02:00
Niels Lohmann
52717b7473
👷 add clang 11 2021-04-24 14:27:13 +02:00
Niels Lohmann
0638a27ed3
👷 add step for Infer 2021-04-24 13:50:30 +02:00
Niels Lohmann
d927f44576
💚 fix build 2021-03-28 15:30:37 +02:00
Niels Lohmann
077fe41a82
🚧 do not check pushes to non-default branches 2021-03-28 14:59:42 +02:00
Niels Lohmann
ae99a31bea
🚧 add more CI tests 2021-03-28 14:48:58 +02:00
Niels Lohmann
f268035946
👷 consolidate CI 2021-03-28 13:37:04 +02:00
Niels Lohmann
1f1fa9f30e
🔥 remove some Travis builds 2021-03-27 14:44:39 +01:00
Niels Lohmann
c591b6ca6c
👷 move some MSVC jobs from AppVeyor to GitHub Actions 2021-03-27 10:43:05 +01:00
Niels Lohmann
6f551930e5
🚨 add new CI and fix warnings (#2561)
* ⚗️ move CI targets to CMake
* ♻️ add target for cpplint
* ♻️ add target for self-contained binaries
* ♻️ add targets for iwyu and infer
* 🔊 add version output
* ♻️ add target for oclint
* 🚨 fix warnings
* ♻️ rename targets
* ♻️ use iwyu properly
* 🚨 fix warnings
* ♻️ use iwyu properly
* ♻️ add target for benchmarks
* ♻️ add target for CMake flags
* 👷 use GitHub Actions
* ⚗️ try to install Clang 11
* ⚗️ try to install GCC 11
* ⚗️ try to install Clang 11
* ⚗️ try to install GCC 11
* ⚗️ add clang analyze target
* 🔥 remove Google Benchmark
* ⬆️ Google Benchmark 1.5.2
* 🔥 use fetchcontent
* 🐧 add target to download a Linux version of CMake
* 🔨 fix dependency
* 🚨 fix includes
* 🚨 fix comment
* 🔧 adjust flags for GCC 11.0.0 20210110 (experimental)
* 🐳 user Docker image to run CI
* 🔧 add target for Valgrind
* 👷 add target for Valgrind tests
* ⚗️ add Dart
*  remove Dart
* ⚗️ do not call ctest in test subdirectory
* ⚗️ download test data explicitly
* ⚗️ only execute Valgrind tests
* ⚗️ fix labels
* 🔥 remove unneeded jobs
* 🔨 cleanup
* 🐛 fix OCLint call
*  add targets for offline and git-independent tests
*  add targets for C++ language versions and reproducible tests
* 🔨 clean up
* 👷 add CI steps for cppcheck and cpplint
* 🚨 fix warnings from Clang-Tidy
* 👷 add CI steps for Clang-Tidy
* 🚨 fix warnings
* 🔧 select proper binary
* 🚨 fix warnings
* 🚨 suppress some unhelpful warnings
* 🚨 fix warnings
* 🎨 fix format
* 🚨 fix warnings
* 👷 add CI steps for Sanitizers
* 🚨 fix warnings
*  add optimization to sanitizer build
* 🚨 fix warnings
* 🚨 add missing header
* 🚨 fix warnings
* 👷 add CI step for coverage
* 👷 add CI steps for disabled exceptions and implicit conversions
* 🚨 fix warnings
* 👷 add CI steps for checking indentation
* 🐛 fix variable use
* 💚 fix build
*  remove CircleCI
* 👷 add CI step for diagnostics
* 🚨 fix warning
* 🔥 clean Travis
2021-03-24 07:15:18 +01:00
Niels Lohmann
e4fc598466
⚗️ add C++20 build 2020-12-29 20:45:56 +01:00
Niels Lohmann
77be4f6aaf
⚗️ add C++20 build 2020-12-29 20:32:07 +01:00
Niels Lohmann
91d7aa571f
⚗️ add C++20 build 2020-12-29 20:30:50 +01:00
Niels Lohmann
ca51dc62f2
⚗️ try to use Clang 10 2020-12-29 20:21:43 +01:00
Niels Lohmann
433da31334
⚗️ try to use GCC 10 2020-12-29 20:16:51 +01:00
Niels Lohmann
eaac918034
👷 remove clang9 CI 2020-12-02 08:58:45 +01:00
Niels Lohmann
4080d0b1a4
add test to compile without exceptions 2020-08-10 09:48:11 +02:00
Niels Lohmann
b3e5cb7f20
🔖 set version to 3.9.1 2020-08-06 13:45:29 +02:00
Niels Lohmann
e110667d21
🔖 set version to 3.9.0 2020-07-27 15:48:09 +02:00
Niels Lohmann
6bd38a2cb9
👷 merge Gitlab actions 2020-07-22 09:02:55 +02:00
Thomas Braun
25a59b59f2 Github Actions: Add ClangCL on Windows
MS Visual Studio 2019 has builtin support for other compiler toolsets [1].

This commit adds support for compiling using LLVM/Clang 10 using Visual
Studio.

ClangCL pretends to be MSVC so the usual MSVC flags apply, see also [2].
For detecting if ClangCL is used, newer cmake verisons (>= 3.15) have
builtin support using CMAKE_CXX_COMPILER_FRONTEND_VARIANT [3], for older
ones a workaround is available using CMAKE_CXX_SIMULATE_ID [4].

[1]: https://devblogs.microsoft.com/cppblog/clang-llvm-support-in-visual-studio/
[2]: https://clang.llvm.org/docs/UsersManual.html#clang-cl
[3]: https://stackoverflow.com/a/10055571
[4]: 4fe34b2d29
2020-07-14 16:02:44 +02:00
Niels Lohmann
dc06f100be
Merge branch 'develop' of https://github.com/nlohmann/json into clang_windows
 Conflicts:
	include/nlohmann/detail/input/binary_reader.hpp
	include/nlohmann/detail/input/json_sax.hpp
	include/nlohmann/detail/input/lexer.hpp
	include/nlohmann/detail/input/parser.hpp
	include/nlohmann/detail/json_pointer.hpp
	include/nlohmann/detail/output/serializer.hpp
	include/nlohmann/json.hpp
	single_include/nlohmann/json.hpp
2020-07-11 14:04:40 +02:00
Niels Lohmann
d019ddfcdb
👷 add code scanning 2020-07-08 12:25:53 +02:00
Niels Lohmann
ac3922c7aa
Merge branch 'develop' of https://github.com/nlohmann/json into clang_windows
 Conflicts:
	include/nlohmann/detail/input/binary_reader.hpp
	include/nlohmann/detail/input/input_adapters.hpp
	include/nlohmann/detail/input/lexer.hpp
	include/nlohmann/detail/output/binary_writer.hpp
	include/nlohmann/json.hpp
	single_include/nlohmann/json.hpp
2020-06-27 13:14:48 +02:00
Niels Lohmann
5ba0f65c34
🔧 remove feature request template 2020-06-27 12:55:41 +02:00
Niels Lohmann
aefa0b3e86
🔧 use Github discussions for questions 2020-06-27 12:54:42 +02:00
Niels Lohmann
24e8562664
👷 remove Clang 8 2020-06-04 12:48:03 +02:00
Niels Lohmann
a53e3a5443
👷 try Clang 8 2020-06-04 12:34:56 +02:00
Niels Lohmann
dc323314d5
👷 try Clang 10 2020-06-04 12:29:53 +02:00
Niels Lohmann
402c34c526
👷 try Clang 10 2020-06-04 12:27:37 +02:00
Niels Lohmann
9708b1e9c3
🔥 remove Code Inspector 2020-06-03 13:49:46 +02:00
Niels Lohmann
68fd772fdf
👷 add Code Inspector via GitHub Action 2020-06-03 13:44:33 +02:00
Niels Lohmann
9bc2a7fa25
👷 add Code Inspector via GitHub Action 2020-06-03 13:39:56 +02:00
Niels Lohmann
5ea205f570
👷 install clang 2020-05-30 18:17:54 +02:00
Niels Lohmann
5f10d5d156
👷 install clang 2020-05-30 18:15:13 +02:00
Niels Lohmann
7c0c522b96
👷 install clang 2020-05-30 18:11:54 +02:00
Niels Lohmann
522ec5d7bd
👷 install clang 2020-05-30 18:06:52 +02:00
Niels Lohmann
7e5c2a480a
👷 install clang 2020-05-30 18:04:07 +02:00
Niels Lohmann
9c971c2d2f
👷 install clang 2020-05-30 17:40:27 +02:00
Niels Lohmann
4ba8c95794
👷 install clang 2020-05-30 13:41:18 +02:00
Niels Lohmann
fbd3e8f677
👷 install clang 2020-05-30 13:35:19 +02:00
Niels Lohmann
0309025b45
👷 set full path 2020-05-30 13:28:44 +02:00
Niels Lohmann
9191926fff
👷 use Makefiles 2020-05-30 13:23:13 +02:00
Niels Lohmann
42ef2a5adb
👷 use Clang compiler 2020-05-30 13:15:56 +02:00
Niels Lohmann
2182935397
👷 add Clang/Windows step 2020-05-30 13:07:23 +02:00
Niels Lohmann
bb9619ef8b
📝 request more details in question template 2020-05-27 13:22:34 +02:00
Niels Lohmann
325e8ab8ab
🔧 explicitly switch on tests in CI 2020-05-27 13:22:14 +02:00
Antony Kellermann
49000cd77d Update documentation to reflect addition of Arch Linux CI testing. 2020-05-25 20:46:39 -04:00
Niels Lohmann
a82c80e9af
Merge pull request #2125 from nlohmann/binary_type
Clean up implementation of binary type
2020-05-20 18:58:29 +02:00
Niels Lohmann
ae29456b3f
🚸 overwork report templates 2020-05-20 18:57:21 +02:00
Niels Lohmann
4d39644bd0
💚 fix build 2020-05-19 13:45:52 +02:00
Niels Lohmann
5cfa8a586e
👷 run workflows on pull requests 2020-05-18 14:01:54 +02:00