@@ -17,72 +17,42 @@ jobs:
17
17
style :
18
18
runs-on : ubuntu-latest
19
19
steps :
20
- - uses : actions/checkout@v2
21
- - uses : actions-rs/toolchain@v1
22
- with :
23
- toolchain : stable
24
- target : thumbv7em-none-eabihf
25
- override : true
26
- - uses : Swatinem/rust-cache@v1
27
- - name : cargo fmt --check
28
- uses : actions-rs/cargo@v1
29
- with :
30
- command : fmt
31
- args : --all -- --check
32
- - uses : actions-rs/clippy-check@v1
20
+ - uses : actions/checkout@v4
21
+ - uses : Swatinem/rust-cache@v2
22
+
23
+ - uses : dtolnay/rust-toolchain@stable
33
24
with :
34
- token : ${{ secrets.GITHUB_TOKEN }}
25
+ targets : thumbv7em-none-eabihf
26
+ components : rustfmt, clippy
27
+
28
+ - run : cargo fmt --all -- --check
29
+ - run : cargo check
30
+
31
+ - run : cargo clippy --all-features -- -D warnings
35
32
36
33
compile :
37
34
runs-on : ubuntu-latest
38
- continue-on-error : ${{ matrix.toolchain == 'nightly' }}
39
- strategy :
40
- max-parallel : 2
41
- matrix :
42
- toolchain :
43
- - stable
44
35
steps :
45
36
- uses : actions/checkout@v2
46
37
47
- - name : Install Rust ${{ matrix.toolchain }}
48
- uses : actions-rs/toolchain@v1
38
+ - uses : dtolnay/rust-toolchain@stable
49
39
with :
50
- toolchain : ${{ matrix.toolchain }}
51
- target : thumbv7em-none-eabihf
52
- override : true
40
+ targets : thumbv7em-none-eabihf
53
41
components : llvm-tools-preview
54
42
55
- - uses : Swatinem/rust-cache@v1
56
- if : ${{ matrix.toolchain != 'nightly' }}
57
-
58
- - name : Install Binutils
59
- uses : actions-rs/cargo@v1
60
- with :
61
- command : install
62
- args : cargo-binutils
43
+ - uses : Swatinem/rust-cache@v2
63
44
64
- - name : Build [Debug]
65
- uses : actions-rs/cargo@v1
66
- with :
67
- command : build
45
+ - run : cargo install cargo-binutils
68
46
69
- - name : Build [Release]
70
- uses : actions-rs/cargo@v1
71
- with :
72
- command : build
73
- args : --release
47
+ - run : cargo build
48
+ - run : cargo build --release
74
49
75
50
- name : Extract Binary
76
- uses : actions-rs/cargo@v1
77
- with :
78
- command : objcopy
79
- args : --release --verbose -- -O binary booster-release.bin
51
+ run : cargo objcopy --release --verbose -- -O binary booster-release.bin
80
52
81
53
- name : Upload Artifacts
82
- uses : actions/upload-artifact@v2
83
- if : ${{ matrix.toolchain == 'stable'
84
- && (github.ref == 'refs/heads/master'
85
- || github.ref == 'refs/heads/develop') }}
54
+ uses : actions/upload-artifact@v4
55
+ if : (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
86
56
with :
87
57
name : Firmware Images
88
58
path : |
0 commit comments