-
Notifications
You must be signed in to change notification settings - Fork 27
39 lines (34 loc) · 935 Bytes
/
wasm.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
name: Wasm build and test
on:
push:
branches:
- "**" # target all branches
pull_request:
branches:
- master
env:
CARGO_TERM_COLOR: always
RUST_LOG: debug
RUST_BACKTRACE: full
jobs:
wasm_with_nodejs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Install rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Build the wasm module
working-directory: ./wasm-crypto
run: wasm-pack build --target nodejs
- name: Run the tests
working-directory: ./wasm-crypto
run: node js-bindings/node-entry.js