2018-09-20 21:39:31 +00:00
|
|
|
clean:
|
|
|
|
rm -rf ../../out/canvaskit_wasm
|
2021-02-23 14:40:07 +00:00
|
|
|
rm -rf ./npm_build/bin
|
2018-09-20 21:39:31 +00:00
|
|
|
$(MAKE) release
|
|
|
|
|
|
|
|
release:
|
|
|
|
# Does an incremental build where possible.
|
|
|
|
./compile.sh
|
2021-02-23 14:40:07 +00:00
|
|
|
mkdir -p ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin
|
2018-09-20 21:39:31 +00:00
|
|
|
|
2018-10-17 11:57:18 +00:00
|
|
|
release_cpu:
|
|
|
|
# Does an incremental build where possible.
|
2018-11-20 19:07:42 +00:00
|
|
|
./compile.sh cpu_only
|
2021-02-23 14:40:07 +00:00
|
|
|
mkdir -p ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin
|
2018-10-17 11:57:18 +00:00
|
|
|
|
2020-03-25 16:50:35 +00:00
|
|
|
release_viewer:
|
|
|
|
# Does an incremental build where possible.
|
|
|
|
./compile.sh viewer
|
2021-02-23 14:40:07 +00:00
|
|
|
mkdir -p ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin
|
2020-03-25 16:50:35 +00:00
|
|
|
|
2018-09-20 21:39:31 +00:00
|
|
|
debug:
|
|
|
|
# Does an incremental build where possible.
|
|
|
|
./compile.sh debug
|
2021-02-23 14:40:07 +00:00
|
|
|
mkdir -p ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm_debug/canvaskit.js ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./npm_build/bin
|
|
|
|
#cp ../../out/canvaskit_wasm_debug/canvaskit.wasm.map ./npm_build/bin
|
2018-09-20 21:39:31 +00:00
|
|
|
|
2018-10-17 11:57:18 +00:00
|
|
|
debug_cpu:
|
|
|
|
# Does an incremental build where possible.
|
2018-11-20 19:07:42 +00:00
|
|
|
./compile.sh debug cpu_only
|
2021-02-23 14:40:07 +00:00
|
|
|
mkdir -p ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm_debug/canvaskit.js ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./npm_build/bin
|
|
|
|
#cp ../../out/canvaskit_wasm_debug/canvaskit.wasm.map ./npm_build/bin
|
2018-10-17 11:57:18 +00:00
|
|
|
|
2020-06-30 22:08:44 +00:00
|
|
|
experimental_simd:
|
|
|
|
# Does an incremental build where possible.
|
|
|
|
./compile.sh simd
|
2021-02-23 14:40:07 +00:00
|
|
|
mkdir -p ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm_experimental_simd/canvaskit.js ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm_experimental_simd/canvaskit.wasm ./npm_build/bin
|
2020-06-30 22:08:44 +00:00
|
|
|
|
2020-03-25 16:50:35 +00:00
|
|
|
debug_viewer:
|
|
|
|
# Does an incremental build where possible.
|
|
|
|
./compile.sh debug viewer
|
2021-02-23 14:40:07 +00:00
|
|
|
mkdir -p ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm_debug/canvaskit.js ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./npm_build/bin
|
2020-03-25 16:50:35 +00:00
|
|
|
|
2018-12-03 19:49:15 +00:00
|
|
|
profile:
|
|
|
|
./compile.sh profiling
|
2021-02-23 14:40:07 +00:00
|
|
|
mkdir -p ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm_profile/canvaskit.js ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm_profile/canvaskit.wasm ./npm_build/bin
|
2018-12-03 19:49:15 +00:00
|
|
|
|
2020-01-06 13:11:52 +00:00
|
|
|
npm:
|
2021-02-23 14:40:07 +00:00
|
|
|
rm -rf ./npm_build/bin
|
|
|
|
mkdir -p ./npm_build/bin
|
|
|
|
cp ./CHANGELOG.md ./npm_build/
|
|
|
|
|
|
|
|
mkdir -p ./npm_build/bin/full
|
|
|
|
./compile.sh release
|
|
|
|
cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin/full
|
|
|
|
cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin/full
|
|
|
|
|
2020-01-06 13:11:52 +00:00
|
|
|
# These features are turned off to keep code size smaller for the
|
|
|
|
# general use case.
|
2020-07-20 14:33:32 +00:00
|
|
|
./compile.sh release no_skottie no_particles no_rt_shader no_alias_font no_effects_deserialization
|
2021-02-23 14:40:07 +00:00
|
|
|
cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin
|
|
|
|
cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin
|
2020-01-06 13:11:52 +00:00
|
|
|
|
2021-02-23 14:40:07 +00:00
|
|
|
mkdir -p ./npm_build/bin/profiling
|
|
|
|
./compile.sh profiling
|
|
|
|
cp ../../out/canvaskit_wasm_profile/canvaskit.js ./npm_build/bin/profiling
|
|
|
|
cp ../../out/canvaskit_wasm_profile/canvaskit.wasm ./npm_build/bin/profiling
|
2018-12-03 19:49:15 +00:00
|
|
|
|
2021-01-07 18:03:18 +00:00
|
|
|
gm_tests_debug:
|
|
|
|
./compile_gm.sh debug
|
|
|
|
mkdir -p ./out
|
|
|
|
cp ../../out/wasm_gm_tests_debug/wasm_gm_tests.js ./out
|
|
|
|
cp ../../out/wasm_gm_tests_debug/wasm_gm_tests.wasm ./out
|
|
|
|
|
2020-10-08 14:05:07 +00:00
|
|
|
gm_tests:
|
|
|
|
./compile_gm.sh
|
|
|
|
mkdir -p ./out
|
|
|
|
cp ../../out/wasm_gm_tests/wasm_gm_tests.js ./out
|
|
|
|
cp ../../out/wasm_gm_tests/wasm_gm_tests.wasm ./out
|
|
|
|
|
2018-09-20 21:39:31 +00:00
|
|
|
local-example:
|
2018-10-16 14:15:01 +00:00
|
|
|
rm -rf node_modules/canvaskit
|
2018-09-20 21:39:31 +00:00
|
|
|
mkdir -p node_modules
|
2021-02-23 14:40:07 +00:00
|
|
|
ln -s ../npm_build node_modules/canvaskit
|
|
|
|
echo "Go check out http://localhost:8000/npm_build/example.html"
|
2018-09-20 21:39:31 +00:00
|
|
|
python serve.py
|
2018-10-16 14:15:01 +00:00
|
|
|
|
|
|
|
test-continuous:
|
2021-02-23 14:40:07 +00:00
|
|
|
echo "Assuming npm ci has been run by user"
|
2018-10-16 14:15:01 +00:00
|
|
|
echo "Also assuming make debug or release has also been run by a user (if needed)"
|
2018-10-17 11:57:18 +00:00
|
|
|
npx karma start ./karma.conf.js --no-single-run --watch-poll
|
|
|
|
|
2020-05-20 21:24:30 +00:00
|
|
|
test-continuous-headless:
|
|
|
|
npx karma start ./karma.conf.js --no-single-run --watch-poll --headless
|
|
|
|
|
2018-10-17 11:57:18 +00:00
|
|
|
node-example:
|
2021-02-23 14:40:07 +00:00
|
|
|
node ./npm_build/node.example.js --expose-wasm
|
2019-02-22 15:04:06 +00:00
|
|
|
|
|
|
|
docker-compile:
|
|
|
|
mkdir -p ${SKIA_ROOT}/out/canvaskit_wasm_docker
|
|
|
|
docker run --rm --volume ${SKIA_ROOT}:/SRC \
|
|
|
|
--volume ${SKIA_ROOT}/out/canvaskit_wasm_docker:/OUT \
|
2020-08-20 14:47:34 +00:00
|
|
|
gcr.io/skia-public/canvaskit-emsdk:2.0.0_v1 \
|
2019-02-22 15:04:06 +00:00
|
|
|
/SRC/infra/canvaskit/build_canvaskit.sh
|
2020-10-06 14:39:10 +00:00
|
|
|
|
|
|
|
typecheck:
|
2021-02-23 14:40:07 +00:00
|
|
|
echo "Make sure you've run cd npm_build && npm ci recently"
|
|
|
|
cd npm_build && npm run dtslint
|