1818 - name : Checkout
1919 uses : actions/checkout@v3
2020
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-
2921 - 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
3423
3524 # Run cargo test
3625 test :
@@ -49,20 +38,14 @@ jobs:
4938 uses : actions/checkout@v3
5039
5140 - 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 }}
5745
5846 - 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 }}
6649
6750 # Compilation
6851 build :
@@ -98,18 +81,14 @@ jobs:
9881 uses : actions/checkout@v3
9982
10083 - 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 }}
10688
10789 - 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 }}
11392
11493 # Examples
11594 examples :
@@ -146,18 +125,14 @@ jobs:
146125 uses : actions/checkout@v3
147126
148127 - 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 }}
154132
155133 - 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 }}
161136
162137 # Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
163138 #
0 commit comments