[REF] use ubuntu 24.04 for codecov #532
Workflow file for this run
This file contains hidden or 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
| on: [push, pull_request] | |
| name: Test Coverage | |
| jobs: | |
| run-coverage: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install deps (GCC, lcov, Boost) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y lcov libboost-all-dev gcc-14 g++-14 | |
| echo "CC=gcc-14" >> $GITHUB_ENV | |
| echo "CXX=g++-14" >> $GITHUB_ENV | |
| - name: Configure and build ADOL-C | |
| run: | | |
| cmake -S . -B build \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DBUILD_TESTS_WITH_COV=ON \ | |
| -DENABLE_SPARSE=1 \ | |
| -DCMAKE_C_COMPILER=gcc-14 \ | |
| -DCMAKE_CXX_COMPILER=g++-14 | |
| cmake --build build | |
| - name: Run Tests | |
| run: | | |
| set +e | |
| ctest --test-dir build --output-on-failure | |
| exit 0 | |
| - name: Generate coverage report | |
| run: | | |
| cd build | |
| lcov --gcov-tool $(which gcov-14) --capture --directory . --output-file coverage.info | |
| lcov --remove coverage.info '/usr/*' 'boost/*' 'c++/*' '*boost-test/*' --output-file coverage.info | |
| lcov --list coverage.info | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: build/coverage.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: unittests | |
| name: code-coverage-report |