-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly run wasm32-unknown-unknown tests on CI
- Loading branch information
Showing
5 changed files
with
50 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM ubuntu:18.04 | ||
|
||
RUN apt-get update -y && apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
clang \ | ||
cmake \ | ||
curl \ | ||
git \ | ||
libc6-dev \ | ||
make \ | ||
python \ | ||
xz-utils | ||
|
||
# Install `wasm2wat` | ||
RUN git clone --recursive https://github.com/WebAssembly/wabt | ||
RUN make -C wabt -j$(nproc) | ||
ENV PATH=$PATH:/wabt/bin | ||
|
||
# Install `node` | ||
RUN curl https://nodejs.org/dist/v12.0.0/node-v12.0.0-linux-x64.tar.xz | tar xJf - | ||
ENV PATH=$PATH:/node-v12.0.0-linux-x64/bin | ||
|
||
COPY docker/wasm32-unknown-unknown/wasm-entrypoint.sh /wasm-entrypoint.sh | ||
ENTRYPOINT ["/wasm-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
set -ex | ||
|
||
# Download an appropriate version of wasm-bindgen based off of what's being used | ||
# in the lock file. Ideally we'd use `wasm-pack` at some point for this! | ||
version=$(grep -A 1 'name = "wasm-bindgen"' Cargo.lock | grep version) | ||
version=$(echo $version | awk '{print $3}' | sed 's/"//g') | ||
curl -L https://github.com/rustwasm/wasm-bindgen/releases/download/$version/wasm-bindgen-$version-x86_64-unknown-linux-musl.tar.gz \ | ||
| tar xzf - -C target | ||
export PATH=$PATH:`pwd`/target/wasm-bindgen-$version-x86_64-unknown-linux-musl | ||
export CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER=wasm-bindgen-test-runner | ||
export NODE_ARGS=--experimental-wasm-simd | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters