Add additional CI checks #546
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 --all --verbose | |
- name: Build All Features | |
run: cargo build --all --all-features --verbose | |
- name: Run tests | |
run: cargo test --all --all-features --verbose | |
- name: Check docs | |
run: cargo doc --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 --all --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: clippy | |
- name: Format | |
run: cargo fmt --all -- --check |