Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 1 | clean: |
| 2 | rm -rf ../../out/canvaskit_wasm |
Kevin Lubick | 3d99b1e | 2018-10-16 10:15:01 -0400 | [diff] [blame] | 3 | rm -rf ./canvaskit/bin |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 4 | $(MAKE) release |
| 5 | |
| 6 | release: |
| 7 | # Does an incremental build where possible. |
| 8 | ./compile.sh |
Kevin Lubick | 3d99b1e | 2018-10-16 10:15:01 -0400 | [diff] [blame] | 9 | mkdir -p ./canvaskit/bin |
| 10 | cp ../../out/canvaskit_wasm/canvaskit.js ./canvaskit/bin |
| 11 | cp ../../out/canvaskit_wasm/canvaskit.wasm ./canvaskit/bin |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 12 | |
Kevin Lubick | 5b90b84 | 2018-10-17 07:57:18 -0400 | [diff] [blame] | 13 | release_cpu: |
| 14 | # Does an incremental build where possible. |
Kevin Lubick | b07204a | 2018-11-20 14:07:42 -0500 | [diff] [blame] | 15 | ./compile.sh cpu_only |
Kevin Lubick | 5b90b84 | 2018-10-17 07:57:18 -0400 | [diff] [blame] | 16 | mkdir -p ./canvaskit/bin |
| 17 | cp ../../out/canvaskit_wasm/canvaskit.js ./canvaskit/bin |
| 18 | cp ../../out/canvaskit_wasm/canvaskit.wasm ./canvaskit/bin |
| 19 | |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 20 | debug: |
| 21 | # Does an incremental build where possible. |
| 22 | ./compile.sh debug |
Kevin Lubick | 3d99b1e | 2018-10-16 10:15:01 -0400 | [diff] [blame] | 23 | mkdir -p ./canvaskit/bin |
| 24 | cp ../../out/canvaskit_wasm_debug/canvaskit.js ./canvaskit/bin |
| 25 | cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./canvaskit/bin |
Kevin Lubick | a96ec09 | 2018-12-17 11:08:36 -0500 | [diff] [blame] | 26 | cp ../../out/canvaskit_wasm_debug/canvaskit.wasm.map ./canvaskit/bin |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 27 | |
Kevin Lubick | 5b90b84 | 2018-10-17 07:57:18 -0400 | [diff] [blame] | 28 | debug_cpu: |
| 29 | # Does an incremental build where possible. |
Kevin Lubick | b07204a | 2018-11-20 14:07:42 -0500 | [diff] [blame] | 30 | ./compile.sh debug cpu_only |
Kevin Lubick | 5b90b84 | 2018-10-17 07:57:18 -0400 | [diff] [blame] | 31 | mkdir -p ./canvaskit/bin |
| 32 | cp ../../out/canvaskit_wasm_debug/canvaskit.js ./canvaskit/bin |
| 33 | cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./canvaskit/bin |
Kevin Lubick | a96ec09 | 2018-12-17 11:08:36 -0500 | [diff] [blame] | 34 | cp ../../out/canvaskit_wasm_debug/canvaskit.wasm.map ./canvaskit/bin |
Kevin Lubick | 5b90b84 | 2018-10-17 07:57:18 -0400 | [diff] [blame] | 35 | |
Kevin Lubick | f9910ea | 2018-12-03 14:49:15 -0500 | [diff] [blame] | 36 | profile: |
| 37 | ./compile.sh profiling |
| 38 | mkdir -p ./canvaskit/bin |
| 39 | cp ../../out/canvaskit_wasm_profile/canvaskit.js ./canvaskit/bin |
| 40 | cp ../../out/canvaskit_wasm_profile/canvaskit.wasm ./canvaskit/bin |
| 41 | cp ../../out/canvaskit_wasm_profile/canvaskit.wasm.map ./canvaskit/bin |
| 42 | |
| 43 | profile_cpu: |
| 44 | ./compile.sh profiling cpu_only |
| 45 | mkdir -p ./canvaskit/bin |
| 46 | cp ../../out/canvaskit_wasm_profile/canvaskit.js ./canvaskit/bin |
| 47 | cp ../../out/canvaskit_wasm_profile/canvaskit.wasm ./canvaskit/bin |
| 48 | cp ../../out/canvaskit_wasm_profile/canvaskit.wasm.map ./canvaskit/bin |
| 49 | |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 50 | local-example: |
Kevin Lubick | 3d99b1e | 2018-10-16 10:15:01 -0400 | [diff] [blame] | 51 | rm -rf node_modules/canvaskit |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 52 | mkdir -p node_modules |
Kevin Lubick | 3d99b1e | 2018-10-16 10:15:01 -0400 | [diff] [blame] | 53 | ln -s -T ../canvaskit node_modules/canvaskit |
| 54 | echo "Go check out http://localhost:8000/canvaskit/example.html" |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 55 | python serve.py |
Kevin Lubick | 3d99b1e | 2018-10-16 10:15:01 -0400 | [diff] [blame] | 56 | |
| 57 | test-continuous: |
| 58 | echo "Assuming npm install has been run by user" |
| 59 | echo "Also assuming make debug or release has also been run by a user (if needed)" |
Kevin Lubick | 5b90b84 | 2018-10-17 07:57:18 -0400 | [diff] [blame] | 60 | npx karma start ./karma.conf.js --no-single-run --watch-poll |
| 61 | |
| 62 | node-example: |
Kevin Lubick | e5a06e7 | 2018-11-07 10:43:42 -0500 | [diff] [blame] | 63 | node ./canvaskit/node.example.js --expose-wasm |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 64 | |
| 65 | docker-compile: |
| 66 | mkdir -p ${SKIA_ROOT}/out/canvaskit_wasm_docker |
| 67 | docker run --rm --volume ${SKIA_ROOT}:/SRC \ |
| 68 | --volume ${SKIA_ROOT}/out/canvaskit_wasm_docker:/OUT \ |
| 69 | gcr.io/skia-public/canvaskit-emsdk:1.38.27_v1 \ |
| 70 | /SRC/infra/canvaskit/build_canvaskit.sh |