@@ -16,66 +16,34 @@ jobs:
16
16
runs-on : ${{ matrix.os }}
17
17
steps :
18
18
- uses : actions/checkout@v4
19
- - uses : actions-rs/toolchain@v1
20
- with :
21
- profile : minimal
22
- toolchain : stable
23
- override : true
24
- - uses : actions-rs/cargo@v1
25
- with :
26
- command : test
27
- args : --all
19
+ - run : rustup toolchain install stable --profile minimal --no-self-update
20
+ - run : cargo test --all
28
21
29
22
fmt :
30
23
name : Rustfmt
31
24
runs-on : ubuntu-latest
32
25
steps :
33
26
- uses : actions/checkout@v4
34
- - uses : actions-rs/toolchain@v1
35
- with :
36
- profile : minimal
37
- toolchain : stable
38
- override : true
39
- components : rustfmt
40
- - uses : actions-rs/cargo@v1
41
- with :
42
- command : fmt
43
- args : --all -- --check
27
+ - run : rustup toolchain install stable --profile minimal --no-self-update
28
+ - run : cargo fmt --all -- --check
44
29
45
30
clippy :
46
31
name : Clippy
47
32
runs-on : ubuntu-latest
48
33
steps :
49
34
- uses : actions/checkout@v4
50
- - uses : actions-rs/toolchain@v1
51
- with :
52
- profile : minimal
53
- toolchain : stable
54
- override : true
55
- components : clippy
56
- - uses : actions-rs/cargo@v1
57
- with :
58
- command : clippy
59
- args : --all -- -D warnings
35
+ - run : rustup toolchain install stable --profile minimal --no-self-update
36
+ - run : rustup component add clippy
37
+ - run : cargo clippy --all -- -D warnings
60
38
61
39
deny :
62
40
name : Cargo Deny
63
41
runs-on : ubuntu-latest
64
42
steps :
65
43
- uses : actions/checkout@v4
66
- - uses : actions-rs/toolchain@v1
67
- with :
68
- profile : minimal
69
- toolchain : stable
70
- override : true
71
- - uses : actions-rs/cargo@v1
72
- with :
73
- command : install
74
- args : cargo-deny
75
- - uses : actions-rs/cargo@v1
76
- with :
77
- command : deny
78
- args : check --hide-inclusion-graph license sources advisories
44
+ - run : rustup toolchain install stable --profile minimal --no-self-update
45
+ - run : cargo install cargo-deny --locked
46
+ - run : cargo deny check --hide-inclusion-graph license sources advisories
79
47
80
48
build :
81
49
name : Build
@@ -117,38 +85,21 @@ jobs:
117
85
sudo apt update
118
86
sudo apt install ${{ matrix.linker }}
119
87
88
+ - run : rustup toolchain install stable --profile minimal --no-self-update
89
+ # TODO: Consider https://github.com/Swatinem/rust-cache for caching of dependencies
90
+
120
91
- name : Build for non-Linux # Windows and MacOS
121
- uses : actions-rs/toolchain@v1
122
92
if : matrix.os != 'ubuntu-latest'
123
- with :
124
- profile : minimal
125
- toolchain : stable
126
- override : true
127
- - uses : actions-rs/cargo@v1
128
- if : matrix.os != 'ubuntu-latest'
129
- with :
130
- command : build
131
- args : -q --release
93
+ run : cargo build -q --release
132
94
133
- # https://github.com/actions-rs/cargo#cross-compilation
134
- - name : Build with cross # ARM builds
135
- uses : actions-rs/toolchain@v1
95
+ - run : rustup target add ${{ matrix.target }} --toolchain stable
136
96
if : matrix.cross
137
- with :
138
- profile : minimal
139
- toolchain : stable
140
- target : ${{ matrix.target }}
141
- override : true
142
- - uses : actions-rs/cargo@v1
97
+ - run : cargo install cross
143
98
if : matrix.cross
144
- with :
145
- use-cross : true
146
- command : build
147
- args : -q --release --target ${{ matrix.target }}
148
- # uses: ./.github/actions/linux-x86_64-musl/
149
- # if: matrix.cross
150
- # with:
151
- # args: cross build -q --release --target ${{ matrix.target }}
99
+
100
+ - name : Build with cross # ARM builds
101
+ if : matrix.cross
102
+ run : cross build -q --release --target ${{ matrix.target }}
152
103
153
104
- name : Build for Linux
154
105
uses : ./.github/actions/linux-x86_64-musl/
@@ -169,11 +120,7 @@ jobs:
169
120
test-directory : ./lib/${{ matrix.wasm-dirctory }}/tests
170
121
steps :
171
122
- uses : actions/checkout@v4
172
- - uses : actions-rs/toolchain@v1
173
- with :
174
- profile : minimal
175
- toolchain : stable
176
- override : true
123
+ - run : rustup toolchain install stable --profile minimal --no-self-update
177
124
178
125
- name : Create the Web Assembly
179
126
id : wasm_pack
0 commit comments