22 lines
585 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
2023-03-20 08:54:20 +02:00
SQLITE_WASM_VERSION="v0.18.1"
2023-03-20 08:54:20 +02:00
set -o errexit -o nounset -o pipefail
# set current working directory to script directory to run script from everywhere
cd "$(dirname "$0")"
2021-09-02 18:58:44 +03:00
# build test.wasm
marine build --release --bin test
# copy .wasm to artifacts
rm -f artifacts/*
mkdir -p artifacts
cp target/wasm32-wasi/release/test.wasm artifacts/
# download SQLite 3 to use in tests
2023-03-20 08:54:20 +02:00
if [[ ! -f artifacts/sqlite3.wasm ]]; then
curl -L https://github.com/fluencelabs/sqlite/releases/download/sqlite-wasm-${SQLITE_WASM_VERSION}/sqlite3.wasm -o artifacts/sqlite3.wasm
2023-03-20 08:54:20 +02:00
fi