name: Build
on: [push, pull_request]
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libclang-dev clang llvm
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Cargo Check
run: cargo check
- name: Cargo Check Example
run: cargo check --manifest-path example/Cargo.toml
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libclang-dev clang llvm
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Cargo Test
run: cargo test
- name: Cargo Test Example
run: cargo test --manifest-path example/Cargo.toml
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Cargo Fmt
run: cargo fmt --all -- --check
- name: Cargo Fmt Example
run: cargo fmt --manifest-path example/Cargo.toml --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libclang-dev clang llvm
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cargo Clippy
run: cargo clippy -- -D warnings
- name: Cargo Clippy Example
run: cargo clippy --manifest-path example/Cargo.toml -- -D warnings
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libclang-dev clang llvm
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Cargo Build
run: cargo build
- name: Cargo Build Example
run: cargo build --manifest-path example/Cargo.toml