Commit Graph

164 Commits

Author SHA1 Message Date
Niels Lohmann
f7d46b8803
💚 fix Ubuntu build 2022-12-10 14:42:58 +01:00
Niels Lohmann
84e5a321eb
💚 fix Ubuntu build 2022-12-10 14:23:18 +01:00
Niels Lohmann
23e69222c5
💚 fix Ubuntu build 2022-12-10 14:10:28 +01:00
Niels Lohmann
5fa4e66d37
💚 fix Ubuntu build 2022-12-10 13:55:30 +01:00
Niels Lohmann
c700a9ecbb
💚 fix Ubuntu build 2022-12-10 13:52:27 +01:00
Niels Lohmann
c5a03c2ea0
💚 fix Ubuntu build 2022-12-10 13:48:06 +01:00
Niels Lohmann
349e4b310e
Fix natvis XML (#3863)
* 🐛 fix natvis XML

* 🐛 fix natvis XML
2022-12-09 16:34:34 +01:00
Niels Lohmann
8f8315368b
🐛 fix natvis XML 2022-12-04 21:47:08 +01:00
Niels Lohmann
24ba54e687
Fix pipeline (#3862) 2022-12-04 14:03:54 +01:00
tocic
9dfa722669
Fix typos in .md files (#3748) 2022-09-17 10:34:30 +02:00
Niels Lohmann
58bd97e2b1
Add clang-tools to required tools for ci_static_analysis_clang (#3724)
* 💚 add clang-tools to required tools for ci_static_analysis_clang

* 🚨 update Clang-Tidy warning selection

* 🚨 fix Clang-Tidy warnings

* 🚨 fix Clang-Tidy warnings

* 🚨 fix Clang-Tidy warnings

* 🚨 fix Clang-Tidy warnings

* 🚨 fix Clang-Tidy warnings

* 🚨 fix Clang-Tidy warnings

* 🚨 fix Clang-Tidy warnings

* 🚨 fix Clang-Tidy warnings

* 🚨 fix Clang-Tidy warnings

* 🚨 fix Clang-Tidy warnings

* 🚨 fix Clang-Tidy warnings (#3738)

*  revert fix

*  revert fix

* 🚨 fix Clang-Tidy warnings (#3739)

Co-authored-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
2022-09-13 12:58:26 +02:00
Niels Lohmann
f7973f46d6
Use official Clang/GCC containers (#3703) 2022-08-27 17:28:50 +02:00
Florian Albrechtskirchinger
4c8cdd7afc
Add 'Check amalgamation' workflow (#3693) 2022-08-27 14:20:51 +02:00
Niels Lohmann
9d69186291
🔖 set version to 3.11.2 2022-08-12 15:04:06 +02:00
Florian Albrechtskirchinger
231f3108ff
Amalgamate the forward declaration header (#3679)
* Amalgamate the forward declaration header

* Update CONTRIBUTING and PULL_REQUEST_TEMPLATE

* Update documentation
2022-08-07 13:57:32 +02:00
Niels Lohmann
bfbe774d8f
🚑 fix documentation job 2022-08-07 13:34:34 +02:00
Niels Lohmann
7b6cf5918b
Documentation change (#3672)
Co-authored-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
2022-08-05 19:51:39 +02:00
Niels Lohmann
e839f58a2a
👷 fix whitespace (#3675) 2022-08-05 09:12:28 +02:00
Florian Albrechtskirchinger
01af734d63
Attempt to fix labeler permissions (#3674) 2022-08-04 23:38:27 +02:00
Florian Albrechtskirchinger
b13b8748b6
Refine 'Publish documentation' workflow (#3673)
* Only publish documentation when changed

* Enable manual publishing of the documentation

* Don't try to publish documentation from forks
2022-08-04 22:53:05 +02:00
Niels Lohmann
500bdc56bf
Add labeler action (#3671)
👷 add labeler action
2022-08-04 16:46:45 +02:00
Niels Lohmann
98d70d4676
Publish documentation on push to develop branch (#3660)
👷 add job to publish the documentation
2022-08-03 22:28:26 +02:00
Niels Lohmann
22cd1c9eb9
🔧 adjust naming of GitHub action jobs (#3661) 2022-08-03 18:37:02 +02:00
Florian Albrechtskirchinger
ac9e668e63
Update CI (#3626)
* Bump macos-10.5 runner to macos-11 and update Xcode versions

* Address CodeQL warning

* Only build relevant commits on AppVeyor

* Don't hardcode paths in Ubuntu workflow
2022-08-03 09:15:16 +02:00
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