Skip to content

github: Fix codecov uploads #51

github: Fix codecov uploads

github: Fix codecov uploads #51

Workflow file for this run

name: CMake Build
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@master
- name: Install build environment
run: |
sudo apt-get update
sudo apt-get install \
cmake \
doxygen \
iwyu \
lcov \
libsdl2-dev \
ninja-build \
#
echo -n "CC: "; cc --version
echo -n "CMake: "; cmake --version
echo -n "doxygen: "; doxygen --version
echo -n "lcov: "; lcov --version
echo -n "ninja: "; ninja --version
echo -n "sdl2: "; sdl2-config --version
- name: Build and test
run: |
ctest --build-and-test . build --build-generator Ninja \
--build-options \
-DENABLE_SANITIZERS=1 \
-DENABLE_COVERAGE=1 \
-DENABLE_WARNINGS=1 \
-DCMAKE_BUILD_TYPE=Debug \
--test-command ctest --rerun-failed --output-on-failure
- name: Generate coverage
run: |
lcov --directory . --base-directory build --capture -o build/cov.info
lcov --remove build/cov.info -o build/cov_nosys.info '/usr/include/*'
lcov --list build/cov_nosys.info
genhtml build/cov_nosys.info -o build/lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.codecov_token }}
flags: unittests
files: build/cov_nosys.info
name: codecov-umbrella # optional
fail_ci_if_error: true
verbose: true
- name: Upload docs
uses: actions/upload-pages-artifact@v4
with:
name: github-pages
path: build/docs/html
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Generate docs
id: deployment
uses: actions/deploy-pages@v4