Skip to content

Commit 6870074

Browse files
committed
ci: check can use the same template
1 parent 4ada824 commit 6870074

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,38 +33,36 @@ jobs:
3333
- name: cargo xtask fmt
3434
run: cargo xtask --verbose fmt -c
3535

36-
# Compilation check (lm3s6965)
37-
checklm3s6965:
36+
# Compilation check
37+
# TODO: check hifive1, esp32-c3
38+
check:
3839
name: check (lm3s6965)
3940
runs-on: ubuntu-22.04
4041
strategy:
4142
matrix:
42-
backend:
43-
- thumbv7
44-
- thumbv6
45-
- thumbv8-base
46-
- thumbv8-main
47-
toolchain:
48-
- stable
43+
input:
44+
- backend: thumbv7
45+
rustup-target: thumbv7m-none-eabi
46+
47+
- backend: thumbv6
48+
rustup-target: thumbv6m-none-eabi
49+
50+
- backend: thumbv8-base
51+
rustup-target: thumbv8m.base-none-eabi
52+
53+
- backend: thumbv8-main
54+
rustup-target: thumbv8m.main-none-eabi
4955
steps:
5056
- name: Checkout
5157
uses: actions/checkout@v4
5258

53-
- name: Install Rust ${{ matrix.toolchain }}
54-
run: |
55-
rustup override set ${{ matrix.toolchain }}
56-
5759
- name: Configure Rust target (v6, v7, v8.b v8.m)
58-
run: |
59-
rustup target add thumbv7m-none-eabi
60-
rustup target add thumbv6m-none-eabi
61-
rustup target add thumbv8m.base-none-eabi
62-
rustup target add thumbv8m.main-none-eabi
60+
run: rustup target add ${{ matrix.input.rustup-target }}
6361

6462
- name: Cache Dependencies
6563
uses: Swatinem/rust-cache@v2
6664

67-
- run: cargo xtask --deny-warnings --platform lm3s6965 --backend ${{ matrix.backend }} check
65+
- run: cargo xtask --deny-warnings --platform lm3s6965 --backend ${{ matrix.input.backend }} check
6866

6967
# Compilation check (hifive1) TODO
7068
# checkhifive1:
@@ -743,8 +741,7 @@ jobs:
743741
if: github.event_name == 'push' && success()
744742
needs:
745743
- formatcheck
746-
- checklm3s6965
747-
# - checkhifive1 # TODO
744+
- check
748745
- clippy
749746
- checkexamples
750747
- testexamples

0 commit comments

Comments
 (0)