Support hashtree
crate with feature, add Criterion benchmarks
#213
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI suite | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Read toolchain file | |
id: rust-toolchain | |
run: | | |
RUST_TOOLCHAIN=$(grep 'channel' rust-toolchain.toml | awk '{split($0,a," = "); print a[2]}' | tr -d '"') | |
echo "RUST_TOOLCHAIN=$RUST_TOOLCHAIN" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ steps.rust-toolchain.outputs.RUST_TOOLCHAIN }} | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: Build | |
run: cargo build --all-targets --all-features --workspace --verbose | |
- name: Build `no-std` | |
run: cargo build --no-default-features --all-targets --workspace --verbose | |
- name: Run tests | |
run: | | |
cargo test --all-features --all-targets --workspace --verbose | |
cargo test --doc | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt, clippy | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: Check format | |
run: cargo +nightly fmt --all --check | |
- name: Check clippy | |
run: cargo +nightly clippy --all-targets --all-features --workspace --verbose -- -D warnings | |
coverage: | |
runs-on: ubuntu-latest | |
container: | |
image: xd009642/tarpaulin:develop-nightly | |
options: --security-opt seccomp=unconfined | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Generate code coverage | |
run: cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v3 |