Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WASM library code #163

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Rust

on:
push:
branches: [master, dev]
branches: [ master, dev ]
pull_request:
branches: [master, dev]
branches: [ master, dev ]

jobs:
format:
Expand Down Expand Up @@ -152,6 +152,38 @@ jobs:
./target/release/wormhole-rs.exe
if-no-files-found: error

wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Add wasm-pack
uses: jetli/[email protected]
- name: Cache ~/.cargo
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-wasm-dotcargo
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-test-wasm-target
- name: Build wasm
run: wasm-pack build ./wasm
- name: Pack wasm for npm
run: wasm-pack pack ./wasm
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: wormhole-wasm-${{ github.sha }}
path: ./wasm/pkg/magic-wormhole-wasm-*.tgz
if-no-files-found: error

coverage:
runs-on: ubuntu-latest
steps:
Expand Down
Loading