-
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.45 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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build maximum configuration with all targets
run: cargo clippy --all-targets --features all-devices,client,server
# Temporarily disable dev-dependencies to verify that library compiles without them.
# Otherwise it's easy to miss accidental strong dependency on dev-dependencies.
- name: Disable dev-dependencies
run: sed -i 's/\[dev-dependencies]/[hide-dev-dependencies]/' Cargo.toml
- name: Build library with maximum configuration
run: cargo clippy --features all-devices,client,server
# Try couple of different combinations of features to make sure we didn't mess up with #[cfg(...)]
# Try all of them in succession rather than in Github matrix so that build cache is reused more easily.
- name: Build client+camera
run: cargo clippy --features client,camera
- name: Build client+telescope
run: cargo clippy --features client,telescope
- name: Build client+focuser
run: cargo clippy --features client,focuser
- name: Build server+camera
run: cargo clippy --features server,camera
- name: Build server+telescope
run: cargo clippy --features server,telescope
- name: Build server+focuser
run: cargo clippy --features server,focuser