Skip to content

CI to run and upload coverage #54

CI to run and upload coverage

CI to run and upload coverage #54

Workflow file for this run

name: LCOV-Code-Coverage-IOTREQ
on:
pull_request:
push:
branches: [ main, 'release_*' ]
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-coverage-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
env:
CHIP_NO_LOG_TIMESTAMPS: true
jobs:
lcov-coverage:
name: Coverage using LCOV
if: github.actor != 'restyled-io[bot]'
strategy:
matrix:
type: [code-coverage-lcov]
env:
BUILD_TYPE: ${{ matrix.type }}
CC_SLUG: SiliconLabsSoftware/matter_sdk
runs-on: ubuntu-latest
container:
image: ghcr.io/project-chip/chip-build:174
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get install -y jq lcov
apt-get install -y libglib2.0-dev libdbus-1-dev
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: linux
bootstrap-log-name: bootstrap-logs-codecov-${{ matrix.type }}
- name: Run Build Coverage
run: ./scripts/build_coverage.sh --yaml --xml
- name: Upload coverage to Artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-report-lcov
path: |
out/coverage/coverage/coverage.xml
out/coverage/coverage/html
retention-days: 30