Skip to content

Commit

Permalink
Build Wasm demo Rust and JavaScript code in CI
Browse files Browse the repository at this point in the history
Fixes #315.
  • Loading branch information
mgeisler committed May 4, 2021
1 parent 0e4f3d0 commit f4b0560
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:

env:
CARGO_TERM_COLOR: always
NPM_CONFIG_COLOR: always
FORCE_COLOR: 3
RUSTFLAGS: -D warnings

jobs:
Expand Down Expand Up @@ -90,3 +92,25 @@ jobs:

- name: Lint for left-over debug prints
run: cargo clippy -- -D clippy::print_stdout -D clippy::print_stderr

wasm:
name: Build Wasm demo
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Build Rust code
run: wasm-pack build
working-directory: examples/wasm

- name: Install Npm dependencies
run: npm install
working-directory: examples/wasm/www

- name: Pack JavaScript and HTML
run: npm run build
working-directory: examples/wasm/www

0 comments on commit f4b0560

Please sign in to comment.