mirror of
https://git.unlock-music.dev/um/web.git
synced 2024-12-29 23:05:04 +08:00
ci: use emsdk instead of download emsdk each build.
This commit is contained in:
parent
79f1fd2b48
commit
e21456d38f
@ -4,12 +4,16 @@ type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build-wasm
|
||||
image: emscripten/emsdk:3.0.0
|
||||
commands:
|
||||
- ./scripts/build-wasm.sh
|
||||
|
||||
- name: build
|
||||
image: node:16.18-bullseye
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install -y cmake jq zip
|
||||
- ./scripts/build-wasm.sh
|
||||
- apt-get install -y jq zip
|
||||
- npm ci
|
||||
- npm run test
|
||||
- ./scripts/build-and-package.sh legacy
|
||||
|
@ -11,18 +11,20 @@ if [ -z "$BUILD_TYPE" ]; then
|
||||
BUILD_TYPE=Release
|
||||
fi
|
||||
|
||||
mkdir -p build/wasm
|
||||
# CI: already had emsdk installed.
|
||||
if ! command -v emcc; then
|
||||
if [ ! -d ../../build/emsdk ]; then
|
||||
git clone https://github.com/emscripten-core/emsdk.git ../../build/emsdk
|
||||
fi
|
||||
|
||||
pushd ../../build/emsdk
|
||||
#git pull
|
||||
./emsdk install 3.0.0
|
||||
./emsdk activate 3.0.0
|
||||
source ./emsdk_env.sh
|
||||
popd # ../../build/emsdk
|
||||
fi
|
||||
|
||||
mkdir -p build/wasm
|
||||
pushd build/wasm
|
||||
emcmake cmake -DCMAKE_BUILD_TYPE="$BUILD_TYPE" ../..
|
||||
make -j
|
||||
|
@ -11,7 +11,8 @@ if [ -z "$BUILD_TYPE" ]; then
|
||||
BUILD_TYPE=Release
|
||||
fi
|
||||
|
||||
mkdir -p build/wasm
|
||||
# CI: already had emsdk installed.
|
||||
if ! command -v emcc; then
|
||||
if [ ! -d ../../build/emsdk ]; then
|
||||
git clone https://github.com/emscripten-core/emsdk.git ../../build/emsdk
|
||||
fi
|
||||
@ -21,7 +22,9 @@ pushd ../../build/emsdk
|
||||
./emsdk activate 3.0.0
|
||||
source ./emsdk_env.sh
|
||||
popd # ../../build/emsdk
|
||||
fi
|
||||
|
||||
mkdir -p build/wasm
|
||||
pushd build/wasm
|
||||
emcmake cmake -DCMAKE_BUILD_TYPE="$BUILD_TYPE" ../..
|
||||
make -j
|
||||
|
Loading…
Reference in New Issue
Block a user