Commit Graph

20 Commits (527da54dcb38342cf7ab5327e6849ad0ffe032ab)

Author SHA1 Message Date
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
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 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
Niels Lohmann fa5d3b5a9b
👷 run CI for release branches 2021-08-15 22:49:31 +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 077fe41a82
🚧 do not check pushes to non-default branches 2021-03-28 14:59:42 +02:00
Niels Lohmann f268035946
👷 consolidate CI 2021-03-28 13:37:04 +02: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 325e8ab8ab
🔧 explicitly switch on tests in CI 2020-05-27 13:22:14 +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
Niels Lohmann 44a2158b18
👷 make debug build 2020-05-12 20:51:45 +02:00
Niels Lohmann 77e0ba8750
👷 parallelize builds 2020-05-12 20:45:18 +02:00
Niels Lohmann 6e59c8301a
👷 simplify CMake invocations 2020-05-12 20:37:50 +02:00
Niels Lohmann ab02b08296
👷 rename workflows 2020-05-12 20:30:11 +02:00
Niels Lohmann cd76f59af6
👷 add more GitHub actions workflows 2020-05-12 20:26:17 +02:00