udp: add doxygen comments (#896) #3398
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverage | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
env: | |
CMAKE_GENERATOR: Ninja | |
steps: | |
- uses: actions/checkout@v3 | |
- name: fix flaky azure mirrors | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
sudo sed -i 's/azure\./de\./' /etc/apt/sources.list | |
- name: install packages | |
run: | | |
sudo apt-get update && sudo apt-get install -y ninja-build | |
- name: make | |
run: | | |
cmake -B build -DCMAKE_C_FLAGS="--coverage" -DCMAKE_EXE_LINKER_FLAGS="--coverage" | |
cmake --build build -j -t retest | |
- name: retest | |
run: | | |
./build/test/retest -a -v | |
./build/test/retest -r -m select -v | |
- name: gcov | |
run: | | |
cd ../re | |
gcov build/**/*.o | |
- name: install gcovr | |
run: | | |
pip install gcovr==5.0 | |
- name: coverage check | |
run: | | |
min_cov="64.0" | |
cov=$(~/.local/bin/gcovr -r . -s | grep lines | awk '{ print $2 }' | sed 's/%//') | |
echo "Coverage: ${cov}% (min $min_cov%)" | |
exit $(echo "$cov < $min_cov" | bc -l) |