f73e710e38
Build / build (push) Has been cancelled
Tests / test (push) Has been cancelled
Build site and push to gh-pages / Build site (push) Has been cancelled
Linter / lint (push) Has been cancelled
Security / dependency-review (push) Has been cancelled
Security / npm-audit (push) Has been cancelled
Security / codeql (push) Has been cancelled
22 lines
637 B
Bash
Executable File
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
|