Files
wehub-resource-sync f73e710e38
Build site and push to gh-pages / Build site (push) Waiting to run
Build / build (push) Waiting to run
Linter / lint (push) Waiting to run
Security / dependency-review (push) Waiting to run
Security / npm-audit (push) Waiting to run
Security / codeql (push) Waiting to run
Tests / test (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 12:42:51 +08:00

22 lines
637 B
Bash
Executable File

#!/bin/bash
# This file prepares all the necessary dependencies for the web build.
set -euxo pipefail
emcc --version
npm --version
TVM_SOURCE_DIR_SET="${TVM_SOURCE_DIR:-}"
if [[ -z ${TVM_SOURCE_DIR_SET} ]]; then
if [[ ! -d "3rdparty/tvm-unity" ]]; then
echo "Do not find TVM_SOURCE_DIR env variable, cloning a version as source".
git clone https://github.com/mlc-ai/relax 3rdparty/tvm-unity --recursive
fi
export TVM_SOURCE_DIR="${TVM_SOURCE_DIR:-3rdparty/tvm-unity}"
fi
cd ${TVM_SOURCE_DIR}/web && make && npm install && npm run build && cd -
rm -rf tvm_home
ln -s ${TVM_SOURCE_DIR} tvm_home
npm install