Skip to content

Merge pull request #40 from rodneylab/ci__update_ci_config #79

Merge pull request #40 from rodneylab/ci__update_ci_config

Merge pull request #40 from rodneylab/ci__update_ci_config #79

Workflow file for this run

name: Ubuntu CI Test
on:
push:
branches: [main, master, dev]
pull_request:
branches: [main, master, dev]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
disable-telemetry: true
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: install
run: sudo apt-get update && sudo apt-get install doxygen lcov libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev freeglut3-dev libxinerama-dev libxi-dev
- name: Setup Cpp
uses: aminya/setup-cpp@290824452986e378826155f3379d31bce8753d76 # v0.37.0
with:
clangtidy: true
- name: configure
run: |
cmake -H. -Bbuild -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=On
- name: building
run: |
cmake --build build --config Debug --target ComponentsTests QueriesTests SystemsTests Vector2DTests
- name: run component unit tests
working-directory: ./build/bin
run: |
./ComponentsTests
- name: run queries unit tests
working-directory: ./build/bin
run: |
./QueriesTests
- name: run systems unit tests
working-directory: ./build/bin
run: |
./SystemsTests
- name: run systems vector2d tests
working-directory: ./build/bin
run: |
./Vector2DTests
- name: generate coverage
working-directory: ./build
run: |
make cov
- name: Install gcovr
run: |
pip install -r requirements.txt --require-hashes
- name: Generate JSON coverage report
working-directory: ./build
run: |
gcovr -r .. . --filter ../src/ --branch --cobertura > coverage.xml
#gcovr -r .. . --filter ../src/ --txt-metric branch --cobertura > coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}