mirror of
https://github.com/trussed-dev/pc-usbip-runner.git
synced 2026-06-20 04:16:19 -07:00
Add CI workflow
Fixes: https://github.com/trussed-dev/pc-usbip-runner/issues/3
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Rust toolchain
|
||||
run: |
|
||||
rustup show
|
||||
|
||||
- name: Install build dependencies
|
||||
run: >
|
||||
sudo apt-get update -y -qq &&
|
||||
sudo apt-get install -y -qq llvm libclang-dev
|
||||
|
||||
|
||||
- name: Check all targets
|
||||
run: |
|
||||
cargo check --workspace --all-targets --no-default-features
|
||||
cargo check --workspace --all-targets --no-default-features --features ctaphid
|
||||
cargo check --workspace --all-targets --no-default-features --features ccid
|
||||
cargo check --workspace --all-targets
|
||||
cargo check --workspace --all-targets --all-features
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: Check clippy lints
|
||||
run: cargo clippy --all-features --all-targets -- --deny warnings
|
||||
|
||||
- name: Check documentation
|
||||
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
|
||||
Reference in New Issue
Block a user