Skip to content

Merge pull request #45 from rodneylab/ci__update_ci_config #87

Merge pull request #45 from rodneylab/ci__update_ci_config

Merge pull request #45 from rodneylab/ci__update_ci_config #87

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@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
disable-telemetry: true
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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@d485b24c1283deafc12b4b8ae90ff09c0d1eb972 # v0.44.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@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}