@@ -3,12 +3,13 @@ name: Test
3
3
on :
4
4
push :
5
5
branches :
6
- - master
6
+ - master
7
7
paths-ignore :
8
- - ' *.mkd'
9
- - ' LICENSE'
8
+ - ' *.mkd'
9
+ - ' LICENSE'
10
10
pull_request :
11
11
types : [opened, reopened, synchronize]
12
+ workflow_dispatch :
12
13
13
14
jobs :
14
15
native-test :
32
33
- name : Install Rust ${{ matrix.rust_toolchain }}
33
34
uses : actions-rs/toolchain@v1
34
35
with :
35
- toolchain : ${{ matrix.rust_toolchain }}
36
- profile : minimal
37
- default : true
36
+ toolchain : ${{ matrix.rust_toolchain }}
37
+ profile : minimal
38
+ default : true
38
39
- name : Test ${{ matrix.manifest}} with ${{ matrix.mode }}
39
40
uses : actions-rs/cargo@v1
40
41
with :
@@ -71,10 +72,10 @@ jobs:
71
72
install : ${{ matrix.package }}
72
73
- uses : actions-rs/toolchain@v1
73
74
with :
74
- toolchain : stable
75
- profile : minimal
76
- default : true
77
- target : ${{ matrix.rust_target }}
75
+ toolchain : stable
76
+ profile : minimal
77
+ default : true
78
+ target : ${{ matrix.rust_target }}
78
79
- uses : actions-rs/cargo@v1
79
80
with :
80
81
command : test
@@ -111,10 +112,10 @@ jobs:
111
112
- name : Install Rust
112
113
uses : actions-rs/toolchain@v1
113
114
with :
114
- toolchain : ${{ matrix.rust_toolchain }}
115
- profile : minimal
116
- target : ${{ matrix.rust_target }}
117
- default : true
115
+ toolchain : ${{ matrix.rust_toolchain }}
116
+ profile : minimal
117
+ target : ${{ matrix.rust_target }}
118
+ default : true
118
119
- uses : actions-rs/cargo@v1
119
120
with :
120
121
command : test
@@ -153,16 +154,16 @@ jobs:
153
154
- name : Install Rust
154
155
uses : actions-rs/toolchain@v1
155
156
with :
156
- toolchain : nightly
157
- profile : minimal
158
- target : ${{ matrix.rust_target }}
159
- default : true
157
+ toolchain : nightly
158
+ profile : minimal
159
+ target : ${{ matrix.rust_target }}
160
+ default : true
161
+ - name : Install cross
162
+ run : |
163
+ cargo install cross --git https://github.com/cross-rs/cross
160
164
- name : Test
161
- uses : actions-rs/cargo@v1
162
- with :
163
- use-cross : true
164
- command : test
165
- args : --target ${{ matrix.rust_target }} --manifest-path=${{ matrix.manifest }} ${{ matrix.mode }} -- --test-threads=1 --nocapture
165
+ run : |
166
+ cross test --target ${{ matrix.rust_target }} --manifest-path=${{ matrix.manifest }} ${{ matrix.mode }} -- --test-threads=1 --nocapture
166
167
167
168
native-build :
168
169
name : Build ${{ matrix.manifest }} to ${{ matrix.rust_target }} on nightly
@@ -181,10 +182,10 @@ jobs:
181
182
- name : Install Rust
182
183
uses : actions-rs/toolchain@v1
183
184
with :
184
- toolchain : nightly
185
- profile : minimal
186
- target : ${{ matrix.rust_target }}
187
- default : true
185
+ toolchain : nightly
186
+ profile : minimal
187
+ target : ${{ matrix.rust_target }}
188
+ default : true
188
189
- name : Build ${{ matrix.rust_target }}
189
190
uses : actions-rs/cargo@v1
190
191
with :
@@ -220,10 +221,10 @@ jobs:
220
221
- name : Install Rust nightly
221
222
uses : actions-rs/toolchain@v1
222
223
with :
223
- toolchain : nightly
224
- profile : minimal
225
- target : ${{ matrix.rust_target }}
226
- default : true
224
+ toolchain : nightly
225
+ profile : minimal
226
+ target : ${{ matrix.rust_target }}
227
+ default : true
227
228
- name : Build ${{ matrix.rust_target }}
228
229
uses : actions-rs/cargo@v1
229
230
with :
@@ -248,10 +249,10 @@ jobs:
248
249
- name : Install Rust
249
250
uses : actions-rs/toolchain@v1
250
251
with :
251
- toolchain : ${{ matrix.rust_toolchain }}
252
- profile : minimal
253
- target : ${{ matrix.rust_target }}
254
- default : true
252
+ toolchain : ${{ matrix.rust_toolchain }}
253
+ profile : minimal
254
+ target : ${{ matrix.rust_target }}
255
+ default : true
255
256
- name : Build
256
257
uses : actions-rs/cargo@v1
257
258
with :
@@ -268,7 +269,7 @@ jobs:
268
269
- x86_64-pc-windows-msvc
269
270
- i686-pc-windows-msvc
270
271
manifest : ['psm/Cargo.toml', 'Cargo.toml']
271
- xwin_version : [" 0.1.6" ]
272
+ xwin_version : [' 0.1.6' ]
272
273
timeout-minutes : 10
273
274
steps :
274
275
- uses : actions/checkout@v2
@@ -297,17 +298,17 @@ jobs:
297
298
xwin --accept-license 1 splat --output /tmp/xwin
298
299
- name : Test
299
300
env :
300
- CC : " clang-cl"
301
- CXX : " clang-cl"
302
- AR : " llvm-lib"
303
- CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER : " lld-link"
304
- CARGO_TARGET_I686_PC_WINDOWS_MSVC_LINKER : " lld-link"
301
+ CC : ' clang-cl'
302
+ CXX : ' clang-cl'
303
+ AR : ' llvm-lib'
304
+ CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER : ' lld-link'
305
+ CARGO_TARGET_I686_PC_WINDOWS_MSVC_LINKER : ' lld-link'
305
306
# Note that we only disable unused-command-line-argument here since clang-cl
306
307
# doesn't implement all of the options supported by cl, but the ones it doesn't
307
308
# are _generally_ not interesting.
308
- CFLAGS : " -Wno-unused-command-line-argument -fuse-ld=lld-link /imsvc/tmp/xwin/crt/include /imsvc/tmp/xwin/sdk/include/ucrt /imsvc/tmp/xwin/sdk/include/um /imsvc/tmp/xwin/sdk/include/shared"
309
+ CFLAGS : ' -Wno-unused-command-line-argument -fuse-ld=lld-link /imsvc/tmp/xwin/crt/include /imsvc/tmp/xwin/sdk/include/ucrt /imsvc/tmp/xwin/sdk/include/um /imsvc/tmp/xwin/sdk/include/shared'
309
310
# Inform the linker where to search for libraries
310
- RUSTFLAGS : " -Lnative=/tmp/xwin/crt/lib/x86_64 -Lnative=/tmp/xwin/sdk/lib/um/x86_64 -Lnative=/tmp/xwin/sdk/lib/ucrt/x86_64"
311
+ RUSTFLAGS : ' -Lnative=/tmp/xwin/crt/lib/x86_64 -Lnative=/tmp/xwin/sdk/lib/um/x86_64 -Lnative=/tmp/xwin/sdk/lib/ucrt/x86_64'
311
312
run : |
312
313
set -eux
313
314
cargo build --target ${{ matrix.rust_target }} --manifest-path ${{ matrix.manifest }}
@@ -321,9 +322,9 @@ jobs:
321
322
- name : Install Rust nightly
322
323
uses : actions-rs/toolchain@v1
323
324
with :
324
- toolchain : nightly
325
- default : true
326
- target : wasm32-wasi
325
+ toolchain : nightly
326
+ default : true
327
+ target : wasm32-wasi
327
328
- run : |
328
329
curl -Lf https://github.com/bytecodealliance/wasmtime/releases/download/v24.0.0/wasmtime-v24.0.0-x86_64-linux.tar.xz | tar xJf - -C ${{ runner.tool_cache }}
329
330
echo "${{ runner.tool_cache }}/wasmtime-v24.0.0-x86_64-linux" >> $GITHUB_PATH
0 commit comments