-
Notifications
You must be signed in to change notification settings - Fork 14
293 lines (278 loc) · 8.87 KB
/
ci.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
on:
push:
branches:
- main
tags:
- '**'
pull_request:
schedule:
- cron: "13 3 * * *"
name: CI
jobs:
build:
name: Build
runs-on: ubuntu-latest
env: {"RUSTFLAGS": "-D warnings"}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build
- run: cargo build --all-features
- run: cargo build -p testsuite
build_no_std:
name: Build no_std
runs-on: ubuntu-latest
env: {"RUSTFLAGS": "-D warnings"}
strategy:
matrix:
target:
- "thumbv6m-none-eabi"
- "thumbv7em-none-eabi"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} -p w5500-ll
- run: cargo build --target ${{ matrix.target }} -p w5500-hl
- run: cargo build --target ${{ matrix.target }} -p w5500-dhcp
- run: cargo build --target ${{ matrix.target }} -p w5500-dns
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp
- run: cargo build --target ${{ matrix.target }} -p w5500-tls
- run: cargo build --target ${{ matrix.target }} -p w5500-ll --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-hl --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-dhcp --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-dns --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-tls --features defmt
- run: cargo build --target ${{ matrix.target }} -p w5500-ll --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-hl --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-dhcp --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-dns --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-tls --features eh0,eh1
- run: cargo build --target ${{ matrix.target }} -p w5500-dhcp --features log
- run: cargo build --target ${{ matrix.target }} -p w5500-dns --features log
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt --features log
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp --features log
- run: cargo build --target ${{ matrix.target }} -p w5500-tls --features log
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp --features time
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp --features chrono
- run: cargo build --target ${{ matrix.target }} -p w5500-sntp --features num-rational
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt --features w5500-tls
- run: cargo build --target ${{ matrix.target }} -p w5500-ll --features eha1
- run: cargo build --target ${{ matrix.target }} -p w5500-tls --features p256-cm4
if: ${{ matrix.target == 'thumbv7em-none-eabi' }}
- run: cargo build --target ${{ matrix.target }} -p w5500-mqtt --features w5500-tls,p256-cm4
if: ${{ matrix.target == 'thumbv7em-none-eabi' }}
test:
name: Test
runs-on: ubuntu-latest
env: {"RUSTFLAGS": "-D warnings"}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test-all
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy --all-features --all-targets -- --deny warnings
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo +nightly fmt -- --check
rustdoc:
name: rustdoc
runs-on: ubuntu-latest
env: {"RUSTDOCFLAGS": "-D warnings --cfg docsrs"}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: rustdoc
run: |
cd dhcp
cargo +nightly rustdoc --all-features
cd ../dns
cargo +nightly rustdoc --all-features
cd ../hl
cargo +nightly rustdoc --all-features
cd ../ll
cargo +nightly rustdoc --all-features
cd ../mqtt
cargo +nightly rustdoc --all-features
cd ../regsim
cargo +nightly rustdoc --all-features
cd ../sntp
cargo +nightly rustdoc --all-features
release-ll:
name: w5500-ll crates.io release
if: startsWith(github.ref, 'refs/tags/ll/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd ll
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-hl:
name: w5500-hl crates.io release
if: startsWith(github.ref, 'refs/tags/hl/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd hl
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-dhcp:
name: w5500-dhcp crates.io release
if: startsWith(github.ref, 'refs/tags/dhcp/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd dhcp
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-regsim:
name: w5500-regsim crates.io release
if: startsWith(github.ref, 'refs/tags/regsim/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd regsim
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-dns:
name: w5500-dns crates.io release
if: startsWith(github.ref, 'refs/tags/dns/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd dns
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-mqtt:
name: w5500-mqtt crates.io release
if: startsWith(github.ref, 'refs/tags/mqtt/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd mqtt
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-sntp:
name: w5500-sntp crates.io release
if: startsWith(github.ref, 'refs/tags/sntp/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd sntp
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
release-tls:
name: w5500-tls crates.io release
if: startsWith(github.ref, 'refs/tags/tls/v')
needs:
- build
- build_no_std
- test
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Publish
run: |
cd tls
cargo publish --no-verify --token ${CRATES_IO_TOKEN}
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}