-
Notifications
You must be signed in to change notification settings - Fork 27
114 lines (109 loc) · 3.56 KB
/
wasm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: ci-wasm
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "17 3 * * *"
env:
CARGO_TERM_COLOR: always
INLINE_IGNORE_PATTERN: "drop_in_place|::fmt::"
jobs:
test-wasm32-wasip1:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
toolchain: [stable, beta, nightly]
features:
[
"",
"--features std",
"--features public_imp",
"--features std,public_imp",
]
rustflags: ["-D warnings", "-D warnings -C target-feature=+simd128"]
target: [wasm32-wasip1]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
targets: ${{ matrix.target }}
- name: Setup Wasmer
uses: wasmerio/[email protected]
- name: Install WASM Runner
run: cargo install wasm-runner
- name: Run tests
run: cargo test --no-default-features ${{ matrix.features }} --target ${{ matrix.target }} --all-targets --verbose
env:
RUSTFLAGS: ${{ matrix.rustflags }}
CARGO_TARGET_WASM32_WASIP1_RUNNER: wasm-runner wasmer
WASM_RUNNER_VERBOSE: 1
test-inlining-wasm32:
runs-on: macos-latest
strategy:
matrix:
target: [wasm32-wasip1, wasm32-unknown-unknown]
defaults:
run:
working-directory: inlining
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.target }}
- name: Install rustfilt
run: cargo install rustfilt
- name: Check if the expected fns are inlined
env:
RUSTFLAGS: "-C target-feature=+simd128"
run: |
./check-inlining.sh ${{ matrix.target }} expected-methods-wasm32-simd128.txt
./check-inlining.sh ${{ matrix.target }} expected-methods-wasm32-simd128.txt --no-default-features
./check-inlining.sh ${{ matrix.target }} expected-methods-wasm32-simd128.txt "--features public_imp"
cross-build-wasm32-unknown:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ["1.38.0", stable, beta, nightly]
features:
[
"",
"--features std",
"--features public_imp",
"--features std,public_imp",
]
rustflags: ["-D warnings", "-D warnings -C target-feature=+simd128"]
target: [wasm32-unknown-unknown]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
targets: ${{ matrix.target }}
- name: Run build
run: cargo build --no-default-features ${{ matrix.features }} --target ${{ matrix.target }} --verbose
env:
RUSTFLAGS: ${{ matrix.rustflags }}
clippy_check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest, macos-13]
target: [wasm32-wasip1, wasm32-unknown-unknown]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
targets: ${{ matrix.target }}
- name: Clippy - all features enabled
run: cargo clippy --target ${{ matrix.target }} --all-targets --all-features
env:
RUSTFLAGS: "-D warnings"
- name: Clippy - all features disabled
run: cargo clippy --target ${{ matrix.target }} --all-targets --no-default-features
env:
RUSTFLAGS: "-D warnings"