-
Notifications
You must be signed in to change notification settings - Fork 8
50 lines (41 loc) · 1.42 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Cancel any in-flight jobs for the same PR/branch so there's only one active at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Install wasm32-unknown-unknown target
run: rustup target add wasm32-unknown-unknown
- name: Install wasm32-wasi target
run: rustup target add wasm32-wasi
- name: Install cargo-wasi
run: cargo install cargo-wasi
- name: Install wit-bindgen
run: cargo install --git https://github.com/bytecodealliance/wit-bindgen wit-bindgen-cli --rev 60e3c5b41e616fee239304d92128e117dd9be0a7
- run: |
curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16/wasi-sdk-16.0-linux.tar.gz -L | tar xzvf - -C $GITHUB_WORKSPACE/
echo "$GITHUB_WORKSPACE/wasi-sdk-16.0/bin" >> $GITHUB_PATH
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install mypy wasmtime
- name: Test cpp build
run: make cpp-debug cpp-release
working-directory: ./examples
- name: Test rust build
run: make rust-debug rust-release
working-directory: ./examples