31
31
- name : cargo xtask fmt
32
32
run : cargo xtask --verbose fmt -c
33
33
34
- # Compilation check
35
- check :
36
- name : check
34
+ # Compilation check (lm3s6965)
35
+ checklm3s6965 :
36
+ name : check (lm3s6965)
37
37
runs-on : ubuntu-22.04
38
38
strategy :
39
39
matrix :
@@ -62,11 +62,14 @@ jobs:
62
62
- name : Cache Dependencies
63
63
uses : Swatinem/rust-cache@v2
64
64
65
- - run : cargo xtask --deny-warnings --backend ${{ matrix.backend }} check
65
+ - run : cargo xtask --deny-warnings --platform lm3s6965 -- backend ${{ matrix.backend }} check
66
66
67
- # Clippy
68
- clippy :
69
- name : clippy
67
+ # Compilation check (hifive1) TODO
68
+ # checkhifive1:
69
+
70
+ # Clippy (lm3s6965)
71
+ clippylm3s6965 :
72
+ name : clippy (lm3s6965)
70
73
runs-on : ubuntu-22.04
71
74
strategy :
72
75
matrix :
@@ -98,11 +101,14 @@ jobs:
98
101
- name : Cache Dependencies
99
102
uses : Swatinem/rust-cache@v2
100
103
101
- - run : cargo xtask --deny-warnings --backend ${{ matrix.backend }} clippy
104
+ - run : cargo xtask --deny-warnings --platform lm3s6965 --backend ${{ matrix.backend }} clippy
105
+
106
+ # Clippy (hifive1) TODO
107
+ # clippyhifive1:
102
108
103
- # Verify all examples, checks
104
- checkexamples :
105
- name : check examples
109
+ # Platform lm3s6965: verify all examples, checks
110
+ checkexampleslm3s6965 :
111
+ name : check examples (lm3s6965)
106
112
runs-on : ubuntu-22.04
107
113
strategy :
108
114
matrix :
@@ -133,44 +139,46 @@ jobs:
133
139
134
140
- name : Check the examples
135
141
if : ${{ matrix.backend == 'thumbv8-base' }}
136
- run : cargo xtask --backend ${{ matrix.backend }} --exampleexclude pool example-check
142
+ run : cargo xtask --platform lm3s6965 -- backend ${{ matrix.backend }} --exampleexclude pool example-check
137
143
138
144
- name : Check the examples
139
145
if : ${{ matrix.backend != 'thumbv8-base' }}
140
- run : cargo xtask --backend ${{ matrix.backend }} example-check
141
-
142
- # Check that the usage examples build
143
- usageexamples :
144
- name : Build usage examples
146
+ run : cargo xtask --platform lm3s6965 -- backend ${{ matrix.backend }} example-check
147
+
148
+ # Platform hifive1: verify all examples, checks
149
+ checkexampleshifive1 :
150
+ name : check examples (hifive1)
145
151
runs-on : ubuntu-22.04
146
152
strategy :
147
153
matrix :
154
+ backend :
155
+ - riscv32-imc-clint
156
+ - riscv32-imac-clint
148
157
toolchain :
149
158
- stable
150
159
steps :
151
160
- name : Checkout
152
161
uses : actions/checkout@v4
153
162
154
- - name : Install rust ${{ matrix.toolchain }}
163
+ - name : Install Rust ${{ matrix.toolchain }}
155
164
run : |
156
- rustup set profile minimal
157
165
rustup override set ${{ matrix.toolchain }}
158
166
159
- - name : Configure rust target (v6, v7)
167
+ - name : Configure Rust target
160
168
run : |
161
- rustup target add thumbv7em-none-eabihf
162
- rustup target add thumbv7m-none-eabi
163
- rustup target add thumbv6m-none-eabi
164
- rustup component add rust-src
169
+ rustup target add riscv32imac-unknown-none-elf
170
+ rustup target add riscv32imc-unknown-none-elf
165
171
166
172
- name : Cache Dependencies
167
173
uses : Swatinem/rust-cache@v2
168
-
169
- - name : Install flip-link
170
- run : cargo install flip-link
174
+
175
+ - name : Check the examples
176
+ if : ${{ matrix.backend == 'riscv32-imc-clint' }}
177
+ run : cargo xtask --platform hifive1 --backend ${{ matrix.backend }} --exampleexclude static example-check
171
178
172
179
- name : Check the examples
173
- run : cargo xtask usage-example-build
180
+ if : ${{ matrix.backend != 'riscv32-imc-clint' }}
181
+ run : cargo xtask --platform hifive1 --backend ${{ matrix.backend }} example-check
174
182
175
183
buildqemu :
176
184
name : Get modern QEMU, build and store
@@ -192,7 +200,7 @@ jobs:
192
200
- name : Install QEMU to get dependencies
193
201
run : |
194
202
sudo apt update
195
- sudo apt install -y qemu-system-arm
203
+ sudo apt install -y qemu-system-arm qemu-system-riscv32
196
204
sudo apt-get install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build
197
205
198
206
- if : ${{ steps.cache-qemu.outputs.cache-hit != 'true' }}
@@ -226,9 +234,9 @@ jobs:
226
234
name : qemu
227
235
path : qemu.tar
228
236
229
- # Verify the example output with run-pass tests
230
- testexamples :
231
- name : QEMU run
237
+ # Platform lm3s6965: verify the example output with run-pass tests
238
+ testexampleslm3s6965 :
239
+ name : QEMU run (lm3s6965)
232
240
needs : buildqemu
233
241
runs-on : ubuntu-22.04
234
242
strategy :
@@ -283,7 +291,71 @@ jobs:
283
291
which qemu-system-riscv32
284
292
285
293
- name : Run-pass tests
286
- run : cargo xtask --deny-warnings --backend ${{ matrix.backend }} qemu
294
+ run : cargo xtask --deny-warnings --platform lm3s6965 --backend ${{ matrix.backend }} qemu
295
+
296
+ # Platform hifive1: verify the example output with run-pass tests
297
+ testexampleshifive1 :
298
+ name : QEMU run (hifive1)
299
+ needs : buildqemu
300
+ runs-on : ubuntu-22.04
301
+ strategy :
302
+ matrix :
303
+ backend :
304
+ - riscv32-imc-clint
305
+ - riscv32-imac-clint
306
+ toolchain :
307
+ - stable
308
+ steps :
309
+ - name : Checkout
310
+ uses : actions/checkout@v4
311
+
312
+ - name : Install Rust ${{ matrix.toolchain }}
313
+ run : |
314
+ rustup set profile minimal
315
+ rustup override set ${{ matrix.toolchain }}
316
+
317
+ - name : Configure Rust target
318
+ run : |
319
+ rustup target add riscv32imac-unknown-none-elf
320
+ rustup target add riscv32imc-unknown-none-elf
321
+
322
+ - name : Add Rust component llvm-tools-preview
323
+ run : rustup component add llvm-tools-preview
324
+
325
+ # Use precompiled binutils
326
+ - name : Install cargo-binutils
327
+ uses : taiki-e/install-action@v2
328
+ with :
329
+ tool : cargo-binutils
330
+
331
+ - name : Cache Dependencies
332
+ uses : Swatinem/rust-cache@v2
333
+
334
+ - name : Install QEMU to get dependencies
335
+ run : |
336
+ sudo apt update
337
+ sudo apt install -y qemu-system-riscv32
338
+
339
+ - name : Download built QEMU
340
+ uses : actions/download-artifact@v4
341
+ with :
342
+ name : qemu
343
+
344
+ - name : Extract QEMU into local path
345
+ run : tar -xf qemu.tar -C /usr/local/bin
346
+
347
+ - name : Check which QEMU is used
348
+ run : |
349
+ which qemu-system-arm
350
+ which qemu-system-riscv32
351
+
352
+ - name : Run-pass tests
353
+ if : ${{ matrix.backend == 'riscv32-imc-clint' }}
354
+ run : cargo xtask --deny-warnings --platform hifive1 --backend ${{ matrix.backend }} --exampleexclude static qemu
355
+
356
+ - name : Run-pass tests
357
+ if : ${{ matrix.backend != 'riscv32-imc-clint' }}
358
+ run : cargo xtask --deny-warnings --platform hifive1 --backend ${{ matrix.backend }} qemu
287
359
288
360
# Run test suite
289
361
tests :
@@ -719,10 +791,14 @@ jobs:
719
791
if : github.event_name == 'push' && success()
720
792
needs :
721
793
- formatcheck
722
- - check
723
- - clippy
724
- - checkexamples
725
- - testexamples
794
+ - checklm3s6965
795
+ # checkhifive1 TODO
796
+ - clippylm3s6965
797
+ # clippyhifive1 TODO
798
+ - checkexampleslm3s6965
799
+ - checkexampleshifive1
800
+ - testexampleslm3s6965
801
+ - testexampleshifive1
726
802
- tests
727
803
- docs
728
804
- mdbook
0 commit comments