diff options
Diffstat (limited to 'json4cpp')
26 files changed, 0 insertions, 1764 deletions
diff --git a/json4cpp/.github/CODEOWNERS b/json4cpp/.github/CODEOWNERS deleted file mode 100644 index e1e1040fc6..0000000000 --- a/json4cpp/.github/CODEOWNERS +++ /dev/null @@ -1,6 +0,0 @@ -# JSON for Modern C++ was originally written by Niels Lohmann. -# Since 2013, over 250 contributors have helped to improve the library. -# This CODEOWNERS file is only to make sure that @nlohmann is requested -# for a code review in case of a pull request. - -* @nlohmann diff --git a/json4cpp/.github/CODE_OF_CONDUCT.md b/json4cpp/.github/CODE_OF_CONDUCT.md deleted file mode 100644 index 30eb5784ce..0000000000 --- a/json4cpp/.github/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or advances of - any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, - without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official email address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[mail@nlohmann.me](mailto:mail@nlohmann.me). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/json4cpp/.github/CONTRIBUTING.md b/json4cpp/.github/CONTRIBUTING.md deleted file mode 100644 index b0f65230cc..0000000000 --- a/json4cpp/.github/CONTRIBUTING.md +++ /dev/null @@ -1,225 +0,0 @@ -# Contribution Guidelines - -Thank you for your interest in contributing to this project! What began as an exercise to explore the exciting features -of C++11 has evolved into a [widely used](https://json.nlohmann.me/home/customers/) JSON library. I truly appreciate all -the contributions from the community, whether it's proposing features, identifying bugs, or fixing mistakes! To ensure -that our collaboration is efficient and effective, please follow these guidelines. - -Feel free to discuss or suggest improvements to this document -[by submitting a pull request](https://github.com/nlohmann/json/edit/develop/.github/CONTRIBUTING.md). - -## Ways to Contribute - -There are multiple ways to contribute. - -### Reporting an issue - -Please [create an issue](https://github.com/nlohmann/json/issues/new/choose), assuming one does not already exist, and -describe your concern. Note you need a [GitHub account](https://github.com/signup/free) for this. - -Clearly describe the issue: - -- If it is a bug, please describe how to **reproduce** it. If possible, attach a _complete example_ which demonstrates - the error. Please also state what you **expected** to happen instead of the error. -- If you propose a change or addition, try to give an **example** what the improved code could look like or how to use - it. -- If you found a compilation error, please tell us which **compiler** (version and operating system) you used and paste - the (relevant part of) the error messages to the ticket. - -Please stick to the provided issue template -[bug report](https://github.com/nlohmann/json/blob/develop/.github/ISSUE_TEMPLATE/bug.yaml) if possible. - -### Reporting a security vulnerability - -You can report a security vulnerability according to our -[security policy](https://github.com/nlohmann/json/security/policy). - -### Discussing a new feature - -For questions, feature or support requests, please -[open a discussion](https://github.com/nlohmann/json/discussions/new). If you find a proposed answer satisfactory, -please use the "Mark as answer" button to make it easier for readers to see what helped and for the community to filter -for open questions. - -### Proposing a fix or an improvement - -Join an ongoing discussion or comment on an existing issue before starting to code. This can help to avoid duplicate -efforts or other frustration during the later review. - -Create a [pull request](https://github.com/nlohmann/json/pulls?q=sort%3Aupdated-desc+is%3Apr+is%3Aopen) against the -`develop` branch and follow the pull request template. In particular, - -- describe the changes in detail, both the what and why, -- reference existing issues where applicable, -- add tests to maintain 100% test coverage, -- update the documentation as needed, and -- ensure the source code is amalgamated. - -We describe all points in detail below. - -All contributions (including pull requests) must agree to the -[Developer Certificate of Origin (DCO) version 1.1](https://developercertificate.org). This is exactly the same one -created and used by the Linux kernel developers and posted on http://developercertificate.org/. This is a developer's -certification that he or she has the right to submit the patch for inclusion into the project. - -## How to... - -### Describe your changes - -This library is primarily maintained as a spare-time project. As such, I cannot make any guarantee how quickly changes -are merged and released. Therefore, it is very important to make the review as smooth as possible by explaining not only -_what_ you changed, but _why_. This rationale can be very valuable down the road when improvements or bugs are discussed -years later. - -### Reference an existing issue - -[Link a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue) -to clarify that a fix is forthcoming and which issue can be closed after merging. Only a few cases (e.g., fixing typos) -do not require prior discussions. - -### Write tests - -The library has an extensive test suite that currently covers [100 %](https://coveralls.io/github/nlohmann/json) of the -library's code. These tests are crucial to maintain API stability and give future contributors confidence that they do -not accidentally break things. As Titus Winters aptly put it: - -> If you liked it, you should have put a test on it. - -#### Run the tests - -First, ensure the test suite runs before making any changes: - -```sh -$ cmake -S. -B build -$ cmake --build build -j 10 -$ ctest --test-dir build -j 10 -``` - -The test suite should report: - -``` -100% tests passed, 0 tests failed out of 98 -``` - -#### Add tests - -The tests are located in [`tests/src/unit-*.cpp`](https://github.com/nlohmann/json/tree/develop/tests/src) and contain -[doctest assertions](https://github.com/doctest/doctest/blob/master/doc/markdown/assertions.md) like `CHECK`. The tests -are structured along the features of the library or the nature of the tests. Usually, it should be clear from the -context which existing file needs to be extended, and only very few cases require creating new test files. - -When fixing a bug, edit `unit-regression2.cpp` and add a section referencing the fixed issue. - -#### Exceptions - -When you test exceptions, please use `CHECK_THROWS_WITH_AS` which also takes the `what()` argument of the thrown -exception into account. - -#### Coverage - -If test coverage decreases, an automatic warning comment will be posted on the pull request. You can access a code -coverage report as an artifact to the “Ubuntu” workflow. - -### Update the documentation - -The [main documentation](https://json.nlohmann.me) of the library is generated from the files -[`docs/mkdocs/docs`](https://github.com/nlohmann/json/blob/develop/docs/mkdocs/docs). This folder contains dedicated -pages for [certain features](https://github.com/nlohmann/json/tree/develop/docs/mkdocs/docs/features), a list of -[all exceptions](https://github.com/nlohmann/json/blob/develop/docs/mkdocs/docs/home/exceptions.md), and -[extensive API documentation](https://github.com/nlohmann/json/tree/develop/docs/mkdocs/docs/api) with details on every -public API function. - -Build the documentation locally using: - -```shell -make install_venv -C docs/mkdocs -make serve -C docs/mkdocs -``` - -The documentation will then be available at <http://127.0.0.1:8000/>. See the documentation of -[mkdocs](https://www.mkdocs.org) and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) for more -information. - -### Amalgamate the source code - -The single-header files -[`single_include/nlohmann/json.hpp`](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json.hpp) and -[`single_include/nlohmann/json_fwd.hpp`](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json_fwd.hpp) -are **generated** from the source files in the -[`include/nlohmann` directory](https://github.com/nlohmann/json/tree/develop/include/nlohmann). **Do not** edit the -files directly; instead, modify the include/nlohmann sources and regenerate the files by executing: - -```shell -make amalgamate -``` - -Running `make amalgamate` will also apply automatic formatting to the source files using -[`Artistic Style`](https://astyle.sourceforge.net/). This formatting may modify your source files in-place. Be certain to review and commit any changes to avoid unintended formatting diffs in commits. - -## Recommended documentation - -- The library’s [README file](https://github.com/nlohmann/json/blob/master/README.md) is an excellent starting point to - understand its functionality. -- The [documentation page](https://json.nlohmann.me) is the reference documentation of the library. -- [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259) is the reference for the JavaScript Object Notation (JSON) - Data Interchange Format. - -## Please don't... - -Certain contributions are not helpful. - -### Break the public API - -We take pride in the library being used by -[numerous customers across various industries](https://json.nlohmann.me/home/customers/). They all rely on the -guarantees provided by [semantic versioning](https://semver.org). Please do not change the library such that the public -API of the 3.x.y version is broken. This includes: - -- Changing function signatures (altering parameter types, return types, number of parameters) or changing the const-ness - of member functions. -- Removing functions. -- Renaming functions or classes. -- Changing exception handling. -- Changing exception ids. -- Changing access specifiers. -- Changing default arguments. - -Although these guidelines may seem restrictive, they are essential for maintaining the library’s utility. - -Breaking changes may be introduced when they are guarded with a feature macro such as -[`JSON_USE_IMPLICIT_CONVERSIONS`](https://json.nlohmann.me/api/macros/json_use_implicit_conversions/) which allows -selectively changing the behavior of the library. In next steps, the current behavior can then be deprecated. Using -feature macros then allows users to test their code against the library in the next major release. - -### Break C++11 language conformance - -This library is designed to work with C++11 and later. This means that any -[supported C++11 compiler](https://github.com/nlohmann/json/blob/master/README.md#supported-compilers) should compile -the library without problems. Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual -Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support. - -Please do not add features that do not work with the mentioned supported compilers. Please guard features from C++14 and -later against the respective [`JSON_HAS_CPP_14`](https://json.nlohmann.me/api/macros/json_has_cpp_11/) macros. - -### Break JSON conformance - -Please refrain from proposing changes that would **break [JSON](https://datatracker.ietf.org/doc/html/rfc8259) -conformance**. If you propose a conformant extension of JSON to be supported by the library, please motivate this -extension. - -## Wanted - -The following areas really need contribution and are always welcomed: - -- Extending the **continuous integration** toward more exotic compilers such as Android NDK, Intel's Compiler, or the - bleeding-edge versions Clang. -- Improving the efficiency of the **JSON parser**. The current parser is implemented as a naive recursive descent parser - with hand-coded string handling. More sophisticated approaches like LALR parsers would be really appreciated. That - said, parser generators like Bison or ANTLR do not play nice with single-header files -- I really would like to keep - the parser inside the `json.hpp` header, and I am not aware of approaches similar to [`re2c`](http://re2c.org) for - parsing. -- Extending and updating existing **benchmarks** to include (the most recent version of) this library. Though efficiency - is not everything, speed and memory consumption are very important characteristics for C++ developers, so having - proper comparisons would be interesting. - -We look forward to your contributions and collaboration to enhance the library! diff --git a/json4cpp/.github/FUNDING.yml b/json4cpp/.github/FUNDING.yml deleted file mode 100644 index 27bd6810a9..0000000000 --- a/json4cpp/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -github: nlohmann -custom: https://paypal.me/nlohmann diff --git a/json4cpp/.github/ISSUE_TEMPLATE/bug.yaml b/json4cpp/.github/ISSUE_TEMPLATE/bug.yaml deleted file mode 100644 index ed426675dd..0000000000 --- a/json4cpp/.github/ISSUE_TEMPLATE/bug.yaml +++ /dev/null @@ -1,95 +0,0 @@ -name: Bug Report -description: Create a bug report -labels: - - 'kind: bug' -body: - - type: markdown - attributes: - value: > - Thanks for taking the time to fill out this bug report! - - Make sure you give it a short and specific **title** so that the report - is searchable and uniquely identifiable. - - Note that this form is for bug reports only. Please - [open a discussion](https://github.com/nlohmann/json/discussions/new) - for questions, feature requests, or support requests. - **Please check the [FAQ](https://json.nlohmann.me/home/faq/) before - reporting an issue.** Common questions are answered there. - - type: textarea - id: summary - attributes: - label: Description - description: > - Please provide an abstract description of the issue to the developers, - and why you consider it to be a bug. Please include any specific links - to the documentation, JSON specification, or code. - validations: - required: true - - type: textarea - id: reproduce - attributes: - label: Reproduction steps - description: > - How do you trigger the bug? Please walk us through step by step. Be as - specific as possible. - validations: - required: true - - type: textarea - id: results - attributes: - label: Expected vs. actual results - description: > - Please describe what you expected to happen after the steps above and - what actually happened. - validations: - required: true - - type: textarea - id: code - attributes: - label: Minimal code example - description: > - If possible, provide a small and self-contained example that triggers - the bug. Please understand that we cannot analyze and debug large code - bases. Please do not paste screenshots here. - render: Shell - - type: textarea - id: output - attributes: - label: Error messages - description: > - Please provide any kind of error output (compilation errors, exception - messages, stack traces, etc.) which can help to diagnose the error. - render: Shell - - type: input - id: compiler - attributes: - label: Compiler and operating system - description: > - On which operating systems and compilers have you observed the issue? - Include as many relevant details about the environment you experienced - the bug in. Make sure you use a - [supported compiler](https://github.com/nlohmann/json#supported-compilers). - validations: - required: true - - type: input - id: version - attributes: - label: Library version - description: > - Which version of the library did you use? If it is a released version, - please enter the version number (e.g., 3.12.0). Otherwise, please enter - the commit hash. If you got the library from another source as the - GitHub repository (e.g., via a package manager), please also state - this. - validations: - required: true - - type: checkboxes - id: validation - attributes: - label: Validation - description: > - Please check these additional steps: - options: - - label: The bug also occurs if the latest version from the [`develop`](https://github.com/nlohmann/json/tree/develop) branch is used. - - label: I can successfully [compile and run the unit tests](https://github.com/nlohmann/json#execute-unit-tests). diff --git a/json4cpp/.github/ISSUE_TEMPLATE/config.yml b/json4cpp/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 0e96633842..0000000000 --- a/json4cpp/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Ask a question - url: https://github.com/nlohmann/json/discussions - about: Ask questions and discuss with other community members diff --git a/json4cpp/.github/PULL_REQUEST_TEMPLATE.md b/json4cpp/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 5370953242..0000000000 --- a/json4cpp/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,9 +0,0 @@ -[Describe your pull request here. Please read the text below the line and make sure you follow the checklist.] - -- [ ] The changes are described in detail, both the what and why. -- [ ] If applicable, an [existing issue](https://github.com/nlohmann/json/issues) is referenced. -- [ ] The [Code coverage](https://coveralls.io/github/nlohmann/json) remained at 100%. A test case for every new line of code. -- [ ] If applicable, the [documentation](https://json.nlohmann.me) is updated. -- [ ] The source code is amalgamated by running `make amalgamate`. - -Read the [Contribution Guidelines](https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md) for detailed information. diff --git a/json4cpp/.github/SECURITY.md b/json4cpp/.github/SECURITY.md deleted file mode 100644 index ea7e8810f3..0000000000 --- a/json4cpp/.github/SECURITY.md +++ /dev/null @@ -1,25 +0,0 @@ -# Security Policy - -## Reporting a Vulnerability - -We value the security of our users and appreciate your efforts to responsibly disclose vulnerabilities. If you have -identified a security vulnerability in this repository, please use the GitHub Security Advisory -["Report a Vulnerability"](https://github.com/nlohmann/json/security/advisories/new) tab. - -Until it is published, this draft security advisory will only be visible to the maintainers of this project. Other -users and teams may be added once the advisory is created. - -We will send a response indicating the next steps in handling your report. After the initial reply to your report, we -will keep you informed of the progress towards a fix and full announcement and may ask for additional information or -guidance. - -For vulnerabilities in third-party dependencies or modules, please report them directly to the respective maintainers. - -## Additional Resources - -- Explore security-related topics and contribute to tools and projects through - [GitHub Security Lab](https://securitylab.github.com/). -- Learn more about responsible disclosure and reporting vulnerabilities in GitHub at - [About coordinated disclosure of security vulnerabilities](https://docs.github.com/en/code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities). - -We sincerely thank you for contributing to the security and integrity of this project! diff --git a/json4cpp/.github/config.yml b/json4cpp/.github/config.yml deleted file mode 100644 index 4e3217479b..0000000000 --- a/json4cpp/.github/config.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Configuration for sentiment-bot - https://github.com/behaviorbot/sentiment-bot - -# *Required* toxicity threshold between 0 and .99 with the higher numbers being the most toxic -# Anything higher than this threshold will be marked as toxic and commented on -sentimentBotToxicityThreshold: .7 - -# *Required* Comment to reply with -sentimentBotReplyComment: > - Please be sure to review the [code of conduct](https://github.com/nlohmann/json/blob/develop/.github/CODE_OF_CONDUCT.md) and be respectful of other users. cc/ @nlohmann - - -# Configuration for request-info - https://github.com/behaviorbot/request-info - -# *Required* Comment to reply with -requestInfoReplyComment: > - We would appreciate it if you could provide us with more info about this issue or pull request! Please check the [issue template](https://github.com/nlohmann/json/blob/develop/.github/ISSUE_TEMPLATE.md) and the [pull request template](https://github.com/nlohmann/json/blob/develop/.github/PULL_REQUEST_TEMPLATE.md). - -# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given -requestInfoLabelToAdd: "state: needs more info" - -checkIssueTemplate: true -checkPullRequestTemplate: true diff --git a/json4cpp/.github/dependabot.yml b/json4cpp/.github/dependabot.yml deleted file mode 100644 index d517ed9843..0000000000 --- a/json4cpp/.github/dependabot.yml +++ /dev/null @@ -1,31 +0,0 @@ -version: 2 -updates: - - package-ecosystem: github-actions - directory: / - schedule: - interval: daily - - - package-ecosystem: pip - directory: /docs/mkdocs - schedule: - interval: daily - - - package-ecosystem: pip - directory: /tools/astyle - schedule: - interval: daily - - - package-ecosystem: pip - directory: /tools/generate_natvis - schedule: - interval: daily - - - package-ecosystem: pip - directory: /tools/serve_header - schedule: - interval: daily - - - package-ecosystem: pip - directory: /cmake/requirements - schedule: - interval: daily diff --git a/json4cpp/.github/external_ci/appveyor.yml b/json4cpp/.github/external_ci/appveyor.yml deleted file mode 100644 index 5c6b47a344..0000000000 --- a/json4cpp/.github/external_ci/appveyor.yml +++ /dev/null @@ -1,91 +0,0 @@ -version: '{build}' - -# only build PRs and commits to develop branch -# (see https://help.appveyor.com/discussions/questions/55079-two-builds-per-commit-to-pull-request) -branches: - only: - - develop - -only_commits: - files: - - .github/external_ci/appveyor.yml - - cmake/ - - include/ - - tests/ - - CMakeLists.txt - -environment: - matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - configuration: Debug - platform: x86 - CXX_FLAGS: "/W4 /WX" - CMAKE_OPTIONS: "" - GENERATOR: Visual Studio 14 2015 - - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - configuration: Release - platform: x86 - CXX_FLAGS: "/W4 /WX" - CMAKE_OPTIONS: "" - GENERATOR: Visual Studio 14 2015 - - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - configuration: Release - platform: x86 - name: with_win_header - CXX_FLAGS: "/W4 /WX" - CMAKE_OPTIONS: "" - GENERATOR: Visual Studio 14 2015 - - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - configuration: Release - platform: x86 - CXX_FLAGS: "/permissive- /std:c++17 /utf-8 /W4 /WX" - CMAKE_OPTIONS: "" - GENERATOR: Visual Studio 15 2017 - - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - configuration: Release - platform: x86 - CXX_FLAGS: "/W4 /WX" - CMAKE_OPTIONS: "-DJSON_ImplicitConversions=OFF" - GENERATOR: Visual Studio 16 2019 - - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - configuration: Release - platform: x64 - CXX_FLAGS: "/W4 /WX" - CMAKE_OPTIONS: "" - GENERATOR: Visual Studio 14 2015 - - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - configuration: Release - platform: x64 - CXX_FLAGS: "/permissive- /std:c++17 /Zc:__cplusplus /utf-8 /W4 /WX" - CMAKE_OPTIONS: "" - GENERATOR: Visual Studio 15 2017 - -init: - - cmake --version - - msbuild /version - -install: - - if "%platform%"=="x86" set GENERATOR_PLATFORM=Win32 - -before_build: - # for with_win_header build, inject the inclusion of Windows.h to the single-header library - - ps: if ($env:name -Eq "with_win_header") { $header_path = "single_include\nlohmann\json.hpp" } - - ps: if ($env:name -Eq "with_win_header") { "#include <Windows.h>`n" + (Get-Content $header_path | Out-String) | Set-Content $header_path } - - cmake . -G "%GENERATOR%" -A "%GENERATOR_PLATFORM%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On "%CMAKE_OPTIONS%" - -build_script: - - cmake --build . --config "%configuration%" --parallel 2 - -test_script: - - if "%configuration%"=="Release" ctest -C "%configuration%" --parallel 2 --output-on-failure - # On Debug builds, skip test-unicode_all - # as it is extremely slow to run and cause - # occasional timeouts on AppVeyor. - # More info: https://github.com/nlohmann/json/pull/1570 - - if "%configuration%"=="Debug" ctest --exclude-regex "test-unicode" -C "%configuration%" --parallel 2 --output-on-failure diff --git a/json4cpp/.github/labeler.yml b/json4cpp/.github/labeler.yml deleted file mode 100644 index 024d3e6da2..0000000000 --- a/json4cpp/.github/labeler.yml +++ /dev/null @@ -1,38 +0,0 @@ -version: 1 - -labels: -- label: "documentation" - files: - - "README.md" - -- label: "documentation" - files: - - "docs/.*" - -- label: "tests" - files: - - "tests/.*" - -- label: "CMake" - files: - - ".*CMakeLists.txt" - -- label: "CMake" - files: - - "cmake/.*" - -- label: "CI" - files: - - "github/workflows/.*" - -- label: "CI" - files: - - "github/external_ci/.*" - -- label: "S" - size-below: 10 -- label: "M" - size-above: 9 - size-below: 100 -- label: "L" - size-above: 100 diff --git a/json4cpp/.github/workflows/check_amalgamation.yml b/json4cpp/.github/workflows/check_amalgamation.yml deleted file mode 100644 index ed86f9a3ee..0000000000 --- a/json4cpp/.github/workflows/check_amalgamation.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: "Check amalgamation" - -on: - pull_request: - -permissions: - contents: read - -jobs: - save: - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - name: Save PR number - run: | - mkdir -p ./pr - echo ${{ github.event.number }} > ./pr/number - echo ${{ github.event.pull_request.user.login }} > ./pr/author - - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 - with: - name: pr - path: pr/ - - check: - runs-on: ubuntu-latest - env: - MAIN_DIR: ${{ github.workspace }}/main - INCLUDE_DIR: ${{ github.workspace }}/main/single_include/nlohmann - TOOL_DIR: ${{ github.workspace }}/tools/tools/amalgamate - - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - name: Checkout pull request - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - path: main - ref: ${{ github.event.pull_request.head.sha }} - - - name: Checkout tools - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - path: tools - ref: develop - - - name: Install astyle - run: | - python3 -mvenv venv - venv/bin/pip3 install -r $MAIN_DIR/tools/astyle/requirements.txt - - - name: Check amalgamation - run: | - cd $MAIN_DIR - - rm -fr $INCLUDE_DIR/json.hpp~ $INCLUDE_DIR/json_fwd.hpp~ - cp $INCLUDE_DIR/json.hpp $INCLUDE_DIR/json.hpp~ - cp $INCLUDE_DIR/json_fwd.hpp $INCLUDE_DIR/json_fwd.hpp~ - - python3 $TOOL_DIR/amalgamate.py -c $TOOL_DIR/config_json.json -s . - python3 $TOOL_DIR/amalgamate.py -c $TOOL_DIR/config_json_fwd.json -s . - echo "Format (1)" - ${{ github.workspace }}/venv/bin/astyle --project=tools/astyle/.astylerc --suffix=none --quiet $INCLUDE_DIR/json.hpp $INCLUDE_DIR/json_fwd.hpp - - diff $INCLUDE_DIR/json.hpp~ $INCLUDE_DIR/json.hpp - diff $INCLUDE_DIR/json_fwd.hpp~ $INCLUDE_DIR/json_fwd.hpp - - ${{ github.workspace }}/venv/bin/astyle --project=tools/astyle/.astylerc --suffix=orig $(find docs/examples include tests -type f \( -name '*.hpp' -o -name '*.cpp' -o -name '*.cu' \) -not -path 'tests/thirdparty/*' -not -path 'tests/abi/include/nlohmann/*' | sort) - echo Check - find $MAIN_DIR -name '*.orig' -exec false {} \+ diff --git a/json4cpp/.github/workflows/cifuzz.yml b/json4cpp/.github/workflows/cifuzz.yml deleted file mode 100644 index 1c25a70d74..0000000000 --- a/json4cpp/.github/workflows/cifuzz.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: CIFuzz -on: [pull_request] - -permissions: - contents: read - -jobs: - Fuzzing: - runs-on: ubuntu-22.04 - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - name: Build Fuzzers - id: build - uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master - with: - oss-fuzz-project-name: 'json' - dry-run: false - language: c++ - - name: Run Fuzzers - uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master - with: - oss-fuzz-project-name: 'json' - fuzz-seconds: 300 - dry-run: false - language: c++ - - name: Upload Crash - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 - if: failure() && steps.build.outcome == 'success' - with: - name: artifacts - path: ./out/artifacts diff --git a/json4cpp/.github/workflows/codeql-analysis.yml b/json4cpp/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 26e6465e08..0000000000 --- a/json4cpp/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: "Code scanning - action" - -on: - push: - branches: - - develop - - master - - release/* - pull_request: - schedule: - - cron: '0 19 * * 1' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - CodeQL-Build: - - runs-on: ubuntu-latest - permissions: - security-events: write - - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6 - with: - languages: c-cpp - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6 diff --git a/json4cpp/.github/workflows/comment_check_amalgamation.yml b/json4cpp/.github/workflows/comment_check_amalgamation.yml deleted file mode 100644 index df22c2dc07..0000000000 --- a/json4cpp/.github/workflows/comment_check_amalgamation.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Comment Check Amalgamation -on: - workflow_run: - workflows: ["Check amalgamation"] - types: - - completed - -permissions: - contents: read - -jobs: - comment: - if: ${{ github.event.workflow_run.conclusion == 'failure' }} - runs-on: ubuntu-latest - permissions: - contents: read - actions: read - issues: read - pull-requests: write - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - name: 'Download artifact' - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - with: - script: | - var artifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - var matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "pr" - })[0]; - var download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data)); - - run: unzip pr.zip - - - name: 'Comment on PR' - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - var fs = require('fs'); - const author = fs.readFileSync('./author') - const issue_number = Number(fs.readFileSync('./number')); - const opts = github.rest.issues.listForRepo.endpoint.merge({ - owner: context.repo.owner, - repo: context.repo.repo, - creator: author, - state: 'all' - }) - let first = true - const issues = await github.paginate(opts) - for (const issue of issues) { - if (issue.number === issue_number) { - continue - } - if (issue.pull_request) { - first = false - break - } - } - await github.rest.issues.createComment({ - issue_number: issue_number, - owner: context.repo.owner, - repo: context.repo.repo, - body: '## 🔴 Amalgamation check failed! 🔴\nThe source code has not been amalgamated.' - + (first ? ' @' + author + ' Please read and follow the [Contribution Guidelines]' - + '(https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md#files-to-change).' - : '') - }) diff --git a/json4cpp/.github/workflows/dependency-review.yml b/json4cpp/.github/workflows/dependency-review.yml deleted file mode 100644 index 1d8a2052c0..0000000000 --- a/json4cpp/.github/workflows/dependency-review.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Dependency Review Action -# -# This Action will scan dependency manifest files that change as part of a Pull Request, -# surfacing known-vulnerable versions of the packages declared or updated in the PR. -# Once installed, if the workflow run is marked as required, -# PRs introducing known-vulnerable packages will be blocked from merging. -# -# Source repository: https://github.com/actions/dependency-review-action -name: 'Dependency Review' -on: [pull_request] - -permissions: - contents: read - -jobs: - dependency-review: - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - name: 'Checkout Repository' - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: 'Dependency Review' - uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0 diff --git a/json4cpp/.github/workflows/flawfinder.yml b/json4cpp/.github/workflows/flawfinder.yml deleted file mode 100644 index 50ea70356d..0000000000 --- a/json4cpp/.github/workflows/flawfinder.yml +++ /dev/null @@ -1,46 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: flawfinder - -permissions: - contents: read - -on: - push: - branches: [ "develop" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "develop" ] - schedule: - - cron: '41 14 * * 3' - -jobs: - flawfinder: - name: Flawfinder - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - name: flawfinder_scan - uses: david-a-wheeler/flawfinder@c57197cd6061453f10a496f30a732bc1905918d1 # v2.0.19 - with: - arguments: '--sarif ./' - output: 'flawfinder_results.sarif' - - - name: Upload analysis results to GitHub Security tab - uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4 - with: - sarif_file: ${{github.workspace}}/flawfinder_results.sarif diff --git a/json4cpp/.github/workflows/labeler.yml b/json4cpp/.github/workflows/labeler.yml deleted file mode 100644 index 5f823a711f..0000000000 --- a/json4cpp/.github/workflows/labeler.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: "Pull Request Labeler" - -on: - pull_request_target: - types: [opened, synchronize] - -permissions: - contents: read - -jobs: - label: - permissions: - contents: read - pull-requests: write - - runs-on: ubuntu-latest - - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - uses: srvaroa/labeler@e8fbb2561481ef6e711a770f0234e9379dc76892 # master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/json4cpp/.github/workflows/macos.yml b/json4cpp/.github/workflows/macos.yml deleted file mode 100644 index 5217874d7e..0000000000 --- a/json4cpp/.github/workflows/macos.yml +++ /dev/null @@ -1,121 +0,0 @@ -name: macOS - -on: - push: - branches: - - develop - - master - - release/* - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: -# macos-11 is deprecated -# macos-11: -# runs-on: macos-11 -# strategy: -# matrix: -# xcode: ['11.7', '12.4', '12.5.1', '13.0'] -# env: -# DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer -# -# steps: -# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 -# - name: Run CMake -# run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON -# - name: Build -# run: cmake --build build --parallel 10 -# - name: Test -# run: cd build ; ctest -j 10 --output-on-failure - -# macos-12 is deprecated (https://github.com/actions/runner-images/issues/10721) -# macos-12: -# runs-on: macos-12 # https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md -# strategy: -# matrix: -# xcode: ['13.1', '13.2.1', '13.3.1', '13.4.1', '14.0', '14.0.1', '14.1'] -# env: -# DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer -# -# steps: -# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 -# - name: Run CMake -# run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON -# - name: Build -# run: cmake --build build --parallel 10 -# - name: Test -# run: cd build ; ctest -j 10 --output-on-failure - -# macos-13 is deprecated (https://github.com/actions/runner-images/issues/13046) -# macos-13: -# runs-on: macos-13 # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md -# strategy: -# matrix: -# xcode: ['14.1', '14.2', '14.3', '14.3.1', '15.0.1', '15.1', '15.2'] -# env: -# DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer -# -# steps: -# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 -# - name: Run CMake -# run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON -# - name: Build -# run: cmake --build build --parallel 10 -# - name: Test -# run: cd build ; ctest -j 10 --output-on-failure - - macos-14: - runs-on: macos-14 # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md - strategy: - matrix: - xcode: ['15.0.1', '15.1', '15.2', '15.3', '15.4'] - env: - DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run CMake - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON - - name: Build - run: cmake --build build --parallel 10 - - name: Test - run: cd build ; ctest -j 10 --output-on-failure - - macos-15: - runs-on: macos-15 # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md - strategy: - matrix: - xcode: ['16.0', '16.1', '16.2', '16.3', '16.4', '26.0.1'] - env: - DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run CMake - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON - - name: Build - run: cmake --build build --parallel 10 - - name: Test - run: cd build ; ctest -j 10 --output-on-failure - - xcode_standards: - runs-on: macos-latest - strategy: - matrix: - standard: [11, 14, 17, 20, 23, 26] - - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run CMake - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_TestStandards=${{ matrix.standard }} - - name: Build - run: cmake --build build --parallel 10 - - name: Test - run: cd build ; ctest -j 10 --output-on-failure diff --git a/json4cpp/.github/workflows/publish_documentation.yml b/json4cpp/.github/workflows/publish_documentation.yml deleted file mode 100644 index 1703726be6..0000000000 --- a/json4cpp/.github/workflows/publish_documentation.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Publish documentation - -# publish the documentation on every merge to develop branch -on: - push: - branches: - - develop - paths: - - docs/mkdocs/** - - docs/examples/** - workflow_dispatch: - -# we don't want to have concurrent jobs, and we don't want to cancel running jobs to avoid broken publications -concurrency: - group: documentation - cancel-in-progress: false - -permissions: - contents: read - -jobs: - publish_documentation: - permissions: - contents: write - - if: github.repository == 'nlohmann/json' - runs-on: ubuntu-22.04 - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - name: Install virtual environment - run: make install_venv -C docs/mkdocs - - - name: Build documentation - run: make build -C docs/mkdocs - - - name: Deploy documentation - uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/mkdocs/site diff --git a/json4cpp/.github/workflows/scorecards.yml b/json4cpp/.github/workflows/scorecards.yml deleted file mode 100644 index affe15ffee..0000000000 --- a/json4cpp/.github/workflows/scorecards.yml +++ /dev/null @@ -1,81 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. They are provided -# by a third-party and are governed by separate terms of service, privacy -# policy, and support documentation. - -name: Scorecard supply-chain security -on: - # For Branch-Protection check. Only the default branch is supported. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection - branch_protection_rule: - # To guarantee Maintained check is occasionally updated. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained - schedule: - - cron: '20 7 * * 2' - push: - branches: ["develop"] - -permissions: - contents: read - -jobs: - analysis: - name: Scorecard analysis - runs-on: ubuntu-latest - permissions: - # Needed to upload the results to code-scanning dashboard. - security-events: write - # Needed to publish results and get a badge (see publish_results below). - id-token: write - contents: read - actions: read - # To allow GraphQL ListCommits to work - issues: read - pull-requests: read - # To detect SAST tools - checks: read - - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - name: "Checkout code" - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: "Run analysis" - uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 - with: - results_file: results.sarif - results_format: sarif - # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: - # - you want to enable the Branch-Protection check on a *public* repository, or - # - you are installing Scorecards on a *private* repository - # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. - # repo_token: ${{ secrets.SCORECARD_TOKEN }} - - # Public repositories: - # - Publish results to OpenSSF REST API for easy access by consumers - # - Allows the repository to include the Scorecard badge. - # - See https://github.com/ossf/scorecard-action#publishing-results. - # For private repositories: - # - `publish_results` will always be set to `false`, regardless - # of the value entered here. - publish_results: true - - # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF - # format to the repository Actions tab. - - name: "Upload artifact" - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 - with: - name: SARIF file - path: results.sarif - retention-days: 5 - - # Upload the results to GitHub's code scanning dashboard. - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6 - with: - sarif_file: results.sarif diff --git a/json4cpp/.github/workflows/semgrep.yml b/json4cpp/.github/workflows/semgrep.yml deleted file mode 100644 index 88e722c22d..0000000000 --- a/json4cpp/.github/workflows/semgrep.yml +++ /dev/null @@ -1,54 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -# This workflow file requires a free account on Semgrep.dev to -# manage rules, file ignores, notifications, and more. -# -# See https://semgrep.dev/docs - -name: Semgrep - -on: - push: - branches: [ "develop" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "develop" ] - schedule: - - cron: '23 2 * * 4' - -permissions: - contents: read - -jobs: - semgrep: - permissions: - contents: read # for actions/checkout to fetch code - security-events: write # for github/codeql-action/upload-sarif to upload SARIF results - actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status - name: Scan - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - # Checkout project source - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - # Scan code using project's configuration on https://semgrep.dev/manage - - uses: returntocorp/semgrep-action@713efdd345f3035192eaa63f56867b88e63e4e5d - with: - publishToken: ${{ secrets.SEMGREP_APP_TOKEN }} - publishDeployment: ${{ secrets.SEMGREP_DEPLOYMENT_ID }} - generateSarif: "1" - - # Upload SARIF file generated in previous step - - name: Upload SARIF file - uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4 - with: - sarif_file: semgrep.sarif - if: always() diff --git a/json4cpp/.github/workflows/stale.yml b/json4cpp/.github/workflows/stale.yml deleted file mode 100644 index 3161ebb756..0000000000 --- a/json4cpp/.github/workflows/stale.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: 'Comment and close stale issues and PR' -on: - schedule: - - cron: '0 0 * * *' - -permissions: - contents: read - -jobs: - stale: - runs-on: ubuntu-latest - - permissions: - issues: write - pull-requests: write - - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0 - with: - stale-issue-label: 'state: stale' - stale-pr-label: 'state: stale' - exempt-issue-labels: 'pinned,security' - stale-issue-message: 'This issue has been marked as stale because it has been open for 90 days without activity. If this issue is still relevant, please add a comment or remove the "stale" label. Otherwise, it will be closed in 10 days. Thank you for helping us prioritize our work!' - stale-pr-message: 'This pull request has been marked as stale because it has had no activity for 30 days. While we won’t close it automatically, we encourage you to update or comment if it is still relevant. Keeping pull requests active and up-to-date helps us review and merge changes more efficiently. Thank you for your contributions!' - close-issue-message: 'This issue has been closed after being marked as stale for 10 days without any further activity. If this was done in error or the issue is still relevant, please feel free to reopen it or create a new issue. We appreciate your understanding and contributions.' - days-before-stale: 90 - days-before-pr-stale: 30 - days-before-close: 10 - days-before-pr-close: -1 diff --git a/json4cpp/.github/workflows/ubuntu.yml b/json4cpp/.github/workflows/ubuntu.yml deleted file mode 100644 index 87b09ae4c2..0000000000 --- a/json4cpp/.github/workflows/ubuntu.yml +++ /dev/null @@ -1,283 +0,0 @@ -name: Ubuntu - -on: - push: - branches: - - develop - - master - - release/* - pull_request: - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true - -jobs: - ci_test_gcc: - runs-on: ubuntu-latest - container: gcc:latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Get latest CMake and ninja - uses: lukka/get-cmake@f176ccd3f28bda569c43aae4894f06b2435a3375 # v4.2.3 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ci_test_gcc - - ci_infer: - runs-on: ubuntu-latest - container: ghcr.io/nlohmann/json-ci:v2.4.0 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ci_infer - - ci_static_analysis_ubuntu: - runs-on: ubuntu-latest - strategy: - matrix: - target: [ci_test_amalgamation, ci_test_single_header, ci_cppcheck, ci_cpplint, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata, ci_reuse_compliance, ci_test_valgrind] - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - name: Install Valgrind - run: sudo apt-get update ; sudo apt-get install -y valgrind - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Get latest CMake and ninja - uses: lukka/get-cmake@f176ccd3f28bda569c43aae4894f06b2435a3375 # v4.2.3 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ${{ matrix.target }} - - ci_static_analysis_clang: - runs-on: ubuntu-latest - container: silkeh/clang:dev - strategy: - matrix: - target: [ci_test_clang, ci_clang_tidy, ci_test_clang_sanitizer, ci_clang_analyze, ci_single_binaries] - steps: - - name: Install git, clang-tools, iwyu (ci_single_binaries), and unzip - run: apt-get update ; apt-get install -y git clang-tools iwyu unzip - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Get latest CMake and ninja - uses: lukka/get-cmake@f176ccd3f28bda569c43aae4894f06b2435a3375 # v4.2.3 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ${{ matrix.target }} - - ci_cmake_options: - runs-on: ubuntu-latest - container: ubuntu:focal - strategy: - matrix: - target: [ci_cmake_flags, ci_test_diagnostics, ci_test_diagnostic_positions, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls] - steps: - - name: Install build-essential - run: apt-get update ; apt-get install -y build-essential unzip wget git libssl-dev - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Get latest CMake and ninja - uses: lukka/get-cmake@f176ccd3f28bda569c43aae4894f06b2435a3375 # v4.2.3 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ${{ matrix.target }} - - ci_test_coverage: - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Install dependencies and de_DE locale - run: | - sudo apt-get clean - sudo apt-get update - sudo apt-get install -y build-essential cmake lcov ninja-build make locales gcc-multilib g++-multilib - sudo locale-gen de_DE - sudo update-locale - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ci_test_coverage - - name: Archive coverage report - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 - with: - name: code-coverage-report - path: ${{ github.workspace }}/build/html - - name: Publish report to Coveralls - uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: ${{ github.workspace }}/build/json.info.filtered.noexcept - fail-on-error: false - - ci_test_compilers_gcc_old: - runs-on: ubuntu-latest - strategy: - matrix: - compiler: ['4.8', '4.9', '5', '6'] - container: ghcr.io/nlohmann/json-ci:v2.4.0 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run CMake - run: CXX=g++-${{ matrix.compiler }} cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ci_test_compiler_g++-${{ matrix.compiler }} - - ci_test_compilers_gcc: - runs-on: ubuntu-latest - strategy: - matrix: - # older GCC docker images (4, 5, 6) fail to check out code - compiler: ['7', '8', '9', '10', '11', '12', '13', '14', '15', 'latest'] - container: gcc:${{ matrix.compiler }} - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Get latest CMake and ninja - uses: lukka/get-cmake@f176ccd3f28bda569c43aae4894f06b2435a3375 # v4.2.3 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ci_test_compiler_default - - ci_test_compilers_clang: - runs-on: ubuntu-latest - strategy: - matrix: - compiler: ['3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15-bullseye', '16', '17', '18', '19', '20', 'latest'] - container: silkeh/clang:${{ matrix.compiler }} - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Get latest CMake and ninja - uses: lukka/get-cmake@f176ccd3f28bda569c43aae4894f06b2435a3375 # v4.2.3 - - name: Set env FORCE_STDCPPFS_FLAG for clang 7 / 8 / 9 / 10 - run: echo "JSON_FORCED_GLOBAL_COMPILE_OPTIONS=-DJSON_HAS_FILESYSTEM=0;-DJSON_HAS_EXPERIMENTAL_FILESYSTEM=0" >> "$GITHUB_ENV" - if: ${{ matrix.compiler == '7' || matrix.compiler == '8' || matrix.compiler == '9' || matrix.compiler == '10' }} - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ci_test_compiler_default - - ci_test_standards_gcc: - runs-on: ubuntu-latest - container: gcc:latest - strategy: - matrix: - standard: [11, 14, 17, 20, 23, 26] - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Get latest CMake and ninja - uses: lukka/get-cmake@f176ccd3f28bda569c43aae4894f06b2435a3375 # v4.2.3 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ci_test_gcc_cxx${{ matrix.standard }} - - ci_test_standards_clang: - runs-on: ubuntu-latest - container: silkeh/clang:latest - strategy: - matrix: - standard: [11, 14, 17, 20, 23, 26] - stdlib: [libcxx, libstdcxx] - steps: - - name: Install git and unzip - run: apt-get update ; apt-get install -y git unzip - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Get latest CMake and ninja - uses: lukka/get-cmake@f176ccd3f28bda569c43aae4894f06b2435a3375 # v4.2.3 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build with libc++ - run: cmake --build build --target ci_test_clang_libcxx_cxx${{ matrix.standard }} - if: ${{ matrix.stdlib == 'libcxx' }} - - name: Build with libstdc++ - run: cmake --build build --target ci_test_clang_cxx${{ matrix.standard }} - if: ${{ matrix.stdlib == 'libstdcxx' }} - - ci_cuda_example: - runs-on: ubuntu-latest - container: ghcr.io/nlohmann/json-ci:v2.4.0 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ci_cuda_example - - ci_module_cpp20: - strategy: - matrix: - container: ['gcc:latest', 'silkeh/clang:latest'] - runs-on: ubuntu-latest - container: ${{ matrix.container }} - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Get latest CMake and ninja - uses: lukka/get-cmake@f176ccd3f28bda569c43aae4894f06b2435a3375 # v4.2.3 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ci_module_cpp20 - - ci_icpc: - runs-on: ubuntu-latest - container: ghcr.io/nlohmann/json-ci:v2.2.0 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: | - . /opt/intel/oneapi/setvars.sh - cmake --build build --target ci_icpc - - ci_emscripten: - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - name: Install emscripten - uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14 - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Get latest CMake and ninja - uses: lukka/get-cmake@f176ccd3f28bda569c43aae4894f06b2435a3375 # v4.2.3 - - name: Run CMake - run: cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -GNinja - - name: Build - run: cmake --build build - - ci_test_documentation: - runs-on: ubuntu-latest - strategy: - matrix: - target: [ci_test_examples, ci_test_build_documentation] - steps: - - name: Harden Runner - uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 - with: - egress-policy: audit - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run CMake - run: cmake -S . -B build -DJSON_CI=On - - name: Build - run: cmake --build build --target ${{ matrix.target }} diff --git a/json4cpp/.github/workflows/windows.yml b/json4cpp/.github/workflows/windows.yml deleted file mode 100644 index 6475bca0fc..0000000000 --- a/json4cpp/.github/workflows/windows.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: Windows - -on: - push: - branches: - - develop - - master - - release/* - pull_request: - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true - -jobs: - mingw: - runs-on: windows-2022 - strategy: - matrix: - architecture: [x64, x86] - - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Set up MinGW - uses: egor-tensin/setup-mingw@41b837e47d7f85214629d255b9c4bc3fcbe9fd63 # v3.0 - with: - platform: ${{ matrix.architecture }} - version: 12.2.0 # https://github.com/egor-tensin/setup-mingw/issues/14 - - name: Run CMake - run: cmake -S . -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On - - name: Build - run: cmake --build build --parallel 10 - - name: Test - run: cd build ; ctest -j 10 -C Debug --output-on-failure - - msvc: - strategy: - matrix: - build_type: [Debug, Release] - architecture: [Win32, x64] - std_version: [default, latest] - - runs-on: windows-2022 - - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Set extra CXX_FLAGS for latest std_version - id: cxxflags - run: | - if [ "${{ matrix.std_version }}" = "latest" ]; then - echo "flags=/permissive- /std:c++latest /utf-8 /W4 /WX" >> $GITHUB_ENV - else - echo "flags=/W4 /WX" >> $GITHUB_ENV - fi - shell: bash - - name: Run CMake (Release) - run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="$env:flags" - if: matrix.build_type == 'Release' - shell: pwsh - - name: Run CMake (Debug) - run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="$env:flags" - if: matrix.build_type == 'Debug' - shell: pwsh - - name: Build - run: cmake --build build --config ${{ matrix.build_type }} --parallel 10 - - name: Test - run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure - - clang: - runs-on: windows-2022 - strategy: - matrix: - version: [11.0.1, 12.0.1, 13.0.1, 14.0.6, 15.0.7, 16.0.6, 18.1.8, 19.1.7, 20.1.8] - - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Install Clang - run: curl -fsSL -o LLVM${{ matrix.version }}.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ matrix.version }}/LLVM-${{ matrix.version }}-win64.exe ; 7z x LLVM${{ matrix.version }}.exe -y -o"C:/Program Files/LLVM" - - name: Set up MinGW - uses: egor-tensin/setup-mingw@41b837e47d7f85214629d255b9c4bc3fcbe9fd63 # v3.0 - with: - platform: x64 - version: 12.2.0 # https://github.com/egor-tensin/setup-mingw/issues/14 - - name: Run CMake - run: cmake -S . -B build ^ - -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" ^ - -DCMAKE_CXX_FLAGS="--target=x86_64-w64-mingw32 -stdlib=libstdc++ -pthread" ^ - -DCMAKE_EXE_LINKER_FLAGS="-lwinpthread" ^ - -G"MinGW Makefiles" ^ - -DCMAKE_BUILD_TYPE=Debug ^ - -DJSON_BuildTests=On - - name: Build - run: cmake --build build --parallel 10 - - name: Test - run: cd build ; ctest -j 10 -C Debug --exclude-regex "test-unicode" --output-on-failure - - clang-cl-12: - runs-on: windows-2022 - strategy: - matrix: - architecture: [Win32, x64] - - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run CMake - run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -T ClangCL -DJSON_BuildTests=On - - name: Build - run: cmake --build build --config Debug --parallel 10 - - name: Test - run: cd build ; ctest -j 10 -C Debug --exclude-regex "test-unicode" --output-on-failure - - ci_module_cpp20: - runs-on: windows-latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run CMake (Debug) - run: cmake -S . -B build -G "Visual Studio 17 2022" -DJSON_CI=ON -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX" - - name: Build - run: cmake --build build --config Debug --target ci_module_cpp20 -
\ No newline at end of file |
