chore: Release #18
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: Rust | |
concurrency: | |
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
cancel-in-progress: true | |
on: | |
push: | |
paths-ignore: | |
- "**.md" | |
- "**.py" | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
- "**.py" | |
workflow_dispatch: | |
jobs: | |
cargo-deny: | |
name: cargo deny | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
check-fmt: | |
name: cargo fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo fmt --all -- --check | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: rustup component add clippy | |
- run: cargo clippy --all-targets -- --deny warnings | |
check-docs: | |
name: cargo doc | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo doc --no-deps --document-private-items | |
env: {RUSTDOCFLAGS: -D warnings} | |
linux-build: | |
name: linux build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# System protoc is required since we're disabling default features | |
- name: Setup Protobuf | |
uses: arduino/setup-protoc@v2 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
# Check that crates build without default features | |
- run: cargo check --workspace --no-default-features | |
# Check that crates build with default features | |
- run: cargo check --workspace | |
# Check that crates build with all features | |
- run: cargo check --workspace --all-features | |
linux-test: | |
name: linux test | |
needs: [linux-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo test --all-targets | |
doc-tests: | |
name: doc tests | |
needs: [linux-build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo test --doc | |