-
Notifications
You must be signed in to change notification settings - Fork 19
155 lines (125 loc) · 3.91 KB
/
test.yaml
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Rust CI
on:
push:
branches: ["**"]
pull_request:
branches: ["next", "main"]
jobs:
build-wasm:
name: Build wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain & Binaryen
run: rustup update && rustup target add wasm32-unknown-unknown && sudo apt-get install -y binaryen wabt
- name: Build wasm
run: ./examples/rust/build.sh
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: wasm
path: examples/rust/out
test-std:
needs: build-wasm
name: Test with default features on stable Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install latest stable Rust toolchain
run: rustup update stable
- name: Load wasm
uses: actions/download-artifact@v4
with:
name: wasm
path: examples/rust/out
- name: Build (stable)
run: cargo +stable build --workspace
- name: Run tests (stable)
run: cargo +stable test --workspace && cargo +stable run --example wasm-rust all
- name: Run MVP testsuite
run: cargo +stable test-wasm-1
- name: Run 2.0 testsuite
run: cargo +stable test-wasm-2
test-no-std:
needs: build-wasm
name: Test without default features on nightly Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install latest nightly Rust toolchain
run: rustup update nightly
- name: Load wasm
uses: actions/download-artifact@v4
with:
name: wasm
path: examples/rust/out
- name: Build (nightly, no default features)
run: cargo +nightly build --workspace --no-default-features
- name: Run tests (nightly, no default features)
run: cargo +nightly test --workspace --no-default-features && cargo +nightly run --example wasm-rust all
- name: Run MVP testsuite
run: cargo +nightly test-wasm-1
- name: Run 2.0 testsuite
run: cargo +nightly test-wasm-2
test-m1:
needs: build-wasm
name: Test on arm64 (Apple M1)
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable Rust toolchain
run: rustup update stable
- name: Load wasm
uses: actions/download-artifact@v4
with:
name: wasm
path: examples/rust/out
- name: Build (stable)
run: cargo +stable build
- name: Run tests (stable)
run: cargo +stable test
- name: Run MVP testsuite
run: cargo +stable test-wasm-1
- name: Run 2.0 testsuite
run: cargo +stable test-wasm-2
test-armv7:
needs: build-wasm
name: Test on armv7 (32-Bit Raspberry Pi)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Load wasm
uses: actions/download-artifact@v4
with:
name: wasm
path: examples/rust/out
- name: Run all tests (for the default workspace members)
uses: houseabsolute/[email protected]
with:
command: test
target: armv7-unknown-linux-gnueabihf
toolchain: nightly
- name: Run MVP testsuite
uses: houseabsolute/[email protected]
with:
command: test
args: "-p tinywasm --test test-wasm-1 --release"
target: armv7-unknown-linux-gnueabihf
toolchain: nightly
- name: Run 2.0 testsuite
uses: houseabsolute/[email protected]
with:
command: test
args: "-p tinywasm --test test-wasm-2 --release"
target: armv7-unknown-linux-gnueabihf
toolchain: nightly