Skip to content

bump embassy-time

bump embassy-time #73

Workflow file for this run

name: Coverage
on:
push:
branches:
- master
pull_request:
jobs:
grcov:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
target: thumbv7m-none-eabi
override: true
- name: Install grcov
uses: actions-rs/cargo@v1
# uses: actions-rs/[email protected]
with:
# crate: grcov
# version: latest
# use-tool-cache: true
command: install
args: grcov --git https://github.com/mozilla/grcov
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --lib --no-fail-fast
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_abort_tests"
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_abort_tests"
- name: Generate coverage data
id: grcov
# uses: actions-rs/[email protected]
run: |
grcov target/debug/ \
--branch \
--llvm \
--source-dir . \
--output-file lcov.info \
--ignore='/**' \
--ignore='C:/**' \
--ignore='../**' \
--ignore-not-existing \
--excl-line "#\\[derive\\(" \
--excl-br-line "(#\\[derive\\()|(debug_assert)" \
--excl-start "#\\[cfg\\(test\\)\\]" \
--excl-br-start "#\\[cfg\\(test\\)\\]" \
--commit-sha ${{ github.sha }} \
--service-job-id ${{ github.job }} \
--service-name "GitHub Actions" \
--service-number ${{ github.run_id }}
- name: Upload coverage as artifact
uses: actions/upload-artifact@v2
with:
name: lcov.info
# path: ${{ steps.grcov.outputs.report }}
path: lcov.info
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v1
with:
# file: ${{ steps.grcov.outputs.report }}
file: lcov.info
fail_ci_if_error: true