change override -std=c++14 to append #7
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
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install deps (GTest, lcov) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y lcov libgtest-dev cmake pkg-config libgsl-dev | |
| # Build GoogleTest (if you vendor it, skip this) | |
| sudo apt-get install -y cmake | |
| sudo cmake -S /usr/src/googletest -B /usr/src/googletest/build | |
| sudo cmake --build /usr/src/googletest/build --target install | |
| - name: Build tests with coverage | |
| run: | | |
| make clean | |
| make test COVERAGE=1 CXX=g++ CXXFLAGS="-O0 -g --coverage" LDFLAGS="--coverage" | |
| - name: Run tests | |
| run: ./bin/test_main | |
| - name: Generate coverage (LCOV) | |
| run: | | |
| # Clean any stale traces first | |
| lcov --directory obj --directory bin --zerocounters | |
| # Capture with matching gcov tool and stable options | |
| lcov --capture \ | |
| --directory obj \ | |
| --directory bin \ | |
| --gcov-tool gcov-13 \ | |
| --ignore-errors empty \ | |
| --output-file coverage.info | |
| # (optional) keep only your code | |
| lcov --remove coverage.info '/usr/*' '*/googletest/*' \ | |
| --output-file coverage.info | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: coverage.info | |
| flags: unittests | |
| name: ubuntu-gcc | |
| fail_ci_if_error: true | |
| env: | |
| # Public repos don't need a token. Private repos: add a secret CODECOV_TOKEN | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |