mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-30 16:38:08 +00:00
Add Emscripten build in Travis
This commit is contained in:
@@ -42,6 +42,22 @@ if [ -n "${CLIPPY}" ]; then
|
||||
|
||||
cd "$DIR/test_suite/no_std"
|
||||
cargo clippy -- -Dclippy
|
||||
elif [ -n "${EMSCRIPTEN}" ]; then
|
||||
CARGO_WEB_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/koute/cargo-web/releases/latest)
|
||||
CARGO_WEB_VERSION=$(echo "${CARGO_WEB_RELEASE}" | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')
|
||||
CARGO_WEB_URL="https://github.com/koute/cargo-web/releases/download/${CARGO_WEB_VERSION}/cargo-web-x86_64-unknown-linux-gnu.gz"
|
||||
|
||||
mkdir -p ~/.cargo/bin
|
||||
echo "Downloading cargo-web from: ${CARGO_WEB_URL}"
|
||||
curl -L "${CARGO_WEB_URL}" | gzip -d > ~/.cargo/bin/cargo-web
|
||||
chmod +x ~/.cargo/bin/cargo-web
|
||||
|
||||
# Install Node.js
|
||||
nvm install 9
|
||||
|
||||
cd "$DIR/test_suite"
|
||||
cargo web test --target=asmjs-unknown-emscripten --nodejs
|
||||
cargo web test --target=wasm32-unknown-emscripten --nodejs
|
||||
else
|
||||
CHANNEL=nightly
|
||||
cd "$DIR"
|
||||
|
||||
Reference in New Issue
Block a user