Skip to content

Commit

Permalink
Merge branch 'release/3.11.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Aug 12, 2022
2 parents 69d7448 + 9d69186 commit bc889af
Show file tree
Hide file tree
Showing 267 changed files with 3,884 additions and 1,248 deletions.
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ Clearly describe the issue:
- If you propose a change or addition, try to give an **example** how 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 templates ([bug report](https://github.com/nlohmann/json/blob/develop/.github/ISSUE_TEMPLATE/Bug_report.md), [feature request](https://github.com/nlohmann/json/blob/develop/.github/ISSUE_TEMPLATE/Feature_request.md), or [question](https://github.com/nlohmann/json/blob/develop/.github/ISSUE_TEMPLATE/question.md)) if possible.
Please stick to the provided issue template ([bug report](https://github.com/nlohmann/json/blob/develop/.github/ISSUE_TEMPLATE/bug.yml) if possible. For questions, feature or support requests, please [open a discussion](https://github.com/nlohmann/json/discussions/new).

## Files to change

:exclamation: Before you make any changes, note the single-header file [`single_include/nlohmann/json.hpp`](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json.hpp) is **generated** from the source files in the [`include/nlohmann` directory](https://github.com/nlohmann/json/tree/develop/include/nlohmann). Please **do not** edit file `single_include/nlohmann/json.hpp` directly, but change the `include/nlohmann` sources and regenerate file `single_include/nlohmann/json.hpp` by executing `make amalgamate`.
:exclamation: Before you make any changes, note 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). Please **do not** edit the files `single_include/nlohmann/json.hpp` and `single_include/nlohmann/json_fwd.hpp` directly, but change the `include/nlohmann` sources and regenerate the files by executing `make amalgamate`.

To make changes, you need to edit the following files:

1. [`include/nlohmann/*`](https://github.com/nlohmann/json/tree/develop/include/nlohmann) - These files are the sources of the library. Before testing or creating a pull request, execute `make amalgamate` to regenerate `single_include/nlohmann/json.hpp`.
1. [`include/nlohmann/*`](https://github.com/nlohmann/json/tree/develop/include/nlohmann) - These files are the sources of the library. Before testing or creating a pull request, execute `make amalgamate` to regenerate `single_include/nlohmann/json.hpp` and `single_include/nlohmann/json_fwd.hpp`.

2. [`test/src/unit-*.cpp`](https://github.com/nlohmann/json/tree/develop/test/src) - These files contain the [doctest](https://github.com/onqtam/doctest) unit tests which currently cover [100 %](https://coveralls.io/github/nlohmann/json) of the library's code.
2. [`tests/src/unit-*.cpp`](https://github.com/nlohmann/json/tree/develop/tests/src) - These files contain the [doctest](https://github.com/onqtam/doctest) unit tests which currently cover [100 %](https://coveralls.io/github/nlohmann/json) of the library's code.

If you add or change a feature, please also add a unit test to this file. The unit tests can be compiled and executed with

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ body:
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.11.1). Otherwise, please enter
please enter the version number (e.g., 3.11.2). 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.
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Read the [Contribution Guidelines](https://github.com/nlohmann/json/blob/develop
- [ ] Changes are described in the pull request, or an [existing issue is referenced](https://github.com/nlohmann/json/issues).
- [ ] The test suite [compiles and runs](https://github.com/nlohmann/json/blob/develop/README.md#execute-unit-tests) without error.
- [ ] [Code coverage](https://coveralls.io/github/nlohmann/json) is 100%. Test cases can be added by editing the [test suite](https://github.com/nlohmann/json/tree/develop/test/src).
- [ ] The source code is amalgamated; that is, after making changes to the sources in the `include/nlohmann` directory, run `make amalgamate` to create the single-header file `single_include/nlohmann/json.hpp`. The whole process is described [here](https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md#files-to-change).
- [ ] The source code is amalgamated; that is, after making changes to the sources in the `include/nlohmann` directory, run `make amalgamate` to create the single-header files `single_include/nlohmann/json.hpp` and `single_include/nlohmann/json_fwd.hpp`. The whole process is described [here](https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md#files-to-change).

## Please don't

Expand Down
20 changes: 14 additions & 6 deletions .github/external_ci/appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
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
Expand Down Expand Up @@ -75,9 +89,3 @@ test_script:
# 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

# 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
38 changes: 38 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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
23 changes: 0 additions & 23 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,15 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can check out the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# 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@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
18 changes: 18 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Pull Request Labeler"

on:
pull_request_target:
types: [opened, synchronize]

jobs:
label:
permissions:
contents: read
pull-requests: write

runs-on: ubuntu-latest

steps:
- uses: srvaroa/labeler@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
24 changes: 12 additions & 12 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,37 @@ concurrency:

jobs:
xcode_1:
runs-on: macos-10.15
runs-on: macos-11
strategy:
matrix:
xcode: [12.4, 12.3, 12.2, 12.1.1, 12.1, 12, 11.7, 11.6, 11.5, 11.4.1, 11.3.1, 11.2.1, 10.3]
xcode: ['11.7', '12.4', '12.5.1', '13.0']
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer

steps:
- uses: actions/checkout@v3
- name: cmake
- name: Run CMake
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
- name: build
- name: Build
run: cmake --build build --parallel 10
- name: test
- name: Test
run: cd build ; ctest -j 10 --output-on-failure

xcode_2:
runs-on: macos-12
strategy:
matrix:
xcode: [13.3.1, 13.3, 13.2.1, 13.2, 13.1]
xcode: ['13.1', '13.2.1', '13.3.1', '13.4.1']
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer

steps:
- uses: actions/checkout@v3
- name: cmake
- name: Run CMake
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
- name: build
- name: Build
run: cmake --build build --parallel 10
- name: test
- name: Test
run: cd build ; ctest -j 10 --output-on-failure

xcode_standards:
Expand All @@ -58,9 +58,9 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: cmake
- name: Run CMake
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_TestStandards=${{ matrix.standard }}
- name: build
- name: Build
run: cmake --build build --parallel 10
- name: test
- name: Test
run: cd build ; ctest -j 10 --output-on-failure
32 changes: 32 additions & 0 deletions .github/workflows/publish_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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

jobs:
publish_documentation:
if: github.repository == 'nlohmann/json'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Install and update PlantUML
run: sudo apt-get update ; sudo apt-get install -y plantuml

- name: Install virtual environment
run: make install_venv -C docs/mkdocs

- name: Publish documentation
run: make publish -C docs/mkdocs
Loading

0 comments on commit bc889af

Please sign in to comment.