Skip to content

Commit

Permalink
fix codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Jan 18, 2024
1 parent 15b1e0f commit 5ff665a
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 105 deletions.
11 changes: 0 additions & 11 deletions .github/actions/build-simulator/action.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/actions/cross-compile-build/action.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/actions/cross-compile-check/action.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/actions/host-compile-test/action.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/actions/parse-cmake-preset/action.yaml

This file was deleted.

50 changes: 30 additions & 20 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: 'Code Coverage'
on:
pull_request:
push:
branches:
- 'main'
Expand All @@ -12,6 +11,7 @@ env:
defaults:
run:
shell: bash
working-directory: ot3-firmware

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
Expand All @@ -22,33 +22,43 @@ jobs:
name: 'Generate-Coverage'
runs-on: 'ubuntu-20.04'
timeout-minutes: 10
env:
CC: gcc-10
CXX: g++-10
steps:
- run: |
sudo apt update
sudo apt install gcc-10 g++-10 lcov
- uses: actions/setup-python@v4
- name: Checkout ot3-firmware repo
uses: actions/checkout@v4
with:
python-version: '3.10'
- name: 'Install lcov_cobertura module'
run: pip install lcov_cobertura
- uses: 'actions/checkout@v2'
path: ot3-firmware

- name: Checkout github actions directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: "actions/cache@v3"
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions

- name: Setup main
uses: ./actions/.github/actions/main-setup
with:
path: "./stm32-tools"
key: ${{ runner.os }}-${{ hashFiles('**/cmake/*') }}-${{ secrets.CACHE_VERSION }}
- name: 'Configure'
cache-version: ${{ secrets.CACHE_VERSION }}

- name: Install LCOV
run: sudo apt install -y lcov

- name: Install lcov_cobertura module
run: pip install lcov_cobertura

- name: Configure
run: cmake --preset=host-gcc10 -DENABLE_COVERAGE=On -DCMAKE_BUILD_TYPE=Debug
- name: 'Run all tests'

- name: Run all tests
run: cmake --build --preset tests
- name: 'Generate coverage'

- name: Generate coverage
run: cmake --build --preset tests --target lcov-geninfo
- name: 'Convert coverage to xml'

- name: Convert coverage to xml
run: lcov_cobertura build-host/lcov/data/capture/all_targets.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down

0 comments on commit 5ff665a

Please sign in to comment.