-
Notifications
You must be signed in to change notification settings - Fork 97
34 lines (32 loc) · 1 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Rust
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: --deny warnings
RUSTDOCFLAGS: --deny warnings
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install nightly
run: |
rustup toolchain install nightly
rustup +nightly component add clippy
- name: Build
run: |
cargo build --release --features zstd
cargo +nightly build --release --features custom-alloc
cargo run --release --example basic
- name: Run tests
run: |
cargo test --release --features zstd
cargo +nightly test --release --features custom-alloc -- --test-threads 1
- name: Clippy
run: |
cargo clippy --release --features zstd -- -A clippy::needless_range_loop
cargo +nightly clippy --release --features custom-alloc -- -A clippy::needless_range_loop
- name: Check formatting
run: cargo fmt --all --check
- name: Check documentation
run: cargo doc --release