Skip to content

More statistical information #316

More statistical information

More statistical information #316

Workflow file for this run

name: Coverage
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
job:
name: ${{ matrix.platform }}-llvm-cov
runs-on: ${{ matrix.run-on }}
strategy:
fail-fast: false
matrix:
run-on: [ubuntu-24.04]
include:
- run-on: ubuntu-24.04
triplet: x64-linux-release
platform: linux
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
VCPKG_GIT_COMMIT_ID: "c82f74667287d3dc386bce81e44964370c91a289"
steps:
- uses: actions/checkout@v4
with:
lfs: 'false'
- name: Create LFS file list
shell: pwsh
run: git lfs ls-files -l | ForEach-Object { $_.split(" ")[0] } | Sort-Object | Out-File .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v4
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
- name: Git LFS Pull
run: git lfs pull
- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.25.0"
ninjaVersion: "^1.11.1"
- name: Setup clang
run: |
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: "${{ env.VCPKG_GIT_COMMIT_ID }}"
- name: Restore vcpkg cache
id: vcpkg-cache
uses: TAServers/vcpkg-cache@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
prefix: vcpkg-${{ matrix.triplet }}-clang/
- name: Build & Test project
env:
VCPKG_BINARY_SOURCES: "clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite"
run: |
cd '${{ github.workspace }}'
cmake --preset coverage . -G Ninja -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_CXX_FLAGS=-gdwarf-4" "-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}"
cmake --build --preset coverage .
ctest --preset coverage
- name: Coverage Report
run: cmake --build ${{ github.workspace }}/build/coverage --target code_coverage_report
- name: Coverage Export
run: cmake --build ${{ github.workspace }}/build/coverage --target code_coverage_export_lcov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ github.workspace }}/build/coverage/coverage.info