Skip to content

change github action ubuntu version 18.04 -> latest #62

change github action ubuntu version 18.04 -> latest

change github action ubuntu version 18.04 -> latest #62

Workflow file for this run

name: CodeCov
on:
push:
branches:
- main
pull_request:
jobs:
ubuntu-gcc-code-cov:
runs-on: ubuntu-latest
env:
CMAKE_FLAGS: "-DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_USE_RAPIDJSON=ON -DSERDEPP_USE_FMT=ON -DSERDEPP_BUILD_TESTING=ON -DSERDEPP_USE_CATCH2=ON"
strategy:
matrix:
build-type: ["Debug"]
gcc-version: ["latest"]
container: gcc:${{ matrix.gcc-version }}
steps:
- name: Get latest CMake
uses: lukka/[email protected]
- name: Install git on container
run: apt update && apt install -y git
- name: Clone Repository
uses: actions/checkout@v3
with:
submodules: true
- name: CMake build
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.build-type}} ${{env.CMAKE_FLAGS}} .
cmake --build ./build --config ${{matrix.build-type}}
- name: Run Test Script
working-directory: build
run: ctest -C ${{matrix.build-type}} --output-on-failure
- name: Prepare Codecov
run: |
apt-get install -y lcov
lcov --directory . --capture --output-file coverage.info --rc lcov_branch_coverage=1 # capture coverage info
lcov --remove coverage.info '/usr/*' --output-file coverage.info --rc lcov_branch_coverage=1 # filter out system
lcov --remove coverage.info './tests/*' --output-file coverage.info --rc lcov_branch_coverage=1 # filter out tests
lcov --list coverage.info --rc lcov_branch_coverage=1 # debug info
- name: Codecov
uses: codecov/[email protected]
with:
files: coverage.info
fail_ci_if_error: true
verbose: true