-
Notifications
You must be signed in to change notification settings - Fork 58
37 lines (35 loc) · 1.15 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Rust
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build:
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-dev libxcb1-dev libx11-xcb-dev libgl1-mesa-dev
- name: Install rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- 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
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Check Formatting (rustfmt)
run: cargo fmt --all -- --check