Skip to content

added step "Install LLVM tools" #13

added step "Install LLVM tools"

added step "Install LLVM tools" #13

Workflow file for this run

name: Rust
on:
push:
branches: [ "main", "development" ]
pull_request:
branches: [ "main", "development" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- name: Install Rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up environment for code coverage
run: |
echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV
echo "RUSTFLAGS=-C instrument-coverage" >> $GITHUB_ENV
echo "LLVM_PROFILE_FILE=${{ github.workspace }}/coverage/%p-%m.profraw" >> $GITHUB_ENV
- name: Install LLVM tools
run: rustup component add llvm-tools-preview
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Collecting code coverage
run: |
cargo install grcov
grcov ${GITHUB_WORKSPACE}/coverage/ -b ./target/debug/deps/ -s . -t coveralls+ --llvm --branch --ignore-not-existing --output-path ./coverage.json --token ${{ secrets.COVERALLS_REPO_TOKEN }}
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage.json
flag-name: run-${{ matrix.rust }}
parallel: true