-
Notifications
You must be signed in to change notification settings - Fork 57
62 lines (58 loc) · 1.75 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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