diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..094e802 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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