Skip to content

Specified more values in toolchain file #23

Specified more values in toolchain file

Specified more values in toolchain file #23

Workflow file for this run

on:
workflow_dispatch:
workflow_call:
push:
branches: [main]
pull_request:
branches: [main]
name: πŸ”Ž Code Coverage
jobs:
grcov:
name: πŸ”Ž grcov Code Coverage
if: |
!startsWith(github.event.head_commit.message, 'ci:')
&& !startsWith(github.event.head_commit.message, 'ci(')
&& !startsWith(github.event.head_commit.message, 'docs:')
&& !startsWith(github.event.head_commit.message, 'docs(')
&& !startsWith(github.event.head_commit.message, 'style:')
&& !startsWith(github.event.head_commit.message, 'style(')
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-pc-windows-msvc
- x86_64-apple-darwin
# - aarch64-unknown-linux-gnu
# - aarch64-apple-darwin
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-apple-darwin
os: macos-latest
# - target: aarch64-unknown-linux-gnu
# os: ubuntu-latest
# - target: aarch64-apple-darwin
# os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: 🎟 Checkout Git Repository
id: checkout_repository_step
uses: actions/checkout@v2
- name: 🧰 Install Rust Toolchain
id: install_toolchain_step
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly # Required for -Zprofile
override: true
target: ${{ matrix.target }}
- name: πŸ—‚ Set up cargo cache
id: setup_cache_step
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: πŸ§ͺ Execute tests
id: execute_tests_step
uses: actions-rs/cargo@v1
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
with:
command: test
args: --workspace --target ${{ matrix.target }}
- name: πŸ’½ Pre-Installing grcov
id: preinstall_grcov_step
uses: actions-rs/install@v0.1
with:
crate: grcov
use-tool-cache: true
- name: πŸ”Ž Gather Coverage Data
id: coverage_gather_step
uses: actions-rs/grcov@v0.1
with:
config: .github/actions-rs/grcov.yml
coveralls-token: ${{ secrets.COVERALLS_TOKEN }}
- name: ⬆ Coveralls Upload
id: coveralls_upload_step
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: ${{ steps.coverage_gather_step.outputs.report }}
grcov_finalize:
name: βœ” Finalize grcov Code Coverage
if: |
!startsWith(github.event.head_commit.message, 'ci:')
&& !startsWith(github.event.head_commit.message, 'ci(')
&& !startsWith(github.event.head_commit.message, 'docs:')
&& !startsWith(github.event.head_commit.message, 'docs(')
&& !startsWith(github.event.head_commit.message, 'style:')
&& !startsWith(github.event.head_commit.message, 'style(')
runs-on: ubuntu-latest
needs: grcov
steps:
- name: βœ” Coveralls Finalization
id: coveralls_finalization_step
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true