Skip to content

reduce dependencies that have to be installed #67

reduce dependencies that have to be installed

reduce dependencies that have to be installed #67

Workflow file for this run

name: Codecov
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup system
run: |
sudo apt install -y gcovr
- name: Install Dependencies
shell: bash
working-directory: ${{runner.workspace}}
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=${{runner.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake -DSEC21_ENABLE_COVERAGE=On
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config Debug
- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
run: ctest --build-config Debug
- name: Analyze the coverage data files
working-directory: ${{runner.workspace}}/build
run: gcovr --xml coverage-service.xml
- name: Upload coverage reports to Codecov
working-directory: ${{runner.workspace}}/build
run: |
curl -Os https://cli.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov --verbose upload-process --fail-on-error -t ${{secrets.CODECOV_TOKEN}} -n 'service'-${{github.run_id}} -F service -f coverage-service.xml