-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (58 loc) · 1.9 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
63
64
65
66
67
68
69
70
71
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install libosmesa-dev libsdl2-dev
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Update Rust
run: rustup update stable
- name: Check formatting
run: cargo fmt --all -- --check
- name: Check macro formatting
run: ./check_macro_fmt.bash
- name: Clippy each feature set
run: |
cargo clippy --all-targets
cargo clippy --all-targets --features "inline_tweak"
cargo clippy --all-targets --features "platform_opengl"
cargo clippy --all-targets --features "platform_sdl"
cargo clippy --all-targets --features "platform_osmesa"
cargo clippy --all-targets --features "platform_opengl default_font"
cargo clippy --all-targets --features "quickstart"
- name: Build
run: cargo build --verbose --all-targets --all-features
- name: Run tests
run: cargo test --verbose --all-targets --all-features
- name: Run doctests for each feature set
run: |
cargo test --doc
cargo test --doc --features "inline_tweak"
cargo test --doc --features "platform_opengl"
cargo test --doc --features "platform_sdl"
cargo test --doc --features "platform_osmesa"
cargo test --doc --features "platform_opengl default_font"
cargo test --doc --features "quickstart"
- name: Validate documentation
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: -Dwarnings