Add additional CI checks #557
Workflow file for this run
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 | |
on: [push, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Build & Test | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
runs-on: ${{ matrix.os }} | |
env: | |
RUSTFLAGS: -D warnings | |
RUSTDOCFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install XCB and GL dependencies | |
if: contains(matrix.os, 'ubuntu') | |
run: sudo apt-get install libx11-xcb-dev libxcb-dri2-0-dev libgl1-mesa-dev libxcb-icccm4-dev libxcursor-dev | |
- name: Install rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Build Default | |
run: cargo build --workspace --all-targets --verbose | |
- name: Build All Features | |
run: cargo build --workspace --all-targets --all-features --verbose | |
- name: Run tests | |
run: cargo test --workspace --all-targets --all-features --verbose | |
- name: Check docs | |
run: cargo doc --examples --all-features --no-deps | |
clippy: | |
name: Clippy | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Install XCB and GL dependencies | |
if: contains(matrix.os, 'ubuntu') | |
run: sudo apt-get install libx11-xcb-dev libxcb-dri2-0-dev libgl1-mesa-dev libxcb-icccm4-dev libxcursor-dev | |
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
rustfmt: | |
name: Format check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: rustfmt | |
- name: Format | |
run: cargo fmt --all -- --check |