18
18
- name : Checkout
19
19
uses : actions/checkout@v3
20
20
21
- - name : Install Rust
22
- uses : actions-rs/toolchain@v1
23
- with :
24
- profile : minimal
25
- toolchain : stable
26
- override : true
27
- components : rustfmt
28
-
29
21
- name : cargo fmt --check
30
- uses : actions-rs/cargo@v1
31
- with :
32
- command : fmt
33
- args : --all -- --check
22
+ run : cargo fmt --all --check
34
23
35
24
# Run cargo test
36
25
test :
@@ -49,20 +38,14 @@ jobs:
49
38
uses : actions/checkout@v3
50
39
51
40
- name : Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
52
- uses : actions-rs/toolchain@v1
53
- with :
54
- toolchain : ${{ matrix.toolchain }}
55
- target : ${{ matrix.target }}
56
- override : true
41
+ run : |
42
+ rustup set profile minimal
43
+ rustup override set ${{ matrix.toolchain }}
44
+ rustup target add ${{ matrix.target }}
57
45
58
46
- name : cargo test the documentation and readme
59
- uses : actions-rs/cargo@v1
60
- with :
61
- command : test
62
- # We use `--no-default-features` because compiling `defmt` for non-embedded targets
63
- # doesn't work.
64
- args : --target=${{ matrix.target }} --no-default-features --features ${{ matrix.features }}
65
-
47
+ run : |
48
+ cargo test --target=${{ matrix.target }} --no-default-features --features ${{ matrix.features }}
66
49
67
50
# Compilation
68
51
build :
@@ -98,18 +81,14 @@ jobs:
98
81
uses : actions/checkout@v3
99
82
100
83
- name : Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
101
- uses : actions-rs/toolchain@v1
102
- with :
103
- toolchain : ${{ matrix.toolchain }}
104
- target : ${{ matrix.target }}
105
- override : true
84
+ run : |
85
+ rustup set profile minimal
86
+ rustup override set ${{ matrix.toolchain }}
87
+ rustup target add ${{ matrix.target }}
106
88
107
89
- name : cargo build
108
- uses : actions-rs/cargo@v1
109
- with :
110
- use-cross : false
111
- command : build
112
- args : --target=${{ matrix.target }} --features ${{ matrix.features }}
90
+ run : |
91
+ cargo build --release --target=${{ matrix.target }} --features ${{ matrix.features }}
113
92
114
93
# Examples
115
94
examples :
@@ -146,18 +125,14 @@ jobs:
146
125
uses : actions/checkout@v3
147
126
148
127
- name : Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
149
- uses : actions-rs/toolchain@v1
150
- with :
151
- toolchain : ${{ matrix.toolchain }}
152
- target : ${{ matrix.target }}
153
- override : true
128
+ run : |
129
+ rustup set profile minimal
130
+ rustup override set ${{ matrix.toolchain }}
131
+ rustup target add ${{ matrix.target }}
154
132
155
133
- name : Build example ${{ matrix.example.name }} for ${{ matrix.mcu }}
156
- uses : actions-rs/cargo@v1
157
- with :
158
- use-cross : false
159
- command : build
160
- args : --release --target=${{ matrix.target }} --example ${{ matrix.example.example}} --features ${{ matrix.mcu }},${{ matrix.example.features }}
134
+ run : |
135
+ cargo build --release --target=${{ matrix.target }} --example ${{ matrix.example.example}} --features ${{ matrix.mcu }},${{ matrix.example.features }}
161
136
162
137
# Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
163
138
#
0 commit comments