90
90
run : |
91
91
cargo build --release --target=${{ matrix.target }} --features ${{ matrix.features }}
92
92
93
- build-ptp :
93
+ build-no- ptp :
94
94
name : build-no-ptp
95
95
runs-on : ubuntu-20.04
96
96
strategy :
@@ -117,7 +117,8 @@ jobs:
117
117
run : |
118
118
cargo build --release --target=${{ matrix.target }} --features ${{ matrix.features }} --no-default-features
119
119
120
- # Examples
120
+ # Test that all of the examples compile
121
+ # for stm32f429
121
122
examples :
122
123
name : examples
123
124
runs-on : ubuntu-20.04
@@ -134,21 +135,48 @@ jobs:
134
135
features : smoltcp-phy
135
136
- example : rtic-timestamp
136
137
features : " "
138
+ - example : timesync-server
139
+ features : ptp
140
+ - example : timesync-client
141
+ features : ptp
142
+ toolchain :
143
+ - stable
144
+ target :
145
+ - thumbv7em-none-eabi
146
+ steps :
147
+ - name : Checkout
148
+ uses : actions/checkout@v3
149
+
150
+ - name : Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
151
+ run : |
152
+ rustup set profile minimal
153
+ rustup override set ${{ matrix.toolchain }}
154
+ rustup target add ${{ matrix.target }}
155
+
156
+ - name : Build example ${{ matrix.example.example }} for stm32f429
157
+ run : |
158
+ cargo build --release --target=${{ matrix.target }} --example ${{ matrix.example.example }} --features stm32f429,${{ matrix.example.features }}
159
+
160
+ # Test that all the code shared with other MCU families also compiles
161
+ examples-common :
162
+ name : examples-common
163
+ runs-on : ubuntu-20.04
164
+ strategy :
165
+ matrix :
166
+ toolchain :
167
+ - stable
168
+ target :
169
+ - thumbv7em-none-eabi
137
170
mcu :
138
171
- stm32f107
139
172
- stm32f429
140
173
- stm32f745
141
- toolchain :
142
- - stable
143
- target :
144
- - thumbv7m-none-eabi
145
174
pins :
146
175
- nucleo
147
176
- default
148
177
pps :
149
178
- default
150
179
- alternate
151
-
152
180
steps :
153
181
- name : Checkout
154
182
uses : actions/checkout@v3
@@ -159,9 +187,9 @@ jobs:
159
187
rustup override set ${{ matrix.toolchain }}
160
188
rustup target add ${{ matrix.target }}
161
189
162
- - name : Build example ${{ matrix.example.example }} for ${{ matrix.mcu }}, eth pins ${{ matrix.pins }}, pps pin ${{ matrix.pps }}
190
+ - name : Build examples common file for ${{ matrix.mcu }}, eth pins ${{ matrix.pins }}, pps pin ${{ matrix.pps }}
163
191
run : |
164
- STM32_ETH_EXAMPLE_PPS =${{ matrix.pps }} STM32_ETH_EXAMPLE_PINS=${{ matrix.pins }} cargo build --release --target=${{ matrix.target }} --example ${{ matrix.example.example}} --features ${{ matrix.mcu }},${{ matrix.example.features }}
192
+ STM32_ETH_EXAMPLE_PPS_PIN =${{ matrix.pps}} STM32_ETH_EXAMPLE_PINS=${{ matrix.pins }} cargo check --release --target=${{ matrix.target }} --example common --features ${{ matrix.mcu }},defmt,smoltcp-phy,ptp
165
193
166
194
# Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
167
195
#
@@ -175,6 +203,8 @@ jobs:
175
203
- build
176
204
- test
177
205
- examples
206
+ - examples-common
207
+ - build-no-ptp
178
208
runs-on : ubuntu-20.04
179
209
steps :
180
210
- name : Mark the job as a success
0 commit comments