mirror of
https://github.com/nlohmann/json.git
synced 2026-10-28 16:55:41 +00:00
Split the macOS and Windows jobs into a PR set, a full set, and a nightly set
The 19 macOS and 32 Windows jobs ran on every push to every pull request. They now use the same sets as the Ubuntu jobs: - PR set (16): four Visual Studio 2022 and two Visual Studio 2026 configurations, ARM64 Debug, Clang 20.1.8 with MinGW, MinGW x86, the C++20 module test, Xcode 16.0, 16.4, 26.3 and 26.6, C++14 on the latest Xcode, and the Swift Package Manager check. - full set (34): every other Visual Studio configuration, Clang version, clang-cl, Xcode version and C++ standard. - nightly set (1): 64-bit MinGW, which takes about 68 minutes. A failed nightly run opens or updates an issue. No configuration is removed: tools/ci_jobs/ci_jobs.py --compare lists 157 configurations before and after, and all jobs keep their runner, steps and environment. ci_jobs.py now checks all three workflows and expands matrices that consist only of include entries correctly. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
5 files changed
+300
-67
No files matched your search
@@ -7,6 +7,8 @@ on:
|
|||||||
- master
|
- master
|
||||||
- release/*
|
- release/*
|
||||||
pull_request:
|
pull_request:
|
||||||
|
# labeled: the "🚀 ready to merge" label starts the full set (see below)
|
||||||
|
types: [opened, synchronize, reopened, labeled]
|
||||||
# Skip pull requests that change only files no job here reads. The list is checked by
|
# Skip pull requests that change only files no job here reads. The list is checked by
|
||||||
# tools/check_path_filters/check_path_filters.py (repository_checks.yml); change both together.
|
# tools/check_path_filters/check_path_filters.py (repository_checks.yml); change both together.
|
||||||
paths:
|
paths:
|
||||||
@@ -28,23 +30,37 @@ on:
|
|||||||
- '.github/workflows/macos.yml'
|
- '.github/workflows/macos.yml'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# A run triggered by any other label gets a group of its own, so it does not
|
||||||
|
# cancel the run of the last push; its jobs are skipped.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.event_name == 'schedule' && 'nightly' || github.ref || github.run_id }}${{ github.event.action == 'labeled' && github.event.label.name != '🚀 ready to merge' && format('-{0}', github.run_id) || '' }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
|
||||||
|
# The jobs are split into a PR set and a full set like in ubuntu.yml (see "How
|
||||||
|
# CI runs" in docs/mkdocs/docs/community/quality_assurance.md): the PR set runs
|
||||||
|
# on every push; the full set after the PR set passed, on pushes and on pull
|
||||||
|
# requests with the "🚀 ready to merge" label. tools/ci_jobs checks that every
|
||||||
|
# job belongs to exactly one set.
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
###########################################################################
|
||||||
|
# PR set
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
macos-15:
|
macos-15:
|
||||||
|
if: &pr_set ${{ github.event_name != 'schedule' && (github.event.action != 'labeled' || github.event.label.name == '🚀 ready to merge') }}
|
||||||
runs-on: macos-15 # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
|
runs-on: macos-15 # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
xcode: ['16.0', '16.1', '16.2', '16.3', '16.4', '26.0.1', '26.1.1', '26.2', '26.3']
|
xcode: ['16.0', '16.4', '26.3']
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||||
|
|
||||||
steps:
|
steps: &xcode_steps
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
@@ -56,10 +72,11 @@ jobs:
|
|||||||
run: cd build ; ctest -j 10 --output-on-failure
|
run: cd build ; ctest -j 10 --output-on-failure
|
||||||
|
|
||||||
macos-26:
|
macos-26:
|
||||||
|
if: *pr_set
|
||||||
runs-on: macos-26 # https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md
|
runs-on: macos-26 # https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
xcode: ['26.4.1', '26.5', '26.6']
|
xcode: ['26.6']
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||||
|
|
||||||
@@ -75,12 +92,13 @@ jobs:
|
|||||||
run: cd build ; ctest -j 10 --output-on-failure
|
run: cd build ; ctest -j 10 --output-on-failure
|
||||||
|
|
||||||
xcode_standards:
|
xcode_standards:
|
||||||
|
if: *pr_set
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
standard: [11, 14, 17, 20, 23, 26]
|
standard: [14]
|
||||||
|
|
||||||
steps:
|
steps: &xcode_standards_steps
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
@@ -92,6 +110,7 @@ jobs:
|
|||||||
run: cd build ; ctest -j 10 --output-on-failure
|
run: cd build ; ctest -j 10 --output-on-failure
|
||||||
|
|
||||||
swiftpm:
|
swiftpm:
|
||||||
|
if: *pr_set
|
||||||
runs-on: macos-15
|
runs-on: macos-15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
@@ -125,3 +144,42 @@ jobs:
|
|||||||
EOF
|
EOF
|
||||||
cd /tmp/json-swiftpm-consumer
|
cd /tmp/json-swiftpm-consumer
|
||||||
swift build
|
swift build
|
||||||
|
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# full set: starts after the PR set passed
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
macos-15_full:
|
||||||
|
needs: &pr_set_jobs [macos-15, macos-26, xcode_standards, swiftpm]
|
||||||
|
if: &full_set ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, '🚀 ready to merge') }}
|
||||||
|
runs-on: macos-15 # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
xcode: ['16.1', '16.2', '16.3', '26.0.1', '26.1.1', '26.2']
|
||||||
|
env:
|
||||||
|
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||||
|
|
||||||
|
steps: *xcode_steps
|
||||||
|
|
||||||
|
macos-26_full:
|
||||||
|
needs: *pr_set_jobs
|
||||||
|
if: *full_set
|
||||||
|
runs-on: macos-26 # https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
xcode: ['26.4.1', '26.5']
|
||||||
|
env:
|
||||||
|
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||||
|
|
||||||
|
steps: *xcode_steps
|
||||||
|
|
||||||
|
xcode_standards_full:
|
||||||
|
needs: *pr_set_jobs
|
||||||
|
if: *full_set
|
||||||
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
standard: [11, 17, 20, 23, 26]
|
||||||
|
|
||||||
|
steps: *xcode_standards_steps
|
||||||
+195
-32
@@ -7,6 +7,8 @@ on:
|
|||||||
- master
|
- master
|
||||||
- release/*
|
- release/*
|
||||||
pull_request:
|
pull_request:
|
||||||
|
# labeled: the "🚀 ready to merge" label starts the full set (see below)
|
||||||
|
types: [opened, synchronize, reopened, labeled]
|
||||||
# Skip pull requests that change only files no job here reads. The list is checked by
|
# Skip pull requests that change only files no job here reads. The list is checked by
|
||||||
# tools/check_path_filters/check_path_filters.py (repository_checks.yml); change both together.
|
# tools/check_path_filters/check_path_filters.py (repository_checks.yml); change both together.
|
||||||
paths:
|
paths:
|
||||||
@@ -26,23 +28,41 @@ on:
|
|||||||
# built by the swiftpm job (macos.yml)
|
# built by the swiftpm job (macos.yml)
|
||||||
- 'docs/mkdocs/docs/integration/swift/**'
|
- 'docs/mkdocs/docs/integration/swift/**'
|
||||||
- '.github/workflows/windows.yml'
|
- '.github/workflows/windows.yml'
|
||||||
|
schedule:
|
||||||
|
# the nightly set (see below), on develop
|
||||||
|
- cron: '0 2 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
# A run triggered by any other label gets a group of its own, so it does not
|
||||||
|
# cancel the run of the last push; its jobs are skipped.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.event_name == 'schedule' && 'nightly' || github.ref || github.run_id }}${{ github.event.action == 'labeled' && github.event.label.name != '🚀 ready to merge' && format('-{0}', github.run_id) || '' }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
|
||||||
|
# The jobs are split into three sets like in ubuntu.yml (see "How CI runs" in
|
||||||
|
# docs/mkdocs/docs/community/quality_assurance.md): the PR set runs on every
|
||||||
|
# push; the full set after the PR set passed, on pushes and on pull requests
|
||||||
|
# with the "🚀 ready to merge" label; the nightly set nightly on develop, on
|
||||||
|
# pushes to master and release/*, and when started by hand. tools/ci_jobs
|
||||||
|
# checks that every job belongs to exactly one set.
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
###########################################################################
|
||||||
|
# PR set
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
mingw:
|
mingw:
|
||||||
|
if: &pr_set ${{ github.event_name != 'schedule' && (github.event.action != 'labeled' || github.event.label.name == '🚀 ready to merge') }}
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
architecture: [x64, x86]
|
architecture: [x86]
|
||||||
|
|
||||||
steps:
|
steps: &mingw_steps
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
@@ -59,15 +79,26 @@ jobs:
|
|||||||
run: cd build ; ctest -j 10 -C Debug --output-on-failure
|
run: cd build ; ctest -j 10 -C Debug --output-on-failure
|
||||||
|
|
||||||
msvc:
|
msvc:
|
||||||
|
if: *pr_set
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build_type: [Debug, Release]
|
include:
|
||||||
architecture: [Win32, x64]
|
- build_type: Debug
|
||||||
std_version: [default, latest]
|
architecture: x64
|
||||||
|
std_version: default
|
||||||
|
- build_type: Release
|
||||||
|
architecture: x64
|
||||||
|
std_version: default
|
||||||
|
- build_type: Debug
|
||||||
|
architecture: Win32
|
||||||
|
std_version: default
|
||||||
|
- build_type: Release
|
||||||
|
architecture: Win32
|
||||||
|
std_version: latest
|
||||||
|
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
|
|
||||||
steps:
|
steps: &msvc_steps
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
@@ -96,15 +127,20 @@ jobs:
|
|||||||
# Visual Studio 2026 (v145 toolset) on the windows-2025 image. The "Visual Studio
|
# Visual Studio 2026 (v145 toolset) on the windows-2025 image. The "Visual Studio
|
||||||
# 18 2026" generator requires CMake 4.2+, so a recent CMake is fetched explicitly.
|
# 18 2026" generator requires CMake 4.2+, so a recent CMake is fetched explicitly.
|
||||||
msvc-vs2026:
|
msvc-vs2026:
|
||||||
|
if: *pr_set
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build_type: [Debug, Release]
|
include:
|
||||||
architecture: [Win32, x64]
|
- build_type: Debug
|
||||||
std_version: [default, latest]
|
architecture: x64
|
||||||
|
std_version: latest
|
||||||
|
- build_type: Release
|
||||||
|
architecture: Win32
|
||||||
|
std_version: default
|
||||||
|
|
||||||
runs-on: windows-2025
|
runs-on: windows-2025
|
||||||
|
|
||||||
steps:
|
steps: &msvc_vs2026_steps
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
@@ -136,13 +172,14 @@ jobs:
|
|||||||
# Native ARM64 Windows runner with the MSVC ARM64 toolset. The windows-11-arm
|
# Native ARM64 Windows runner with the MSVC ARM64 toolset. The windows-11-arm
|
||||||
# label is only available for public repositories.
|
# label is only available for public repositories.
|
||||||
msvc-arm64:
|
msvc-arm64:
|
||||||
|
if: *pr_set
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build_type: [Debug, Release]
|
build_type: [Debug]
|
||||||
|
|
||||||
runs-on: windows-11-arm
|
runs-on: windows-11-arm
|
||||||
|
|
||||||
steps:
|
steps: &msvc_arm64_steps
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
@@ -160,12 +197,13 @@ jobs:
|
|||||||
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
|
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
|
||||||
|
|
||||||
clang:
|
clang:
|
||||||
|
if: *pr_set
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
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]
|
version: [20.1.8]
|
||||||
|
|
||||||
steps:
|
steps: &clang_steps
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
@@ -208,24 +246,8 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
run: cd build ; ctest -j 10 -C Debug --output-on-failure
|
run: cd build ; ctest -j 10 -C Debug --output-on-failure
|
||||||
|
|
||||||
clang-cl:
|
|
||||||
runs-on: windows-2022
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
architecture: [Win32, x64]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- 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 --output-on-failure
|
|
||||||
|
|
||||||
ci_module_cpp20:
|
ci_module_cpp20:
|
||||||
|
if: *pr_set
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
@@ -245,3 +267,144 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --config Debug --target ci_module_cpp20
|
run: cmake --build build --config Debug --target ci_module_cpp20
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# full set: starts after the PR set passed
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
msvc_full:
|
||||||
|
needs: &pr_set_jobs [mingw, msvc, msvc-vs2026, msvc-arm64, clang, ci_module_cpp20]
|
||||||
|
if: &full_set ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, '🚀 ready to merge') }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
build_type: [Debug, Release]
|
||||||
|
architecture: [Win32, x64]
|
||||||
|
std_version: [default, latest]
|
||||||
|
exclude:
|
||||||
|
# in the PR set
|
||||||
|
- build_type: Debug
|
||||||
|
architecture: x64
|
||||||
|
std_version: default
|
||||||
|
- build_type: Release
|
||||||
|
architecture: x64
|
||||||
|
std_version: default
|
||||||
|
- build_type: Debug
|
||||||
|
architecture: Win32
|
||||||
|
std_version: default
|
||||||
|
- build_type: Release
|
||||||
|
architecture: Win32
|
||||||
|
std_version: latest
|
||||||
|
|
||||||
|
runs-on: windows-2022
|
||||||
|
|
||||||
|
steps: *msvc_steps
|
||||||
|
|
||||||
|
# Visual Studio 2026 (v145 toolset) on the windows-2025 image. The "Visual Studio
|
||||||
|
# 18 2026" generator requires CMake 4.2+, so a recent CMake is fetched explicitly.
|
||||||
|
msvc-vs2026_full:
|
||||||
|
needs: *pr_set_jobs
|
||||||
|
if: *full_set
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
build_type: [Debug, Release]
|
||||||
|
architecture: [Win32, x64]
|
||||||
|
std_version: [default, latest]
|
||||||
|
exclude:
|
||||||
|
# in the PR set
|
||||||
|
- build_type: Debug
|
||||||
|
architecture: x64
|
||||||
|
std_version: latest
|
||||||
|
- build_type: Release
|
||||||
|
architecture: Win32
|
||||||
|
std_version: default
|
||||||
|
|
||||||
|
runs-on: windows-2025
|
||||||
|
|
||||||
|
steps: *msvc_vs2026_steps
|
||||||
|
|
||||||
|
# Native ARM64 Windows runner with the MSVC ARM64 toolset. The windows-11-arm
|
||||||
|
# label is only available for public repositories.
|
||||||
|
msvc-arm64_full:
|
||||||
|
needs: *pr_set_jobs
|
||||||
|
if: *full_set
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
build_type: [Release]
|
||||||
|
|
||||||
|
runs-on: windows-11-arm
|
||||||
|
|
||||||
|
steps: *msvc_arm64_steps
|
||||||
|
|
||||||
|
clang_full:
|
||||||
|
needs: *pr_set_jobs
|
||||||
|
if: *full_set
|
||||||
|
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]
|
||||||
|
|
||||||
|
steps: *clang_steps
|
||||||
|
|
||||||
|
clang-cl_full:
|
||||||
|
needs: *pr_set_jobs
|
||||||
|
if: *full_set
|
||||||
|
runs-on: windows-2022
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
architecture: [Win32, x64]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- 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 --output-on-failure
|
||||||
|
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# nightly set
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
mingw_nightly:
|
||||||
|
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref != 'refs/heads/develop') }}
|
||||||
|
runs-on: windows-2022
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
architecture: [x64]
|
||||||
|
|
||||||
|
steps: *mingw_steps
|
||||||
|
|
||||||
|
# A failure of a scheduled run opens an issue, or comments on the open one.
|
||||||
|
nightly_report:
|
||||||
|
needs: [mingw_nightly]
|
||||||
|
if: ${{ always() && github.event_name == 'schedule' && contains(needs.*.result, 'failure') }}
|
||||||
|
runs-on: ubuntu-26.04
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
steps:
|
||||||
|
- name: Harden Runner
|
||||||
|
uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1
|
||||||
|
with:
|
||||||
|
egress-policy: audit
|
||||||
|
|
||||||
|
- name: Open or update the nightly failure issue
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
|
WORKFLOW: ${{ github.workflow }}
|
||||||
|
SHA: ${{ github.sha }}
|
||||||
|
run: |
|
||||||
|
title="Nightly CI failure (${WORKFLOW})"
|
||||||
|
body="The nightly run of ${WORKFLOW} on ${SHA:0:10} failed: ${RUN_URL}"
|
||||||
|
number=$(gh issue list --state open --search "in:title \"${title}\"" --json number,title --jq "map(select(.title == \"${title}\")) | .[0].number // empty")
|
||||||
|
if [ -n "$number" ]; then
|
||||||
|
gh issue comment "$number" --body "$body"
|
||||||
|
else
|
||||||
|
gh issue create --title "$title" --body "$body"
|
||||||
|
fi
|
||||||
@@ -15,17 +15,17 @@ describe each of them.
|
|||||||
|
|
||||||
## How CI runs
|
## How CI runs
|
||||||
|
|
||||||
Not every job runs for every change. The compiler jobs on Ubuntu are split into three sets, so a pull request gets fast
|
Not every job runs for every change. The compiler jobs on Ubuntu, macOS, and Windows are split into three sets, so a
|
||||||
feedback and the long jobs run when they matter:
|
pull request gets fast feedback and the long jobs run when they matter:
|
||||||
|
|
||||||
| Set | When it runs | What it contains |
|
| Set | When it runs | What it contains |
|
||||||
|-------------|-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|-------------|-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| PR set | every push to a pull request, and every push to `develop`, `master`, and `release/*` | GCC and Clang with all warnings, Clang-Tidy, sanitizers, IWYU, cpplint, the oldest and newest GCC and Clang, common CMake options, Meson, Emscripten; with the checks that always run, they would have caught at least 92 % of the failing commits of September and October 2026 |
|
| PR set | every push to a pull request, and every push to `develop`, `master`, and `release/*` | GCC and Clang with all warnings, Clang-Tidy, sanitizers, IWYU, cpplint, the oldest and newest GCC and Clang, common CMake options, Meson, Emscripten, four Visual Studio 2022 and two Visual Studio 2026 configurations, MinGW, Clang on Windows, ARM64 Windows, five Xcode versions, Swift Package Manager; with the checks that always run, they would have caught at least 92 % of the failing commits of September and October 2026 |
|
||||||
| full set | after the PR set passed: on pull requests with the label :rocket: ready to merge, and on every push | every other compiler, version, C++ standard, and CMake option, the Clang Static Analyzer, Cppcheck, and the C++20 module tests |
|
| full set | after the PR set passed: on pull requests with the label :rocket: ready to merge, and on every push | every other compiler, version, C++ standard, and CMake option, the Clang Static Analyzer, Cppcheck, and the C++20 module tests |
|
||||||
| nightly set | every night on `develop`, on every push to `master` and `release/*`, and when started by hand | Infer, Valgrind, coverage, the Intel and NVIDIA compilers, CUDA, and ARM64; a failure opens an issue |
|
| nightly set | every night on `develop`, on every push to `master` and `release/*`, and when started by hand | Infer, Valgrind, coverage, the Intel and NVIDIA compilers, CUDA, ARM64 Linux, and 64-bit MinGW; a failure opens an issue |
|
||||||
|
|
||||||
The jobs on macOS and Windows, the documentation and license checks, and the amalgamation check run on every push and
|
The documentation and license checks and the amalgamation check run on every push and pull request; AppVeyor (Visual
|
||||||
pull request. A pull request that changes only the documentation, Markdown files, GitHub metadata, or license files
|
Studio 2015, 2017, and 2019) has its own schedule. A pull request that changes only the documentation, Markdown files, GitHub metadata, or license files
|
||||||
skips the compiler workflows (see [`tools/check_path_filters`](https://github.com/nlohmann/json/tree/develop/tools/check_path_filters)).
|
skips the compiler workflows (see [`tools/check_path_filters`](https://github.com/nlohmann/json/tree/develop/tools/check_path_filters)).
|
||||||
|
|
||||||
A maintainer adds the label :rocket: ready to merge when a pull request is ready; the full set then runs, and again on
|
A maintainer adds the label :rocket: ready to merge when a pull request is ready; the full set then runs, and again on
|
||||||
@@ -39,6 +39,10 @@ every later push to that pull request. A pull request is merged only when the fu
|
|||||||
<!-- ci_jobs: begin -->
|
<!-- ci_jobs: begin -->
|
||||||
| Set | Workflow | Job | Configurations |
|
| Set | Workflow | Job | Configurations |
|
||||||
|-----|----------|-----|----------------|
|
|-----|----------|-----|----------------|
|
||||||
|
| PR set | macos.yml | `macos-15` | 16.0; 16.4; 26.3 |
|
||||||
|
| PR set | macos.yml | `macos-26` | 26.6 |
|
||||||
|
| PR set | macos.yml | `xcode_standards` | 14 |
|
||||||
|
| PR set | macos.yml | `swiftpm` | - |
|
||||||
| PR set | ubuntu.yml | `ci_test_gcc` | - |
|
| PR set | ubuntu.yml | `ci_test_gcc` | - |
|
||||||
| PR set | ubuntu.yml | `ci_meson_install` | - |
|
| PR set | ubuntu.yml | `ci_meson_install` | - |
|
||||||
| PR set | ubuntu.yml | `ci_static_analysis_ubuntu` | ci_cpplint |
|
| PR set | ubuntu.yml | `ci_static_analysis_ubuntu` | ci_cpplint |
|
||||||
@@ -49,6 +53,15 @@ every later push to that pull request. A pull request is merged only when the fu
|
|||||||
| PR set | ubuntu.yml | `ci_test_standards_gcc` | 26 |
|
| PR set | ubuntu.yml | `ci_test_standards_gcc` | 26 |
|
||||||
| PR set | ubuntu.yml | `ci_test_standards_clang` | 26, libcxx |
|
| PR set | ubuntu.yml | `ci_test_standards_clang` | 26, libcxx |
|
||||||
| PR set | ubuntu.yml | `ci_emscripten` | - |
|
| PR set | ubuntu.yml | `ci_emscripten` | - |
|
||||||
|
| PR set | windows.yml | `mingw` | x86 |
|
||||||
|
| PR set | windows.yml | `msvc` | Debug, x64, default; Release, x64, default; Debug, Win32, default; Release, Win32, latest |
|
||||||
|
| PR set | windows.yml | `msvc-vs2026` | Debug, x64, latest; Release, Win32, default |
|
||||||
|
| PR set | windows.yml | `msvc-arm64` | Debug |
|
||||||
|
| PR set | windows.yml | `clang` | 20.1.8 |
|
||||||
|
| PR set | windows.yml | `ci_module_cpp20` | - |
|
||||||
|
| full set | macos.yml | `macos-15_full` | 16.1; 16.2; 16.3; 26.0.1; 26.1.1; 26.2 |
|
||||||
|
| full set | macos.yml | `macos-26_full` | 26.4.1; 26.5 |
|
||||||
|
| full set | macos.yml | `xcode_standards_full` | 11; 17; 20; 23; 26 |
|
||||||
| full set | ubuntu.yml | `ci_static_analysis_ubuntu_full` | ci_test_single_header; ci_cppcheck; ci_reproducible_tests; ci_non_git_tests; ci_offline_testdata |
|
| full set | ubuntu.yml | `ci_static_analysis_ubuntu_full` | ci_test_single_header; ci_cppcheck; ci_reproducible_tests; ci_non_git_tests; ci_offline_testdata |
|
||||||
| full set | ubuntu.yml | `ci_static_analysis_clang_full` | ci_clang_analyze |
|
| full set | ubuntu.yml | `ci_static_analysis_clang_full` | ci_clang_analyze |
|
||||||
| full set | ubuntu.yml | `ci_cmake_options_full` | ci_cmake_flags; ci_test_noimplicitconversions; ci_test_legacycomparison; ci_test_disableenumserialization; ci_test_disabletuplereferenceconversion; ci_test_skiplibraryversioncheck; ci_test_simdutf; ci_test_strict_nul_handling; ci_test_delete_deprecated_functions; ci_test_no_thread_local |
|
| full set | ubuntu.yml | `ci_cmake_options_full` | ci_cmake_flags; ci_test_noimplicitconversions; ci_test_legacycomparison; ci_test_disableenumserialization; ci_test_disabletuplereferenceconversion; ci_test_skiplibraryversioncheck; ci_test_simdutf; ci_test_strict_nul_handling; ci_test_delete_deprecated_functions; ci_test_no_thread_local |
|
||||||
@@ -58,6 +71,11 @@ every later push to that pull request. A pull request is merged only when the fu
|
|||||||
| full set | ubuntu.yml | `ci_test_standards_gcc_full` | 11; 14; 17; 20; 23 |
|
| full set | ubuntu.yml | `ci_test_standards_gcc_full` | 11; 14; 17; 20; 23 |
|
||||||
| full set | ubuntu.yml | `ci_test_standards_clang_full` | 11, libcxx; 11, libstdcxx; 14, libcxx; 14, libstdcxx; 17, libcxx; 17, libstdcxx; 20, libcxx; 20, libstdcxx; 23, libcxx; 23, libstdcxx; 26, libstdcxx |
|
| full set | ubuntu.yml | `ci_test_standards_clang_full` | 11, libcxx; 11, libstdcxx; 14, libcxx; 14, libstdcxx; 17, libcxx; 17, libstdcxx; 20, libcxx; 20, libstdcxx; 23, libcxx; 23, libstdcxx; 26, libstdcxx |
|
||||||
| full set | ubuntu.yml | `ci_module_cpp20` | gcc:latest; silkeh/clang:latest |
|
| full set | ubuntu.yml | `ci_module_cpp20` | gcc:latest; silkeh/clang:latest |
|
||||||
|
| full set | windows.yml | `msvc_full` | Debug, Win32, latest; Debug, x64, latest; Release, Win32, default; Release, x64, latest |
|
||||||
|
| full set | windows.yml | `msvc-vs2026_full` | Debug, Win32, default; Debug, Win32, latest; Debug, x64, default; Release, Win32, latest; Release, x64, default; Release, x64, latest |
|
||||||
|
| full set | windows.yml | `msvc-arm64_full` | Release |
|
||||||
|
| full set | windows.yml | `clang_full` | 11.0.1; 12.0.1; 13.0.1; 14.0.6; 15.0.7; 16.0.6; 18.1.8; 19.1.7 |
|
||||||
|
| full set | windows.yml | `clang-cl_full` | Win32; x64 |
|
||||||
| nightly set | ubuntu.yml | `ci_infer` | - |
|
| nightly set | ubuntu.yml | `ci_infer` | - |
|
||||||
| nightly set | ubuntu.yml | `ci_static_analysis_ubuntu_nightly` | ci_test_valgrind |
|
| nightly set | ubuntu.yml | `ci_static_analysis_ubuntu_nightly` | ci_test_valgrind |
|
||||||
| nightly set | ubuntu.yml | `ci_test_coverage` | - |
|
| nightly set | ubuntu.yml | `ci_test_coverage` | - |
|
||||||
@@ -66,17 +84,7 @@ every later push to that pull request. A pull request is merged only when the fu
|
|||||||
| nightly set | ubuntu.yml | `ci_icpx` | - |
|
| nightly set | ubuntu.yml | `ci_icpx` | - |
|
||||||
| nightly set | ubuntu.yml | `ci_nvhpc` | - |
|
| nightly set | ubuntu.yml | `ci_nvhpc` | - |
|
||||||
| nightly set | ubuntu.yml | `ci_test_arm64` | - |
|
| nightly set | ubuntu.yml | `ci_test_arm64` | - |
|
||||||
| every push and PR | macos.yml | `macos-15` | 16.0; 16.1; 16.2; 16.3; 16.4; 26.0.1; 26.1.1; 26.2; 26.3 |
|
| nightly set | windows.yml | `mingw_nightly` | x64 |
|
||||||
| every push and PR | macos.yml | `macos-26` | 26.4.1; 26.5; 26.6 |
|
|
||||||
| every push and PR | macos.yml | `xcode_standards` | 11; 14; 17; 20; 23; 26 |
|
|
||||||
| every push and PR | macos.yml | `swiftpm` | - |
|
|
||||||
| every push and PR | windows.yml | `mingw` | x64; x86 |
|
|
||||||
| every push and PR | windows.yml | `msvc` | Debug, Win32, default; Debug, Win32, latest; Debug, x64, default; Debug, x64, latest; Release, Win32, default; Release, Win32, latest; Release, x64, default; Release, x64, latest |
|
|
||||||
| every push and PR | windows.yml | `msvc-vs2026` | Debug, Win32, default; Debug, Win32, latest; Debug, x64, default; Debug, x64, latest; Release, Win32, default; Release, Win32, latest; Release, x64, default; Release, x64, latest |
|
|
||||||
| every push and PR | windows.yml | `msvc-arm64` | Debug; Release |
|
|
||||||
| every push and PR | windows.yml | `clang` | 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 |
|
|
||||||
| every push and PR | windows.yml | `clang-cl` | Win32; x64 |
|
|
||||||
| every push and PR | windows.yml | `ci_module_cpp20` | - |
|
|
||||||
<!-- ci_jobs: end -->
|
<!-- ci_jobs: end -->
|
||||||
|
|
||||||
## C++ language compliance and compiler compatibility
|
## C++ language compliance and compiler compatibility
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
# ci_jobs
|
# ci_jobs
|
||||||
|
|
||||||
The compiler jobs of [`ubuntu.yml`](../../.github/workflows/ubuntu.yml) are split into three sets, chosen by each job's
|
The jobs of the compiler workflows [`ubuntu.yml`](../../.github/workflows/ubuntu.yml),
|
||||||
|
[`macos.yml`](../../.github/workflows/macos.yml), and [`windows.yml`](../../.github/workflows/windows.yml) are split into
|
||||||
|
three sets, chosen by each job's
|
||||||
`if:` condition (see [How CI runs](https://json.nlohmann.me/community/quality_assurance/#how-ci-runs)):
|
`if:` condition (see [How CI runs](https://json.nlohmann.me/community/quality_assurance/#how-ci-runs)):
|
||||||
|
|
||||||
- **PR set**: every push to a pull request, and every push to `develop`, `master`, and `release/*`;
|
- **PR set**: every push to a pull request, and every push to `develop`, `master`, and `release/*`;
|
||||||
@@ -12,8 +14,9 @@ A matrix whose entries belong to different sets is split into one job per set: t
|
|||||||
|
|
||||||
[`ci_jobs.py`](ci_jobs.py) checks that
|
[`ci_jobs.py`](ci_jobs.py) checks that
|
||||||
|
|
||||||
- every job of `ubuntu.yml` has the `if:` condition of exactly one set (the conditions are in `SETS`),
|
- every job has the `if:` condition of exactly one set (the conditions are in `SETS`),
|
||||||
- every full-set job waits for (`needs:`) exactly the PR set, and `nightly_report` for exactly the nightly set, and
|
- every full-set job waits for (`needs:`) exactly the PR set of its workflow, and `nightly_report` for exactly the
|
||||||
|
nightly set, and
|
||||||
- the job table in [`quality_assurance.md`](../../docs/mkdocs/docs/community/quality_assurance.md) is up to date.
|
- the job table in [`quality_assurance.md`](../../docs/mkdocs/docs/community/quality_assurance.md) is up to date.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""List and check the jobs of the compiler workflows and the set each job belongs to.
|
"""List and check the jobs of the compiler workflows and the set each job belongs to.
|
||||||
|
|
||||||
The jobs of a tiered workflow (ubuntu.yml) belong to one of three sets, chosen
|
The jobs of the compiler workflows belong to one of three sets, chosen by the
|
||||||
by the job's `if:` condition:
|
job's `if:` condition:
|
||||||
|
|
||||||
- PR set: every pull request push and every push,
|
- PR set: every pull request push and every push,
|
||||||
- full set: after the PR set passed, on pushes and on pull requests with the
|
- full set: after the PR set passed, on pushes and on pull requests with the
|
||||||
@@ -10,11 +10,9 @@ by the job's `if:` condition:
|
|||||||
- nightly set: nightly on develop, on pushes to master and release/*, and when
|
- nightly set: nightly on develop, on pushes to master and release/*, and when
|
||||||
started by hand.
|
started by hand.
|
||||||
|
|
||||||
The jobs of the other workflows run on every push and pull request.
|
The script checks that every job belongs to exactly one set, that the full set
|
||||||
|
of a workflow waits for its whole PR set, that the nightly report waits for the
|
||||||
The script checks that every job of a tiered workflow belongs to exactly one
|
whole nightly set, and that the job table in
|
||||||
set, that the full set waits for the whole PR set, that the nightly report
|
|
||||||
waits for the whole nightly set, and that the job table in
|
|
||||||
docs/mkdocs/docs/community/quality_assurance.md is up to date.
|
docs/mkdocs/docs/community/quality_assurance.md is up to date.
|
||||||
|
|
||||||
--markdown print the job table for the documentation
|
--markdown print the job table for the documentation
|
||||||
@@ -37,7 +35,7 @@ DOCS = 'docs/mkdocs/docs/community/quality_assurance.md'
|
|||||||
BEGIN, END = '<!-- ci_jobs: begin -->', '<!-- ci_jobs: end -->'
|
BEGIN, END = '<!-- ci_jobs: begin -->', '<!-- ci_jobs: end -->'
|
||||||
|
|
||||||
WORKFLOWS = ['.github/workflows/ubuntu.yml', '.github/workflows/macos.yml', '.github/workflows/windows.yml']
|
WORKFLOWS = ['.github/workflows/ubuntu.yml', '.github/workflows/macos.yml', '.github/workflows/windows.yml']
|
||||||
TIERED = ['.github/workflows/ubuntu.yml']
|
TIERED = WORKFLOWS
|
||||||
# --compare also counts the jobs of these workflows, so a job moved between workflows is not a removed one
|
# --compare also counts the jobs of these workflows, so a job moved between workflows is not a removed one
|
||||||
COMPARED = WORKFLOWS + ['.github/workflows/repository_checks.yml', '.github/workflows/check_amalgamation.yml']
|
COMPARED = WORKFLOWS + ['.github/workflows/repository_checks.yml', '.github/workflows/check_amalgamation.yml']
|
||||||
|
|
||||||
@@ -80,7 +78,10 @@ def expand(matrix):
|
|||||||
if not matrix:
|
if not matrix:
|
||||||
return [{}]
|
return [{}]
|
||||||
keys = [k for k in matrix if k not in ('include', 'exclude')]
|
keys = [k for k in matrix if k not in ('include', 'exclude')]
|
||||||
combos = [dict(zip(keys, values)) for values in itertools.product(*(matrix[k] for k in keys))] if keys else []
|
if not keys:
|
||||||
|
# a matrix of only include entries runs each entry
|
||||||
|
return [dict(inc) for inc in matrix.get('include') or []]
|
||||||
|
combos = [dict(zip(keys, values)) for values in itertools.product(*(matrix[k] for k in keys))]
|
||||||
for ex in matrix.get('exclude') or []:
|
for ex in matrix.get('exclude') or []:
|
||||||
combos = [c for c in combos if any(c.get(k) != v for k, v in ex.items())]
|
combos = [c for c in combos if any(c.get(k) != v for k, v in ex.items())]
|
||||||
for inc in matrix.get('include') or []:
|
for inc in matrix.get('include') or []:
|
||||||
|
|||||||
Reference in new issue
Block a user