Another desperate try to fix the CI (#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
This commit is contained in:
Niels Lohmann
2024-11-13 10:21:26 +01:00
committed by GitHub
parent 4a602df34e
commit 1825117e63
37 changed files with 362 additions and 231 deletions

View File

@@ -14,7 +14,7 @@ jobs:
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/number
echo ${{ github.event.pull_request.user.login }} > ./pr/author
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: pr
path: pr/
@@ -33,13 +33,13 @@ jobs:
steps:
- name: Checkout pull request
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: main
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout tools
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: tools
ref: develop

View File

@@ -23,7 +23,7 @@ jobs:
dry-run: false
language: c++
- name: Upload Crash
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts

View File

@@ -27,11 +27,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: c-cpp

View File

@@ -17,25 +17,26 @@ concurrency:
cancel-in-progress: true
jobs:
xcode_1:
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
# 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@v4
# - 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
steps:
- uses: actions/checkout@v3
- 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_2:
runs-on: macos-12
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']
@@ -43,7 +44,58 @@ jobs:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- 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:
runs-on: macos-13 # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
strategy:
matrix:
xcode: [ '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@v4
- 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.3', '15.4']
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
steps:
- uses: actions/checkout@v4
- 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']
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
steps:
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
- name: Build
@@ -58,7 +110,7 @@ jobs:
standard: [11, 14, 17, 20, 23]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_TestStandards=${{ matrix.standard }}
- name: Build

View File

@@ -23,7 +23,7 @@ jobs:
if: github.repository == 'nlohmann/json'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install and update PlantUML
run: sudo apt-get update ; sudo apt-get install -y plantuml
@@ -35,7 +35,7 @@ jobs:
run: make build -C docs/mkdocs
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/mkdocs/site

View File

@@ -23,7 +23,7 @@ jobs:
steps:
- name: Install git and unzip
run: apt-get update ; apt-get install -y git unzip
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get latest CMake and ninja
uses: lukka/get-cmake@v3.27.7
- name: Run CMake
@@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v2.4.0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -48,7 +48,7 @@ jobs:
matrix:
target: [ci_cppcheck, ci_test_valgrind, ci_test_amalgamation, ci_test_single_header, ci_single_binaries, ci_infer]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -60,7 +60,7 @@ jobs:
matrix:
target: [ci_cpplint, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get latest CMake and ninja
uses: lukka/get-cmake@v3.27.7
- name: Run CMake
@@ -77,7 +77,7 @@ jobs:
steps:
- name: Install git, clang-tools, and unzip
run: apt-get update ; apt-get install -y git clang-tools unzip
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get latest CMake and ninja
uses: lukka/get-cmake@v3.27.7
- name: Run CMake
@@ -94,7 +94,7 @@ jobs:
steps:
- name: Install build-essential
run: apt-get update ; apt-get install -y build-essential unzip wget git
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get latest CMake and ninja
uses: lukka/get-cmake@v3.27.7
- name: Run CMake
@@ -109,7 +109,7 @@ jobs:
contents: read
checks: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -125,14 +125,28 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ github.workspace }}/build/json.info.filtered.noexcept
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@v4
- 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:
compiler: ['4', '5', '6', '7', '8', '9', '10', '11', '12', 'latest']
# older GCC docker images (4, 5, 6) fail to check out code
compiler: ['7', '8', '9', '10', '11', '12', '13', '14', 'latest']
container: gcc:${{ matrix.compiler }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get latest CMake and ninja
uses: lukka/get-cmake@v3.27.7
- name: Run CMake
@@ -144,12 +158,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
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']
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']
container: silkeh/clang:${{ matrix.compiler }}
steps:
- name: Install unzip and git
run: apt-get update ; apt-get install -y unzip git
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get latest CMake and ninja
uses: lukka/get-cmake@v3.27.7
- name: Set env FORCE_STDCPPFS_FLAG for clang 7 / 8 / 9 / 10
@@ -167,7 +181,7 @@ jobs:
matrix:
compiler: [g++-4.8]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -180,7 +194,7 @@ jobs:
matrix:
standard: [11, 14, 17, 20, 23]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -195,7 +209,7 @@ jobs:
steps:
- name: Install git and unzip
run: apt-get update ; apt-get install -y git unzip
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get latest CMake and ninja
uses: lukka/get-cmake@v3.27.7
- name: Run CMake
@@ -207,7 +221,7 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v2.4.0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -228,7 +242,7 @@ jobs:
ci_reuse_compliance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
- name: Install REUSE tool
run: python -m pip install reuse
@@ -241,7 +255,7 @@ jobs:
matrix:
target: [ci_test_examples, ci_test_api_documentation]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build

View File

@@ -24,7 +24,7 @@ jobs:
architecture: [x64, x86]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up MinGW
uses: egor-tensin/setup-mingw@v2
with:
@@ -45,7 +45,7 @@ jobs:
architecture: [Win32, x64]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX"
if: matrix.build_type == 'Release'
@@ -61,7 +61,7 @@ jobs:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -G "Visual Studio 16 2019" -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX"
- name: Build
@@ -77,7 +77,7 @@ jobs:
architecture: [Win32, x64]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX"
if: matrix.build_type == 'Release'
@@ -93,7 +93,7 @@ jobs:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -G "Visual Studio 17 2022" -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX"
- name: Build
@@ -108,7 +108,7 @@ jobs:
version: [11, 12, 13, 14, 15]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Clang
run: curl -fsSL -o LLVM${{ matrix.version }}.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ matrix.version }}.0.0/LLVM-${{ matrix.version }}.0.0-win64.exe ; 7z x LLVM${{ matrix.version }}.exe -y -o"C:/Program Files/LLVM"
- name: Run CMake
@@ -125,7 +125,7 @@ jobs:
architecture: [Win32, x64]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run CMake
run: cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -T ClangCL -DJSON_BuildTests=On
- name: Build