2023-08-09 23:48:02 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-11-10 23:36:07 +00:00
|
|
|
|
2022-07-22 01:30:53 +00:00
|
|
|
set -ex
|
2022-03-16 23:57:30 +00:00
|
|
|
|
2023-08-09 23:16:23 +00:00
|
|
|
REPO_DIR=$(git rev-parse --show-toplevel)
|
2020-11-10 23:36:07 +00:00
|
|
|
|
2023-07-21 01:39:08 +00:00
|
|
|
# Webassembly stuff
|
|
|
|
#
|
|
|
|
# The wasm-pack command does not correctly pass args to cargo so we cannot use --locked and test
|
|
|
|
# with per-commited lockfiles (recent/minimal). Just run the WASM tests from here instead.
|
|
|
|
if [ "$DO_WASM" = true ]; then
|
|
|
|
clang --version
|
|
|
|
CARGO_TARGET_DIR=wasm cargo install --force wasm-pack
|
|
|
|
printf '\n[lib]\ncrate-type = ["cdylib", "rlib"]\n' >> Cargo.toml
|
|
|
|
CC=clang wasm-pack build
|
|
|
|
CC=clang wasm-pack test --node
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2023-07-20 00:53:01 +00:00
|
|
|
$REPO_DIR/contrib/_test.sh
|