2020-05-13 02:26:17 +08:00
|
|
|
name: Ubuntu
|
2019-09-03 03:35:53 +08:00
|
|
|
|
2021-03-28 20:59:42 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- develop
|
|
|
|
- master
|
2021-08-16 04:49:31 +08:00
|
|
|
- release/*
|
2021-03-28 20:59:42 +08:00
|
|
|
pull_request:
|
2022-03-06 20:54:00 +08:00
|
|
|
workflow_dispatch:
|
2019-09-03 03:35:53 +08:00
|
|
|
|
2022-07-29 03:51:32 +08:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2019-09-03 03:35:53 +08:00
|
|
|
jobs:
|
2021-03-24 14:15:18 +08:00
|
|
|
ci_test_clang:
|
|
|
|
runs-on: ubuntu-latest
|
2022-08-27 23:28:50 +08:00
|
|
|
container: silkeh/clang:dev
|
2020-12-30 03:21:43 +08:00
|
|
|
steps:
|
2022-08-27 23:28:50 +08:00
|
|
|
- name: Install git
|
|
|
|
run: apt-get update ; apt-get install -y git
|
2022-04-06 21:14:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-27 23:28:50 +08:00
|
|
|
- name: Get latest CMake and ninja
|
|
|
|
uses: lukka/get-cmake@latest
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run CMake
|
2021-03-24 14:15:18 +08:00
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Build
|
2021-03-24 14:15:18 +08:00
|
|
|
run: cmake --build build --target ci_test_clang
|
2020-12-30 03:30:50 +08:00
|
|
|
|
2021-03-24 14:15:18 +08:00
|
|
|
ci_test_gcc:
|
2020-12-30 03:30:50 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-06-12 20:31:07 +08:00
|
|
|
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
2021-03-24 14:15:18 +08:00
|
|
|
steps:
|
2022-04-06 21:14:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run CMake
|
2021-03-24 14:15:18 +08:00
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Build
|
2021-03-24 14:15:18 +08:00
|
|
|
run: cmake --build build --target ci_test_gcc
|
2020-12-30 03:30:50 +08:00
|
|
|
|
2021-03-27 21:44:39 +08:00
|
|
|
ci_static_analysis:
|
2021-03-24 14:15:18 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-06-12 20:31:07 +08:00
|
|
|
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
2021-03-27 21:44:39 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-08-27 23:28:50 +08:00
|
|
|
target: [ci_cppcheck, ci_test_valgrind, ci_test_amalgamation, ci_test_single_header, ci_single_binaries, ci_infer]
|
2021-03-24 14:15:18 +08:00
|
|
|
steps:
|
2022-04-06 21:14:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run CMake
|
2021-03-24 14:15:18 +08:00
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Build
|
2021-03-27 21:44:39 +08:00
|
|
|
run: cmake --build build --target ${{ matrix.target }}
|
2021-03-24 14:15:18 +08:00
|
|
|
|
2022-08-27 23:28:50 +08:00
|
|
|
ci_static_analysis_ubuntu:
|
2022-06-14 14:54:12 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-08-27 23:28:50 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: [ci_cpplint, ci_cmake_flags, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata]
|
2022-06-14 14:54:12 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2022-08-27 23:28:50 +08:00
|
|
|
- name: Get latest CMake and ninja
|
|
|
|
uses: lukka/get-cmake@latest
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run CMake
|
2022-06-14 14:54:12 +08:00
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Build
|
2022-08-27 23:28:50 +08:00
|
|
|
run: cmake --build build --target ${{ matrix.target }}
|
|
|
|
|
|
|
|
ci_static_analysis_clang:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: silkeh/clang:dev
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: [ci_clang_tidy, ci_test_clang_sanitizer, ci_clang_analyze]
|
|
|
|
steps:
|
|
|
|
- name: Install git
|
|
|
|
run: apt-get update ; apt-get install -y git
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Get latest CMake and ninja
|
|
|
|
uses: lukka/get-cmake@latest
|
|
|
|
- name: Run CMake
|
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
|
|
|
- name: Build
|
|
|
|
run: cmake --build build --target ${{ matrix.target }}
|
2022-06-14 14:54:12 +08:00
|
|
|
|
2021-03-27 21:44:39 +08:00
|
|
|
ci_cmake_options:
|
2021-03-24 14:15:18 +08:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-27 21:44:39 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-08-02 04:42:35 +08:00
|
|
|
target: [ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls]
|
2021-03-24 14:15:18 +08:00
|
|
|
steps:
|
2022-04-06 21:14:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-27 23:28:50 +08:00
|
|
|
- name: Get latest CMake and ninja
|
|
|
|
uses: lukka/get-cmake@latest
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run CMake
|
2021-03-24 14:15:18 +08:00
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Build
|
2021-03-27 21:44:39 +08:00
|
|
|
run: cmake --build build --target ${{ matrix.target }}
|
2021-03-24 14:15:18 +08:00
|
|
|
|
|
|
|
ci_test_coverage:
|
|
|
|
runs-on: ubuntu-latest
|
2022-06-12 20:31:07 +08:00
|
|
|
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
2021-03-24 14:15:18 +08:00
|
|
|
steps:
|
2022-04-06 21:14:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run CMake
|
2021-03-24 14:15:18 +08:00
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Build
|
2021-03-24 14:15:18 +08:00
|
|
|
run: cmake --build build --target ci_test_coverage
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Archive coverage report
|
2022-04-06 21:14:14 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-03-24 14:15:18 +08:00
|
|
|
with:
|
|
|
|
name: code-coverage-report
|
2022-08-03 15:15:16 +08:00
|
|
|
path: ${{ github.workspace }}/build/html
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Publish report to Coveralls
|
2021-03-24 14:15:18 +08:00
|
|
|
uses: coverallsapp/github-action@master
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-08-03 15:15:16 +08:00
|
|
|
path-to-lcov: ${{ github.workspace }}/build/json.info.filtered.noexcept
|
2021-03-27 21:44:39 +08:00
|
|
|
|
2022-08-27 23:28:50 +08:00
|
|
|
ci_test_compilers_gcc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
compiler: ['4', '5', '6', '7', '8', '9', '10', '11', '12', 'latest']
|
|
|
|
container: gcc:${{ matrix.compiler }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Get latest CMake and ninja
|
|
|
|
uses: lukka/get-cmake@latest
|
|
|
|
- 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.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', 'latest']
|
|
|
|
container: silkeh/clang:${{ matrix.compiler }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Get latest CMake and ninja
|
|
|
|
uses: lukka/get-cmake@latest
|
|
|
|
- name: Run CMake
|
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
|
|
|
- name: Build
|
|
|
|
run: cmake --build build --target ci_test_compiler_default
|
|
|
|
|
2021-03-27 21:44:39 +08:00
|
|
|
ci_test_compilers:
|
|
|
|
runs-on: ubuntu-latest
|
2022-06-12 20:31:07 +08:00
|
|
|
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
2021-03-27 21:44:39 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-08-27 23:28:50 +08:00
|
|
|
compiler: [g++-4.8]
|
2021-03-27 21:44:39 +08:00
|
|
|
steps:
|
2022-04-06 21:14:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run CMake
|
2021-03-27 21:44:39 +08:00
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Build
|
2021-03-28 20:48:58 +08:00
|
|
|
run: cmake --build build --target ci_test_compiler_${{ matrix.compiler }}
|
|
|
|
|
|
|
|
ci_test_standards:
|
|
|
|
runs-on: ubuntu-latest
|
2022-06-12 20:31:07 +08:00
|
|
|
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
2021-03-28 20:48:58 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
standard: [11, 14, 17, 20]
|
|
|
|
compiler: [gcc, clang]
|
|
|
|
steps:
|
2022-04-06 21:14:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run CMake
|
2021-03-28 20:48:58 +08:00
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Build
|
2021-03-28 21:30:37 +08:00
|
|
|
run: cmake --build build --target ci_test_${{ matrix.compiler }}_cxx${{ matrix.standard }}
|
2021-12-30 20:40:15 +08:00
|
|
|
|
|
|
|
ci_cuda_example:
|
|
|
|
runs-on: ubuntu-latest
|
2022-06-12 20:31:07 +08:00
|
|
|
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
2021-12-30 20:40:15 +08:00
|
|
|
steps:
|
2022-04-06 21:14:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run CMake
|
2021-12-30 20:40:15 +08:00
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Build
|
2021-12-30 20:40:15 +08:00
|
|
|
run: cmake --build build --target ci_cuda_example
|
2022-05-02 04:46:45 +08:00
|
|
|
|
|
|
|
ci_icpc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: ghcr.io/nlohmann/json-ci:v2.2.0
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run CMake
|
2022-05-02 04:46:45 +08:00
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Build
|
2022-05-02 04:46:45 +08:00
|
|
|
run: |
|
|
|
|
. /opt/intel/oneapi/setvars.sh
|
|
|
|
cmake --build build --target ci_icpc
|
2022-08-05 15:12:28 +08:00
|
|
|
|
2022-07-20 18:38:07 +08:00
|
|
|
ci_reuse_compliance:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-python@v3
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Install REUSE tool
|
2022-07-20 18:38:07 +08:00
|
|
|
run: python -m pip install reuse
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run REUSE lint
|
2022-07-20 18:38:07 +08:00
|
|
|
run: reuse lint
|
2022-07-29 20:28:37 +08:00
|
|
|
|
|
|
|
ci_test_documentation:
|
|
|
|
runs-on: ubuntu-latest
|
2022-08-06 01:51:39 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: [ci_test_examples, ci_test_api_documentation]
|
2022-07-29 20:28:37 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Run CMake
|
2022-07-29 20:28:37 +08:00
|
|
|
run: cmake -S . -B build -DJSON_CI=On
|
2022-08-04 00:37:02 +08:00
|
|
|
- name: Build
|
2022-08-06 01:51:39 +08:00
|
|
|
run: cmake --build build --target ${{ matrix.target }}
|