File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -euxo pipefail
3
+
4
+ need () {
5
+ if ! command -v " $1 " > /dev/null 2>&1 ; then
6
+ echo " need $1 (command not found)"
7
+ exit 1
8
+ fi
9
+ }
10
+
11
+ cargo clippy -- -D warnings
12
+ cargo fmt --all -- --check
13
+
14
+ FEATURE_SETS=(
15
+ " --features=alloc,std,ubx_proto23"
16
+ " --no-default-features --features=alloc,ubx_proto23"
17
+ " --no-default-features --features=ubx_proto23"
18
+ " --no-default-features --features=ubx_proto27"
19
+ )
20
+
21
+ for features in " ${FEATURE_SETS[@]} " ; do
22
+ cargo build ${features}
23
+ cargo test ${features}
24
+ done
25
+
26
+ # Examples - using a subshell to isolate directory changes
27
+ (
28
+ cd examples || exit 1
29
+ cargo build --release
30
+ cargo fmt --all -- --check
31
+ cargo clippy --all-targets -- -D warnings
32
+ cargo hack check --rust-version --workspace
33
+ )
34
+
35
+
36
+ need cargo-hack
37
+ cargo hack check --rust-version --workspace
38
+ (
39
+ cd examples || exit 1
40
+ cargo hack check --rust-version --workspace
41
+ )
You can’t perform that action at this time.
0 commit comments