refs #181 Актуальные версии макоси #132
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: | |
- master | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Add APT repositories | |
run: | | |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - | |
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' | |
- name: Install APT dependencies | |
run: | | |
sudo apt update | |
sudo apt install --yes gcovr lcov libboost-program-options-dev libboost-system-dev cmake git | |
- name: Configure | |
run: | | |
cmake -S . -B Build/burst -DCMAKE_BUILD_TYPE=Debug -DBURST_COVERAGE=ON | |
- name: Build and test | |
run: | | |
cmake --build Build/burst --target coverage | |
- name: Publish coverage to codecov | |
run: | | |
lcov --version | |
lcov --capture --directory Build/burst --output-file coverage.info | |
lcov --remove coverage.info "/usr/*" --output-file coverage.info | |
lcov --remove coverage.info "*/test/*" --output-file coverage.info | |
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports" |