-
Notifications
You must be signed in to change notification settings - Fork 11
42 lines (40 loc) · 1.4 KB
/
main.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
name: CI
on: [push]
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: cargo check --all
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
test:
name: Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install wasmtime
run: |
set -e
curl -L https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz | tar xJf -
echo "$PWD/wasmtime-${WASMTIME_VERSION}-x86_64-linux" >> $GITHUB_PATH
env:
WASMTIME_VERSION: v0.34.0
- name: Install wasi-sdk
run: |
set -e
wasi_sdk_deb="wasi-sdk_${WASI_SDK_VERSION_MAJOR}.${WASI_SDK_VERSION_MINOR}_amd64.deb"
wget "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION_MAJOR}/${wasi_sdk_deb}"
sudo dpkg -i "$wasi_sdk_deb"
echo "WASI_SDK_PATH=/opt/wasi-sdk" >> $GITHUB_ENV
env:
WASI_SDK_VERSION_MAJOR: 20
WASI_SDK_VERSION_MINOR: 0
- run: CARGO_TARGET_WASM32_WASI_RUNNER=wasmtime cargo test --target wasm32-wasi
- run: cargo build --target wasm32-unknown-unknown
- run: LIB_WASI_VFS_A=$PWD/target/wasm32-unknown-unknown/debug/libwasi_vfs.a ./tools/run-make-test.sh