-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (48 loc) · 1.49 KB
/
ci.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
name: CI
on: pull_request
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- build: x86_64-linux
os: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup update stable --no-self-update
- run: rustup default stable
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
smoke-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download and install wasi-sdk
run: |
cd /opt
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sdk-24.0-x86_64-linux.tar.gz
tar zxvf wasi-sdk-24.0-x86_64-linux.tar.gz
ln -s wasi-sdk-24.0-x86_64-linux wasi-sdk
- name: Download and install wasmtime
run: |
cd /opt
wget https://github.com/bytecodealliance/wasmtime/releases/download/v25.0.2/wasmtime-v25.0.2-x86_64-linux.tar.xz
tar Jxvf wasmtime-v25.0.2-x86_64-linux.tar.xz
ln -s `pwd`/wasmtime-v25.0.2-x86_64-linux/wasmtime /usr/local/bin/
- name: Build
run: cargo build --release
- name: Build and run base 'simple' test
run: make -C tests/simple run-base
- name: Build and run wevaled 'simple' test
run: make -C tests/simple run-wevaled