@@ -7,163 +7,111 @@ jobs:
7
7
clippy-test :
8
8
runs-on : ubuntu-latest
9
9
steps :
10
- - uses : actions/checkout@v2
10
+ - uses : actions/checkout@v4
11
11
- name : Update apt
12
12
run : sudo apt update
13
13
- name : Install alsa
14
14
run : sudo apt-get install libasound2-dev
15
15
- name : Install libjack
16
16
run : sudo apt-get install libjack-jackd2-dev libjack-jackd2-0
17
17
- name : Install stable
18
- uses : actions-rs/ toolchain@v1
18
+ uses : dtolnay/rust- toolchain@stable
19
19
with :
20
- profile : minimal
21
- toolchain : stable
22
- override : true
23
20
components : clippy
24
21
target : armv7-linux-androideabi
25
22
- name : Run clippy
26
- uses : actions-rs/clippy-check@v1
27
- with :
28
- token : ${{ secrets.GITHUB_TOKEN }}
29
- args : --all --all-features
23
+ run : cargo clippy --all --all-features
30
24
- name : Run clippy for Android target
31
- uses : actions-rs/clippy-check@v1
32
- with :
33
- token : ${{ secrets.GITHUB_TOKEN }}
34
- args : --all --features asio --features oboe/fetch-prebuilt --target armv7-linux-androideabi
25
+ run : cargo clippy --all --features asio --features oboe/fetch-prebuilt --target armv7-linux-androideabi
35
26
36
27
rustfmt-check :
37
28
runs-on : ubuntu-latest
38
29
steps :
39
- - uses : actions/checkout@v2
30
+ - uses : actions/checkout@v4
40
31
- name : Install stable
41
- uses : actions-rs/ toolchain@v1
32
+ uses : dtolnay/rust- toolchain@stable
42
33
with :
43
- profile : minimal
44
- toolchain : stable
45
- override : true
46
34
components : rustfmt
47
35
- name : Run rustfmt
48
- uses : actions-rs/cargo@v1
49
- with :
50
- command : fmt
51
- args : --all -- --check
36
+ run : cargo fmt --all -- --check
52
37
53
38
cargo-publish :
54
39
if : github.event_name == 'push' && github.ref == 'refs/heads/master'
55
40
runs-on : ubuntu-latest
56
41
steps :
57
- - uses : actions/checkout@v3
42
+ - uses : actions/checkout@v4
58
43
- name : Install rust
59
- uses : actions-rs/toolchain@v1
60
- with :
61
- toolchain : stable
62
- profile : minimal
63
- override : true
44
+ uses : dtolnay/rust-toolchain@stable
64
45
- name : Update apt
65
46
run : sudo apt update
66
47
- name : Install alsa
67
48
run : sudo apt-get install libasound2-dev
68
49
- name : Verify publish crate
69
- uses : katyo/publish-crates@v1
50
+ uses : katyo/publish-crates@v2
70
51
with :
71
52
dry-run : true
72
53
ignore-unpublished-changes : true
73
54
- name : Publish crate
74
- uses : katyo/publish-crates@v1
55
+ uses : katyo/publish-crates@v2
75
56
with :
76
57
ignore-unpublished-changes : true
77
58
registry-token : ${{ secrets.CRATESIO_TOKEN }}
78
59
79
60
ubuntu-test :
80
61
runs-on : ubuntu-latest
81
62
steps :
82
- - uses : actions/checkout@v2
63
+ - uses : actions/checkout@v4
83
64
- name : Update apt
84
65
run : sudo apt update
85
66
- name : Install alsa
86
67
run : sudo apt-get install libasound2-dev
87
68
- name : Install libjack
88
69
run : sudo apt-get install libjack-jackd2-dev libjack-jackd2-0
89
70
- name : Install stable
90
- uses : actions-rs/toolchain@v1
91
- with :
92
- profile : minimal
93
- toolchain : stable
94
- override : true
71
+ uses : dtolnay/rust-toolchain@stable
95
72
- name : Run without features
96
- uses : actions-rs/cargo@v1
97
- with :
98
- command : test
99
- args : --all --no-default-features --verbose
73
+ run : cargo test --all --no-default-features --verbose
100
74
- name : Run all features
101
- uses : actions-rs/cargo@v1
102
- with :
103
- command : test
104
- args : --all --all-features --verbose
75
+ run : cargo test --all --all-features --verbose
105
76
106
77
linux-check-and-test-armv7 :
107
78
runs-on : ubuntu-latest
108
79
steps :
109
80
- name : Checkout sources
110
- uses : actions/checkout@v2
81
+ uses : actions/checkout@v4
111
82
112
83
- name : Install stable toolchain
113
- uses : actions-rs/ toolchain@v1
84
+ uses : dtolnay/rust- toolchain@stable
114
85
with :
115
- profile : minimal
116
- toolchain : stable
117
86
target : armv7-unknown-linux-gnueabihf
118
- override : true
119
87
120
- - name : Build image
121
- run : docker build -t cross/cpal_armv7:v1 ./
88
+ - name : Install cross
89
+ run : cargo install cross
122
90
123
91
- name : Check without features for armv7
124
- uses : actions-rs/cargo@v1
125
- with :
126
- command : check
127
- use-cross : true
128
- args : --target armv7-unknown-linux-gnueabihf --workspace --no-default-features --verbose
92
+ run : cross check --target armv7-unknown-linux-gnueabihf --workspace --no-default-features --verbose
129
93
130
94
- name : Test without features for armv7
131
- uses : actions-rs/cargo@v1
132
- with :
133
- command : test
134
- use-cross : true
135
- args : --target armv7-unknown-linux-gnueabihf --workspace --no-default-features --verbose
95
+ run : cross test --target armv7-unknown-linux-gnueabihf --workspace --no-default-features --verbose
136
96
137
97
- name : Check all features for armv7
138
- uses : actions-rs/cargo@v1
139
- with :
140
- command : check
141
- use-cross : true
142
- args : --target armv7-unknown-linux-gnueabihf --workspace --all-features --verbose
98
+ run : cross check --target armv7-unknown-linux-gnueabihf --workspace --all-features --verbose
143
99
144
100
- name : Test all features for armv7
145
- uses : actions-rs/cargo@v1
146
- with :
147
- command : test
148
- use-cross : true
149
- args : --target armv7-unknown-linux-gnueabihf --workspace --all-features --verbose
101
+ run : cross test --target armv7-unknown-linux-gnueabihf --workspace --all-features --verbose
150
102
151
103
asmjs-wasm32-test :
152
104
strategy :
153
105
matrix :
154
- target : [asmjs-unknown-emscripten, wasm32-unknown-emscripten]
106
+ target : [wasm32-unknown-emscripten]
155
107
runs-on : ubuntu-latest
156
108
steps :
157
- - uses : actions/checkout@v2
109
+ - uses : actions/checkout@v4
158
110
- name : Setup Emscripten toolchain
159
- uses : mymindstorm/setup-emsdk@v10
160
- with :
161
- version : 2.0.9 # https://github.com/rust-lang/rust/issues/85821
111
+ uses : mymindstorm/setup-emsdk@v14
162
112
- name : Install stable
163
- uses : actions-rs/ toolchain@v1
113
+ uses : dtolnay/rust- toolchain@stable
164
114
with :
165
- profile : minimal
166
- toolchain : stable
167
115
target : ${{ matrix.target }}
168
116
- name : Build beep example
169
117
run : cargo build --example beep --release --target ${{ matrix.target }}
@@ -177,12 +125,10 @@ jobs:
177
125
runs-on : ubuntu-latest
178
126
179
127
steps :
180
- - uses : actions/checkout@v1
128
+ - uses : actions/checkout@v4
181
129
- name : Install stable
182
- uses : actions-rs/ toolchain@v1
130
+ uses : dtolnay/rust- toolchain@stable
183
131
with :
184
- profile : minimal
185
- toolchain : stable
186
132
target : ${{ matrix.target }}
187
133
- name : Build beep example
188
134
run : cargo build --example beep --target ${{ matrix.target }} --features=wasm-bindgen
@@ -196,12 +142,10 @@ jobs:
196
142
runs-on : ubuntu-latest
197
143
198
144
steps :
199
- - uses : actions/checkout@v1
145
+ - uses : actions/checkout@v4
200
146
- name : Install stable
201
- uses : actions-rs/ toolchain@v1
147
+ uses : dtolnay/rust- toolchain@stable
202
148
with :
203
- profile : minimal
204
- toolchain : stable
205
149
target : ${{ matrix.target }}
206
150
- name : Build beep example
207
151
run : cargo build --example beep --target ${{ matrix.target }}
@@ -212,7 +156,7 @@ jobs:
212
156
version : [x86_64, i686]
213
157
runs-on : windows-latest
214
158
steps :
215
- - uses : actions/checkout@v2
159
+ - uses : actions/checkout@v4
216
160
- name : Install ASIO SDK
217
161
env :
218
162
LINK : https://www.steinberg.net/asiosdk
@@ -225,12 +169,9 @@ jobs:
225
169
- name : Install llvm and clang
226
170
run : choco install llvm
227
171
- name : Install stable
228
- uses : actions-rs/ toolchain@v1
172
+ uses : dtolnay/rust- toolchain@stable
229
173
with :
230
- profile : minimal
231
- toolchain : stable
232
174
target : ${{ matrix.version }}-pc-windows-msvc
233
- override : true
234
175
- name : Run without features
235
176
run : cargo test --all --no-default-features --verbose
236
177
- name : Run all features
@@ -241,15 +182,11 @@ jobs:
241
182
macos-test :
242
183
runs-on : macOS-latest
243
184
steps :
244
- - uses : actions/checkout@v2
185
+ - uses : actions/checkout@v4
245
186
- name : Install llvm and clang
246
187
run : brew install llvm
247
188
- name : Install stable
248
- uses : actions-rs/toolchain@v1
249
- with :
250
- profile : minimal
251
- toolchain : stable
252
- override : true
189
+ uses : dtolnay/rust-toolchain@stable
253
190
- name : Build beep example
254
191
run : cargo build --example beep
255
192
- name : Run without features
@@ -260,13 +197,10 @@ jobs:
260
197
android-check :
261
198
runs-on : ubuntu-latest
262
199
steps :
263
- - uses : actions/checkout@v2
264
- - name : Install stable
265
- uses : actions-rs/ toolchain@v1
200
+ - uses : actions/checkout@v4
201
+ - name : Install stable (Android target)
202
+ uses : dtolnay/rust- toolchain@stable
266
203
with :
267
- profile : minimal
268
- toolchain : stable
269
- override : true
270
204
target : armv7-linux-androideabi
271
205
- name : Check android
272
206
run : cargo check --example android --target armv7-linux-androideabi --features oboe/fetch-prebuilt --verbose
@@ -282,13 +216,14 @@ jobs:
282
216
android-apk-build :
283
217
runs-on : ubuntu-latest
284
218
steps :
285
- - uses : actions/checkout@v2
286
- - name : Install Android targets
219
+ - uses : actions/checkout@v4
220
+ - name : Install stable (Android targets)
221
+ uses : dtolnay/rust-toolchain@stable
222
+ with :
223
+ targets : armv7-linux-androideabi,aarch64-linux-android,i686-linux-android,x86_64-linux-android
224
+ - name : Set Up Android tools
287
225
run : |
288
- rustup target add armv7-linux-androideabi
289
- rustup target add aarch64-linux-android
290
- rustup target add i686-linux-android
291
- rustup target add x86_64-linux-android
226
+ ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT --install "platforms;android-30"
292
227
- name : Install Cargo APK
293
228
run : cargo install cargo-apk
294
229
- name : Build APK
@@ -297,17 +232,13 @@ jobs:
297
232
ios-build :
298
233
runs-on : macOS-latest
299
234
steps :
300
- - uses : actions/checkout@v2
235
+ - uses : actions/checkout@v4
301
236
- name : Install llvm and clang
302
237
run : brew install llvm
303
- - name : Install stable
304
- uses : actions-rs/ toolchain@v1
238
+ - name : Install stable (iOS targets)
239
+ uses : dtolnay/rust- toolchain@stable
305
240
with :
306
- profile : minimal
307
- toolchain : stable
308
- override : true
309
- - name : Add iOS targets
310
- run : rustup target add aarch64-apple-ios x86_64-apple-ios
241
+ targets : aarch64-apple-ios,x86_64-apple-ios
311
242
- name : Install cargo lipo
312
243
run : cargo install cargo-lipo
313
244
- name : Build iphonesimulator feedback example
@@ -320,9 +251,11 @@ jobs:
320
251
# It does not test the javascript/web integration
321
252
runs-on : ubuntu-latest
322
253
steps :
323
- - uses : actions/checkout@v2
324
- - name : Install Target
325
- run : rustup target add wasm32-unknown-unknown
254
+ - uses : actions/checkout@v4
255
+ - name : Install stable (wasm32 target)
256
+ uses : dtolnay/rust-toolchain@stable
257
+ with :
258
+ targets : wasm32-unknown-unknown
326
259
- name : Cargo Build
327
260
working-directory : ./examples/wasm-beep
328
261
run : cargo build --target wasm32-unknown-unknown
0 commit comments