33
33
command : fmt
34
34
args : --all -- --check
35
35
36
- # Compilation
36
+ # Run cargo test
37
+ test :
38
+ name : test
39
+ strategy :
40
+ matrix :
41
+ target :
42
+ - x86_64-unknown-linux-gnu
43
+ toolchain :
44
+ - stable
45
+ features :
46
+ - stm32f745,smi
47
+ runs-on : ubuntu-20.04
48
+ steps :
49
+ - name : Checkout
50
+ uses : actions/checkout@v3
51
+
52
+ - name : Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
53
+ uses : actions-rs/toolchain@v1
54
+ with :
55
+ toolchain : ${{ matrix.toolchain }}
56
+ target : ${{ matrix.target }}
57
+ override : true
58
+
59
+ - name : cargo test the documentation and readme
60
+ uses : actions-rs/cargo@v1
61
+ with :
62
+ command : test
63
+ args : --target=${{ matrix.target }} --features ${{ matrix.features }}
64
+
65
+
66
+ # Compilation
37
67
build :
38
68
name : build
39
69
runs-on : ubuntu-20.04
43
73
- x86_64-unknown-linux-gnu
44
74
toolchain :
45
75
- stable
46
- features :
76
+ features :
47
77
- stm32f107,smi
48
78
- stm32f407,smi
49
79
- stm32f417,smi
79
109
with :
80
110
use-cross : false
81
111
command : build
82
- args : --target=${{ matrix.target }} --features ${{ matrix.features }}
112
+ args : --target=${{ matrix.target }} --features ${{ matrix.features }}
83
113
84
114
# Examples
85
115
examples :
@@ -114,28 +144,28 @@ jobs:
114
144
with :
115
145
use-cross : false
116
146
command : build
117
- args : --target=${{ matrix.target }} --example ip --features stm32f429,smoltcp-phy,log,smoltcp/socket-tcp,smoltcp/socket-icmp,smoltcp/log,smoltcp/verbose
118
-
147
+ args : --target=${{ matrix.target }} --example ip --features stm32f429,smoltcp-phy,log,smoltcp/socket-tcp,smoltcp/socket-icmp,smoltcp/log,smoltcp/verbose
148
+
119
149
- name : cargo build f4 example arp
120
150
uses : actions-rs/cargo@v1
121
151
with :
122
152
use-cross : false
123
153
command : build
124
- args : --target=${{ matrix.target }} --example arp --features stm32f407,smi
125
-
154
+ args : --target=${{ matrix.target }} --example arp --features stm32f407,smi
155
+
126
156
- name : cargo build f4 example arp-smoltcp
127
157
uses : actions-rs/cargo@v1
128
158
with :
129
159
use-cross : false
130
160
command : build
131
161
args : --target=${{ matrix.target }} --example arp-smoltcp --features stm32f407,smi,smoltcp-phy,smoltcp/socket-icmp
132
-
162
+
133
163
- name : cargo build f1 example ip
134
164
uses : actions-rs/cargo@v1
135
165
with :
136
166
use-cross : false
137
167
command : build
138
- args : --target=${{ matrix.target }} --example ip-f107 --features stm32f107,smoltcp-phy,log,smoltcp/socket-tcp,smoltcp/socket-icmp,smoltcp/log,smoltcp/verbose
168
+ args : --target=${{ matrix.target }} --example ip-f107 --features stm32f107,smoltcp-phy,log,smoltcp/socket-tcp,smoltcp/socket-icmp,smoltcp/log,smoltcp/verbose
139
169
140
170
# Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
141
171
#
@@ -147,6 +177,7 @@ jobs:
147
177
needs :
148
178
- style
149
179
- build
180
+ - test
150
181
- examples
151
182
runs-on : ubuntu-20.04
152
183
steps :
0 commit comments