11
11
CARGO_TERM_COLOR : always
12
12
13
13
jobs :
14
- build :
14
+ msrv :
15
15
16
16
runs-on : ubuntu-latest
17
17
@@ -21,13 +21,23 @@ jobs:
21
21
with :
22
22
profile : minimal
23
23
toolchain : nightly
24
- override : true
25
24
target : thumbv7em-none-eabihf
26
- components : clippy, rustfmt
27
25
28
26
- name : Checkout Sources
29
27
uses : actions/checkout@v2
30
28
29
+ - name : Cache Cargo Dependencies
30
+ uses : actions/cache@v2
31
+ with :
32
+ path : |
33
+ - ~/.cargo/bin/
34
+ - ~/.cargo/registry/index/
35
+ - ~/.cargo/registry/cache/
36
+ - ~/.cargo/git/db/
37
+ key : ${{ runner.OS }}-cargo-msrv-${{ hashFiles('**/Cargo.lock') }}
38
+ restore-keys : |
39
+ ${{ runner.OS }}-cargo-msrv
40
+
31
41
- name : install cargo-msrv
32
42
uses : actions-rs/install@v0.1
33
43
with :
@@ -42,21 +52,90 @@ jobs:
42
52
cargo msrv --verify --path ./ep-systick -- cargo check
43
53
cargo msrv --verify --path ./ep-dwt -- cargo check
44
54
45
- - name : Check Formatting
46
- run : cargo fmt --check
55
+ build :
56
+
57
+ runs-on : ubuntu-latest
58
+ env :
59
+ CARGO_BUILD_TARGET : thumbv7em-none-eabihf
60
+ RUSTFLAGS : -D warnings
61
+
62
+ steps :
63
+ - name : Install Rust (thumbv7em)
64
+ uses : actions-rs/toolchain@v1
65
+ with :
66
+ profile : minimal
67
+ toolchain : nightly
68
+ override : true
69
+ target : thumbv7em-none-eabihf
70
+
71
+ - name : Checkout Sources
72
+ uses : actions/checkout@v2
73
+
74
+ - name : Cache Cargo Dependencies
75
+ uses : actions/cache@v2
76
+ with :
77
+ path : |
78
+ - ~/.cargo/bin/
79
+ - ~/.cargo/registry/index/
80
+ - ~/.cargo/registry/cache/
81
+ - ~/.cargo/git/db/
82
+ key : ${{ runner.OS }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
83
+ restore-keys : |
84
+ ${{ runner.OS }}-cargo-build
85
+
86
+ - name : Cache Build Output Dependencies
87
+ uses : actions/cache@v2
88
+ with :
89
+ path : target
90
+ key : ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
91
+ restore-keys : |
92
+ ${{ runner.OS }}-build-
47
93
48
94
- name : Build (default)
49
- env :
50
- CARGO_BUILD_TARGET : thumbv7em-none-eabihf
51
- RUSTFLAGS : -D warnings
52
95
run : cargo build
53
96
54
97
- name : Build (all features)
55
- env :
56
- CARGO_BUILD_TARGET : thumbv7em-none-eabihf
57
- RUSTFLAGS : -D warnings
58
98
run : cargo build --all-features
59
99
100
+ test :
101
+ runs-on : ubuntu-latest
102
+
103
+ steps :
104
+ - name : Install Rust (thumbv7em)
105
+ uses : actions-rs/toolchain@v1
106
+ with :
107
+ profile : minimal
108
+ toolchain : nightly
109
+ override : true
110
+ target : thumbv7em-none-eabihf
111
+ components : clippy, rustfmt
112
+
113
+ - name : Checkout Sources
114
+ uses : actions/checkout@v2
115
+
116
+ - name : Cache Cargo Dependencies
117
+ uses : actions/cache@v2
118
+ with :
119
+ path : |
120
+ - ~/.cargo/bin/
121
+ - ~/.cargo/registry/index/
122
+ - ~/.cargo/registry/cache/
123
+ - ~/.cargo/git/db/
124
+ key : ${{ runner.OS }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
125
+ restore-keys : |
126
+ ${{ runner.OS }}-cargo-test
127
+
128
+ - name : Cache Build Output Dependencies
129
+ uses : actions/cache@v2
130
+ with :
131
+ path : target
132
+ key : ${{ runner.OS }}-test-${{ hashFiles('**/Cargo.lock') }}
133
+ restore-keys : |
134
+ ${{ runner.OS }}-test
135
+
136
+ - name : Check Formatting
137
+ run : cargo fmt --check
138
+
60
139
- name : test all crates
61
140
env :
62
141
RUSTFLAGS : -D warnings
0 commit comments