Merge pull request #1690 from GillesDuvert/solve_1689 #265
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: codecov | |
on: | |
schedule: | |
- cron: "0 0 * * 2" | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
codecov: | |
runs-on: ubuntu-latest | |
env: | |
DEPS: debug | |
Configuration: Debug | |
ROOT_DIR: ${{ github.workspace }}/.. | |
steps: | |
- name: Checkout GDL | |
uses: actions/[email protected] | |
- name: Install Dependencies | |
run: | | |
scripts/build_gdl.sh prep | |
sudo apt install -y lcov | |
- name: Build GDL | |
run: | | |
git submodule update --init | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD -DCMAKE_CXX_FLAGS:STRING="-fprofile-arcs -ftest-coverage" -DCMAKE_C_FLAGS:STRING="-fprofile-arcs -ftest-coverage" | |
make -j 4 install | |
lcov --capture --initial --directory . --output-file coverage1.info | |
make -k test | |
lcov --capture --directory . --output-file coverage2.info | |
gcov -pb src/*.o | |
lcov --add-tracefile ./coverage1.info --add-tracefile ./coverage2.info --output-file coveragefused.info | |
lcov -r coveragefused.info "/usr*" -o coveragefused.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
gcov: true |