Skip to content

Add release optimization levels #10

Add release optimization levels

Add release optimization levels #10

Workflow file for this run

name: coverage
on: [push]
jobs:
coverage:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Checkout LFS objects
run: git lfs pull
- name: Install Qt 6.5
uses: jurplel/install-qt-action@v4
with:
version: '6.5.*'
target: 'desktop'
- name: Install dependencies
run: sudo apt-get install -o Acquire::Retries=3 lcov
- name: Create build directory
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DCODE_COVERAGE=ON ..
- name: Build
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config Debug --verbose
- name: Gather baseline coverage
working-directory: ${{runner.workspace}}/build
run: lcov --directory . --capture --initial --output-file baseline.info
- name: Test
working-directory: ${{runner.workspace}}/build
run: ctest -C Debug -VV .
- name: Gather test coverage
working-directory: ${{runner.workspace}}/build
run: lcov --directory . --capture --output-file test.info
- name: Generate coverage report
working-directory: ${{runner.workspace}}/build
run: |
# combine baseline and test coverage data:
lcov -a baseline.info -a test.info --output-file coverage.info
# filter paths from report:
lcov --remove coverage.info '/usr/include/*' --output-file coverage.info
lcov --remove coverage.info '*/catch2-src/*' --output-file coverage.info
lcov --remove coverage.info '*/build/*' --output-file coverage.info
lcov --remove coverage.info '*/Qt/*' --output-file coverage.info
# generate the HTML files:
genhtml --demangle-cpp -o coverage coverage.info
- name: Upload results to Coveralls
uses: coverallsapp/github-action@master
with:
path-to-lcov: ${{runner.workspace}}/build/coverage.info
github-token: ${{ secrets.GITHUB_TOKEN }}