Use conan 2 for setting up #155
Workflow file for this run
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
# SPDX-FileCopyrightText: 2021 Philipp Basler, Margarete Mühlleitner and Jonas Müller | |
# | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
name: codecov CI | |
on: | |
push: | |
branches: [ master] | |
paths: | |
- '**.cpp' | |
- '**.c' | |
- '**.h' | |
- '**.hpp' | |
- '**CMakeLists.txt' | |
- 'conanfile.py' | |
pull_request: | |
branches: [ master, develop ] | |
paths: | |
- '**.cpp' | |
- '**.c' | |
- '**.h' | |
- '**.hpp' | |
- '**CMakeLists.txt' | |
- 'conanfile.py' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'skip-ci')" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Get number of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
id: cpu-cores | |
- run: python3 Setup.py --options EnableCoverage=True | |
- run: cmake --preset conan-linux-x86_64-release | |
- name: compile | |
run: cmake --build --preset conan-linux-x86_64-release -j${{ steps.cpu-cores.outputs.count }} | |
- name: Generate Coverage | |
run: cmake --build --preset conan-linux-x86_64-release -j${{ steps.cpu-cores.outputs.count }} -t coverage | |
- name: Upload coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
flags: unittests # optional | |
name: codecov-umbrella # optional | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) |