Skip to content

Commit

Permalink
CHANGE: Development target to emscripten
Browse files Browse the repository at this point in the history
Emscripten provides support for libc, which is needed for the
constriction crate. This requires the CD to also install the emsdk and
compiling to wasm32-unknown-emscripten instead of
wasm32-unknown-unknown.
  • Loading branch information
Conzel committed Aug 11, 2021
1 parent 9c2f61f commit 071a3e8
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ jobs:
- name: Run backend tests
run: CARGO_HOME=.cargo_home cargo test

- name: Setup emscripten (emsdk)
uses: mymindstorm/setup-emsdk@v9
with:
version: 1.39.20
actions-cache-folder: 'emsdk-cache'

- name: Verify emsdk
run: emcc -v

- name: Install wasm-pack 0.8.1
uses: jetli/wasm-pack-action@v0.3.0
with:
Expand All @@ -43,8 +52,16 @@ jobs:
# https://github.com/rustwasm/wasm-pack/issues/886
version: v0.8.1

- name: Install emscripten rustup target
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
target: wasm32-unknown-emscripten

- name: Build backend
run: cd wasm && CARGO_HOME=../.cargo_home wasm-pack build
run: cd wasm && CARGO_HOME=../.cargo_home cargo build --lib --release --target wasm32-unknown-emscripten

- name: Install node.js
uses: actions/setup-node@v1
Expand Down

0 comments on commit 071a3e8

Please sign in to comment.