forked from kcl-lang/kcl
-
Notifications
You must be signed in to change notification settings - Fork 2
32 lines (29 loc) · 926 Bytes
/
wasm_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
name: build-and-test-wasm
on: ["push", "pull_request"]
jobs:
build-and-test:
# Ref: https://github.com/actions/runner-images/tree/main/images/linux
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: "true"
- name: Install rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.79
override: true
components: clippy, rustfmt
- name: Unit test
working-directory: ./kclvm
run: |
rustup target add wasm32-wasi && make build-wasm
mv target/wasm32-wasi/release/kclvm_cli_cdylib.wasm target/wasm32-wasi/release/kcl.wasm
shell: bash
- uses: actions/upload-artifact@v4
with:
name: kcl-wasm
if-no-files-found: error
path: kclvm/target/wasm32-wasi/release/kcl.wasm