Skip to content

ci: back to dtolnay/rust-toolchain #214

ci: back to dtolnay/rust-toolchain

ci: back to dtolnay/rust-toolchain #214

Workflow file for this run

name: Rust
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
#container:
# image: centos8
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- name: Installing dependency packages
run: sudo apt update && sudo apt install -y libxen-dev protobuf-compiler
- name: Build
run: cargo build --verbose
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- name: Installing dependency packages
run: sudo apt update && sudo apt install -y libxen-dev protobuf-compiler
- name: Build docs
run: cargo doc --workspace --no-deps
- name: Upload docs
uses: actions/upload-artifact@v3
with:
name: rustdoc-html
path: ./target/doc
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- name: Installing dependency packages
run: sudo apt update && sudo apt install -y libxen-dev protobuf-compiler
- name: Run tests
run: |
cargo clean
cargo test --verbose
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
- name: Install grcov
run: cargo install grcov
- name: Test coverage report
run: grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/
- name: Upload test coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-html
path: ./target/debug/coverage/