1name: Ubuntu 2 3on: 4 push: 5 branches: 6 - develop 7 - master 8 - release/* 9 pull_request: 10 11jobs: 12 ci_test_clang: 13 runs-on: ubuntu-latest 14 steps: 15 - uses: actions/checkout@v2 16 - name: install_ninja 17 run: | 18 sudo apt update 19 sudo apt install ninja-build 20 shell: bash 21 - name: install_clang 22 run: | 23 wget https://apt.llvm.org/llvm.sh 24 chmod +x llvm.sh 25 sudo ./llvm.sh 11 26 sudo apt-get install clang-tools-11 27 shell: bash 28 - name: cmake 29 run: cmake -S . -B build -DJSON_CI=On 30 - name: build 31 run: cmake --build build --target ci_test_clang 32 33 ci_test_gcc: 34 runs-on: ubuntu-latest 35 container: nlohmann/json-ci:latest 36 steps: 37 - uses: actions/checkout@v2 38 - name: cmake 39 run: cmake -S . -B build -DJSON_CI=On 40 - name: build 41 run: cmake --build build --target ci_test_gcc 42 43 ci_static_analysis: 44 runs-on: ubuntu-latest 45 container: nlohmann/json-ci:latest 46 strategy: 47 matrix: 48 target: [ci_clang_tidy, ci_cppcheck, ci_test_valgrind, ci_test_clang_sanitizer, ci_test_amalgamation, ci_clang_analyze, ci_cpplint, ci_cmake_flags, ci_single_binaries, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata, ci_infer] 49 steps: 50 - uses: actions/checkout@v2 51 - name: cmake 52 run: cmake -S . -B build -DJSON_CI=On 53 - name: build 54 run: cmake --build build --target ${{ matrix.target }} 55 56 ci_cmake_options: 57 runs-on: ubuntu-latest 58 container: nlohmann/json-ci:latest 59 strategy: 60 matrix: 61 target: [ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions] 62 steps: 63 - uses: actions/checkout@v2 64 - name: cmake 65 run: cmake -S . -B build -DJSON_CI=On 66 - name: build 67 run: cmake --build build --target ${{ matrix.target }} 68 69 ci_test_coverage: 70 runs-on: ubuntu-latest 71 container: nlohmann/json-ci:latest 72 steps: 73 - uses: actions/checkout@v2 74 - name: cmake 75 run: cmake -S . -B build -DJSON_CI=On 76 - name: build 77 run: cmake --build build --target ci_test_coverage 78 - name: archive coverage report 79 uses: actions/upload-artifact@v2 80 with: 81 name: code-coverage-report 82 path: /__w/json/json/build/html 83 - name: Coveralls 84 uses: coverallsapp/github-action@master 85 with: 86 github-token: ${{ secrets.GITHUB_TOKEN }} 87 path-to-lcov: /__w/json/json/build/json.info.filtered.noexcept 88 89 ci_test_compilers: 90 runs-on: ubuntu-latest 91 container: nlohmann/json-ci:latest 92 strategy: 93 matrix: 94 compiler: [g++-4.8, g++-4.9, g++-5, g++-7, g++-8, g++-9, g++-10, clang++-3.5, clang++-3.6, clang++-3.7, clang++-3.8, clang++-3.9, clang++-4.0, clang++-5.0, clang++-6.0, clang++-7, clang++-8, clang++-9, clang++-10, clang++-11] 95 steps: 96 - uses: actions/checkout@v2 97 - name: cmake 98 run: cmake -S . -B build -DJSON_CI=On 99 - name: build 100 run: cmake --build build --target ci_test_compiler_${{ matrix.compiler }} 101 102 ci_test_standards: 103 runs-on: ubuntu-latest 104 container: nlohmann/json-ci:latest 105 strategy: 106 matrix: 107 standard: [11, 14, 17, 20] 108 compiler: [gcc, clang] 109 steps: 110 - uses: actions/checkout@v2 111 - name: cmake 112 run: cmake -S . -B build -DJSON_CI=On 113 - name: build 114 run: cmake --build build --target ci_test_${{ matrix.compiler }}_cxx${{ matrix.standard }} 115