init #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| - beta | |
| - alpha | |
| - '*.x' | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 | |
| with: | |
| python-version: 3.11 | |
| - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | |
| with: | |
| extra_args: --hook-stage manual --all-files | |
| check-on-linux: | |
| runs-on: ubuntu-22.04 | |
| needs: [pre-commit] | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| triplet: [x64-linux] | |
| compiler: [gcc-13, llvm-17] | |
| std: [20] | |
| build_type: [Debug, RelWithDebInfo] | |
| name: check • ${{ matrix.triplet }} • ${{ matrix.compiler }} • c++${{ matrix.std }} • ${{ matrix.build_type }} | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache | |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
| with: | |
| path: | | |
| ~/vcpkg | |
| ~/.cache/vcpkg | |
| key: ${{ matrix.triplet }}-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: ${{ matrix.triplet }}-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }} | |
| - uses: aminya/setup-cpp@v1 | |
| with: | |
| compiler: ${{ matrix.compiler }} | |
| cmake: true | |
| ninja: true | |
| ccache: true | |
| - name: Prepare for lcov | |
| if: contains(matrix.compiler, 'gcc') | |
| run: | | |
| sudo apt-get update; sudo apt-get install lcov -y | |
| gcc_compiler=${{ matrix.compiler }} | |
| gcov_version=${gcc_compiler##*-} | |
| sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-$gcov_version 100 | |
| - name: Prepare for llvm-cov | |
| if: contains(matrix.compiler, 'llvm') | |
| run: | | |
| llvm_compiler=${{ matrix.compiler }} | |
| llvm_cov_version=${llvm_compiler##*-} | |
| sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-$llvm_cov_version 100 | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . --preset=default | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| -DCMAKE_C_COMPILER=${{ contains(matrix.compiler, 'gcc') && 'gcc' || contains(matrix.compiler, 'llvm') && 'clang' }} | |
| -DCMAKE_CXX_COMPILER=${{ contains(matrix.compiler, 'gcc') && 'g++' || contains(matrix.compiler, 'llvm') && 'clang++' }} | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} | |
| -DCODE_COVERAGE=ON | |
| -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build --preset=default --target all | |
| - name: Test | |
| run: ctest --preset=default | |
| - name: Install | |
| run: cmake --build --preset=default --target install | |
| - name: Uninstall | |
| run: cmake --build --preset=default --target uninstall | |
| - name: Coverage | |
| run: cmake --build --preset=default --target ccov-all | |
| check-on-macos: | |
| runs-on: macos-12 | |
| needs: [pre-commit] | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| triplet: [x64-osx] | |
| compiler: [gcc@13, llvm@17] | |
| std: [20] | |
| build_type: [Debug, RelWithDebInfo] | |
| name: check • ${{ matrix.triplet }} • ${{ matrix.compiler }} • c++${{ matrix.std }} • ${{ matrix.build_type }} | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache | |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
| with: | |
| path: | | |
| ~/vcpkg | |
| ~/.cache/vcpkg | |
| key: ${{ matrix.triplet }}-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: ${{ matrix.triplet }}-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }} | |
| - name: Install compilers and tools | |
| run: | | |
| brew install ${{ matrix.compiler }} cmake ninja ccache | |
| - name: Prepare PATH for compilers | |
| run: echo "PATH=/usr/local/opt/${{ matrix.compiler }}/bin:$PATH" >> $GITHUB_ENV | |
| - name: Prepare for llvm | |
| if: contains(matrix.compiler, 'llvm') | |
| run: | | |
| echo "CC=clang" >> $GITHUB_ENV | |
| echo "CXX=clang++" >> $GITHUB_ENV | |
| - name: Prepare for gcc | |
| if: contains(matrix.compiler, 'gcc') | |
| run: | | |
| echo "CC=gcc" >> $GITHUB_ENV | |
| echo "CXX=g++" >> $GITHUB_ENV | |
| compiler=${{ matrix.compiler }} | |
| gcov_version=${compiler##*@} | |
| echo "GCOV=$(which gcov-$gcov_version)" >> $GITHUB_ENV | |
| - name: Prepare for lcov | |
| if: contains(matrix.compiler, 'gcc') | |
| run: | | |
| curl -o /tmp/lcov.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/e92d2ae54954ebf485b484d8522104700b144fee/Formula/lcov.rb | |
| HOMEBREW_NO_AUTO_UPDATE=1 brew install --formula /tmp/lcov.rb | |
| brew pin lcov | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . --preset=default | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| -DCMAKE_C_COMPILER="${CC}" | |
| -DCMAKE_CXX_COMPILER="${CXX}" | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} | |
| -DCODE_COVERAGE=ON | |
| -DBUILD_TESTING=ON | |
| ${{ contains(matrix.compiler, 'gcc') && '-DCODE_COVERAGE_GCOV=${GCOV}' }} | |
| - name: Build | |
| run: cmake --build --preset=default --target all | |
| - name: Test | |
| run: ctest --preset=default | |
| - name: Install | |
| run: cmake --build --preset=default --target install | |
| - name: Uninstall | |
| run: cmake --build --preset=default --target uninstall | |
| - name: Coverage | |
| run: cmake --build --preset=default --target ccov-all | |
| check-on-windows: | |
| runs-on: windows-2022 | |
| needs: [pre-commit] | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| triplet: [x64-windows] | |
| compiler: [msvc-2022, llvm-17] | |
| std: [20] | |
| build_type: [Debug, RelWithDebInfo] | |
| name: check • ${{ matrix.triplet }} • ${{ matrix.compiler }} • c++${{ matrix.std }} • ${{ matrix.build_type }} | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache | |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
| with: | |
| path: | | |
| ~/vcpkg | |
| ~/.cache/vcpkg | |
| ~/AppData/Local/vcpkg | |
| key: ${{ matrix.triplet }}-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: ${{ matrix.triplet }}-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }} | |
| - uses: aminya/setup-cpp@v1 | |
| with: | |
| compiler: ${{ matrix.compiler }} | |
| vcvarsall: true | |
| cmake: true | |
| ninja: true | |
| ccache: true | |
| opencppcoverage: true | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . --preset=default ${{ contains(matrix.compiler, 'llvm') && '-DVCPKG_PLATFORM_TOOLSET=ClangCL' || '' }} | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| -DCMAKE_C_COMPILER=${{ contains(matrix.compiler, 'msvc') && '"cl"' || contains(matrix.compiler, 'llvm') && '"clang-cl.exe"' }} | |
| -DCMAKE_CXX_COMPILER=${{ contains(matrix.compiler, 'msvc') && '"cl"' || contains(matrix.compiler, 'llvm') && '"clang-cl.exe"' }} | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} | |
| -DCODE_COVERAGE=ON | |
| -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build --preset=default --target all | |
| - name: Test | |
| run: ctest --preset=default | |
| - name: Install | |
| run: cmake --build --preset=default --target install | |
| - name: Uninstall | |
| run: cmake --build --preset=default --target uninstall | |
| - name: Coverage | |
| run: cmake --build --preset=default --target ccov-all | |
| check-mingw: | |
| runs-on: windows-2022 | |
| needs: [pre-commit] | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| triplet: [x64-mingw-dynamic] | |
| compiler: [mingw] | |
| std: [20] | |
| build_type: [Debug, RelWithDebInfo] | |
| name: check • ${{ matrix.triplet }} • ${{ matrix.compiler }} • c++${{ matrix.std }} • ${{ matrix.build_type }} | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache | |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
| with: | |
| path: | | |
| ~/vcpkg | |
| ~/.cache/pip | |
| ~/.cache/vcpkg | |
| ~/AppData/Local/vcpkg | |
| key: ${{ matrix.triplet }}-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: ${{ matrix.triplet }}-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }} | |
| - uses: aminya/setup-cpp@v1 | |
| with: | |
| compiler: ${{ matrix.compiler }} | |
| cmake: true | |
| ninja: true | |
| ccache: true | |
| - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 | |
| with: | |
| python-version: 3.x | |
| - name: Prepare for gcovr | |
| run: | | |
| pip install gcovr==7.2 | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . --preset=default | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| -DVCPKG_TARGET_TRIPLET=x64-mingw-dynamic | |
| -DCODE_COVERAGE=ON | |
| -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build --preset=default --target all | |
| - name: Test | |
| run: ctest --preset=default | |
| - name: Install | |
| run: cmake --build --preset=default --target install | |
| - name: Uninstall | |
| run: cmake --build --preset=default --target uninstall | |
| - name: Coverage | |
| run: cmake --build --preset=default --target ccov-all | |
| check-sanitizers: | |
| runs-on: ubuntu-22.04 | |
| needs: [pre-commit] | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sanitizer: | |
| - address,undefined | |
| build_type: [Debug, RelWithDebInfo] | |
| name: check • sanitizers • ${{ matrix.sanitizer }} • ${{ matrix.build_type }} | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache | |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
| with: | |
| path: | | |
| ~/vcpkg | |
| ~/.cache/vcpkg | |
| key: x64-linux-gcc-13-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: x64-linux-gcc-13-${{ hashFiles('vcpkg.json') }} | |
| - uses: aminya/setup-cpp@v1 | |
| with: | |
| compiler: gcc-13 | |
| cmake: true | |
| ninja: true | |
| ccache: true | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . --preset=default | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -DCMAKE_CXX_STANDARD=20 | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| -DVCPKG_TARGET_TRIPLET=x64-linux | |
| -DUSE_SANITIZER=${{ matrix.sanitizer }} | |
| -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build --preset=default --target all | |
| - name: Test | |
| run: ctest --preset=default | |
| check-valgrind: | |
| runs-on: ubuntu-22.04 | |
| needs: [pre-commit] | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build_type: [Debug, RelWithDebInfo] | |
| name: check • valgrind • ${{ matrix.build_type }} | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache | |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
| with: | |
| path: | | |
| ~/vcpkg | |
| ~/.cache/vcpkg | |
| key: x64-linux-gcc-13-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: x64-linux-gcc-13-${{ hashFiles('vcpkg.json') }} | |
| - uses: aminya/setup-cpp@v1 | |
| with: | |
| compiler: gcc-13 | |
| cmake: true | |
| ninja: true | |
| ccache: true | |
| - name: Install valgrind | |
| run: sudo apt-get install valgrind | |
| # Use Valgrind must disable sanitizer | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . --preset=default | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -DCMAKE_CXX_STANDARD=20 | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| -DVCPKG_TARGET_TRIPLET=x64-linux | |
| -DUSE_VALGRIND=ON | |
| -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build --preset=default --target all | |
| - name: Valgrind | |
| run: cmake --build --preset=default --target ExperimentalMemCheck | tee out/valgrind.log | |
| - name: Check if valgrind found some errors | |
| run: | | |
| if grep -q "Memory Leak" out/valgrind.log; then | |
| echo "# :error: Memory Leak found! Please fix it." >> $GITHUB_STEP_SUMMARY | |
| echo -e "References: \n - <https://valgrind.org/docs/manual/manual.html>\n - <https://stackoverflow.com/a/44989219/23467261>" >> $GITHUB_STEP_SUMMARY | |
| tar -czf out/valgrind-results.tar.gz out/build/default/Testing | |
| exit 1 | |
| fi | |
| - name: Upload test results | |
| if: failure() | |
| uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4 | |
| with: | |
| name: valgrind-results | |
| path: out/valgrind-results.tar.gz | |
| clang-tidy: | |
| runs-on: ubuntu-22.04 | |
| needs: [pre-commit] | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache | |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
| with: | |
| path: | | |
| ~/vcpkg | |
| ~/.cache/vcpkg | |
| key: x64-linux-gcc-13-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: x64-linux-gcc-13-${{ hashFiles('vcpkg.json') }} | |
| - uses: aminya/setup-cpp@v1 | |
| with: | |
| compiler: gcc-13 | |
| cmake: true | |
| ninja: true | |
| ccache: true | |
| - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 | |
| with: | |
| python-version: 3.x | |
| - name: Install latest clang-tidy | |
| run: | | |
| pip install clang-tidy==19.1.0 | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . --preset=default | |
| -DCMAKE_BUILD_TYPE=Debug | |
| -DCMAKE_CXX_STANDARD=20 | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| -DVCPKG_TARGET_TRIPLET=x64-linux | |
| -DUSE_CLANGTIDY=ON | |
| -DUSE_CLANGTIDY_WARNINGS_AS_ERRORS=ON | |
| -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build --preset=default --target all | |
| cppcheck: | |
| runs-on: macos-12 | |
| needs: [pre-commit] | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache | |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
| with: | |
| path: | | |
| ~/vcpkg | |
| ~/.cache/vcpkg | |
| key: x64-osx-gcc@13-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: x64-osx-gcc@13-${{ hashFiles('vcpkg.json') }} | |
| - name: Install compilers and tools # use cppcheck of macos, it's newest version | |
| run: brew install gcc@13 cmake ninja ccache cppcheck | |
| - name: Prepare for gcc@13 | |
| run: | | |
| echo "CC=gcc" >> $GITHUB_ENV | |
| echo "CXX=g++" >> $GITHUB_ENV | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . --preset=default | |
| -DCMAKE_BUILD_TYPE=Debug | |
| -DCMAKE_CXX_STANDARD=20 | |
| -DCMAKE_C_COMPILER="${CC}" | |
| -DCMAKE_CXX_COMPILER="${CXX}" | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| -DVCPKG_TARGET_TRIPLET=x64-osx | |
| -DUSE_CPPCHECK=ON | |
| -DUSE_CPPCHECK_WARNINGS_AS_ERRORS=ON | |
| -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build --preset=default --target all | |
| check-docs: | |
| runs-on: ubuntu-22.04 | |
| needs: [pre-commit] | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache | |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
| with: | |
| path: | | |
| ~/vcpkg | |
| ~/.cache/pip | |
| ~/.cache/vcpkg | |
| key: x64-linux-gcc-13-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: x64-linux-gcc-13-${{ hashFiles('vcpkg.json') }} | |
| - uses: aminya/setup-cpp@v1 | |
| with: | |
| compiler: gcc-13 | |
| cmake: true | |
| ninja: true | |
| ccache: true | |
| doxygen: true | |
| graphviz: true | |
| - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 | |
| with: | |
| python-version: 3.x | |
| - name: Configure CMake | |
| run: > | |
| make cmake-configure CONFIGURE=" | |
| -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
| -DCMAKE_CXX_STANDARD=20 | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| -DVCPKG_TARGET_TRIPLET=x64-linux | |
| " | |
| - name: Checks the docs with warnings as errors | |
| run: make docs-check | |
| codecov: | |
| runs-on: ubuntu-22.04 | |
| needs: [pre-commit] | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache | |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
| with: | |
| path: | | |
| ~/vcpkg | |
| ~/.cache/vcpkg | |
| key: x64-linux-gcc-13-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: x64-linux-gcc-13-${{ hashFiles('vcpkg.json') }} | |
| - uses: aminya/setup-cpp@v1 | |
| with: | |
| compiler: gcc-13 | |
| cmake: true | |
| ninja: true | |
| ccache: true | |
| - name: Prepare for lcov | |
| run: | | |
| sudo apt-get update; sudo apt-get install lcov -y | |
| gcc_compiler=gcc-13 | |
| gcov_version=${gcc_compiler##*-} | |
| sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-$gcov_version 100 | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . --preset=default | |
| -DCMAKE_BUILD_TYPE=Debug | |
| -DCMAKE_CXX_STANDARD=20 | |
| -DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
| -DVCPKG_TARGET_TRIPLET=x64-linux | |
| -DCODE_COVERAGE=ON | |
| -DBUILD_TESTING=ON | |
| - name: Build | |
| run: cmake --build --preset=default --target all | |
| - name: Coverage | |
| run: cmake --build --preset=default --target ccov-all | |
| - name: Upload coverage report | |
| uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| disable_search: true | |
| file: ./out/build/default/code_coverage/coverage.info | |
| verbose: true | |
| pass: | |
| if: always() | |
| needs: | |
| - check-on-linux | |
| - check-on-macos | |
| - check-on-windows | |
| - check-mingw | |
| - check-docs | |
| - check-sanitizers | |
| - check-valgrind | |
| - clang-tidy | |
| - cppcheck | |
| - codecov | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 2 | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} | |
| - name: Approve pr if all jobs succeeded | |
| if: contains(github.event.pull_request.labels.*.name, 'auto-approval') | |
| uses: hmarr/auto-approve-action@v4 |