Reland "[pathkit] Reorganize to be more like CanvasKit"
This is a reland of e138730000
I fixed the tryjobs to move the compiled files into the right
location.
Original change's description:
> [pathkit] Reorganize to be more like CanvasKit
>
> Change-Id: I64226b57161f86277e0635592c2c11442888335a
> Bug: skia:8216
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502817
> Reviewed-by: Nathaniel Nifong <nifong@google.com>
Bug: skia:8216
Change-Id: I535f906b43816d3143e95ff9350ba20b998d817d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503826
Reviewed-by: Nathaniel Nifong <nifong@google.com>
This commit is contained in:
parent
1d9237e3c2
commit
cedcaeed01
@ -81,10 +81,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test"
|
||||
"[START_DIR]/skia/modules/pathkit/build/asmjs"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/build/asmjs",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -98,10 +98,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/pathkit.js",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js"
|
||||
"[START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.js [START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js",
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.js [START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -110,10 +110,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js"
|
||||
"[START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
|
@ -81,10 +81,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test"
|
||||
"[START_DIR]/skia/modules/pathkit/build/asmjs"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/build/asmjs",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -98,10 +98,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/pathkit.js",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js"
|
||||
"[START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.js [START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js",
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.js [START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -110,10 +110,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js"
|
||||
"[START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -128,10 +128,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test"
|
||||
"[START_DIR]/skia/modules/pathkit/build/asmjs"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test (2)",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/build/asmjs (2)",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -145,10 +145,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/pathkit.js.mem",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js.mem"
|
||||
"[START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js.mem"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.js.mem [START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js.mem",
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.js.mem [START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js.mem",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -157,10 +157,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js.mem"
|
||||
"[START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js.mem"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/npm-asmjs/bin/test/pathkit.js.mem",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/build/asmjs/pathkit.js.mem",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
|
@ -81,10 +81,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/build/wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -98,10 +98,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/pathkit.js",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.js"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm/pathkit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.js [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.js",
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.js [START_DIR]/skia/modules/pathkit/build/wasm/pathkit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -110,10 +110,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.js"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm/pathkit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.js",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/build/wasm/pathkit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -128,10 +128,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test (2)",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/build/wasm (2)",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -145,10 +145,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/pathkit.wasm",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.wasm"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm/pathkit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.wasm [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.wasm",
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.wasm [START_DIR]/skia/modules/pathkit/build/wasm/pathkit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -157,10 +157,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.wasm"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm/pathkit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.wasm",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/build/wasm/pathkit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
|
@ -81,10 +81,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/build/wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -98,10 +98,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/pathkit.js",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.js"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm/pathkit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.js [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.js",
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.js [START_DIR]/skia/modules/pathkit/build/wasm/pathkit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -110,10 +110,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.js"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm/pathkit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.js",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/build/wasm/pathkit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -128,10 +128,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test (2)",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/pathkit/build/wasm (2)",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -145,10 +145,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/pathkit.wasm",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.wasm"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm/pathkit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.wasm [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.wasm",
|
||||
"name": "Docker setup.cp [START_DIR]/build/pathkit.wasm [START_DIR]/skia/modules/pathkit/build/wasm/pathkit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -157,10 +157,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.wasm"
|
||||
"[START_DIR]/skia/modules/pathkit/build/wasm/pathkit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/npm-wasm/bin/test/pathkit.wasm",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/pathkit/build/wasm/pathkit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
|
@ -36,10 +36,10 @@ def RunSteps(api):
|
||||
# The karma script is configured to look in ./npm-(asmjs|wasm)/bin/test/ for
|
||||
# the test files to load, so we must copy them there (see Set up for docker).
|
||||
copy_dest = checkout_root.join('skia', 'modules', 'pathkit',
|
||||
'npm-wasm', 'bin', 'test')
|
||||
'build', 'wasm')
|
||||
if 'asmjs' in api.vars.builder_name:
|
||||
copy_dest = checkout_root.join('skia', 'modules', 'pathkit',
|
||||
'npm-asmjs', 'bin', 'test')
|
||||
'build', 'asmjs')
|
||||
|
||||
base_dir = api.vars.build_dir
|
||||
bundle_name = 'pathkit.wasm'
|
||||
|
1
modules/pathkit/.gitignore
vendored
1
modules/pathkit/.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
**/bin
|
||||
node_modules/
|
||||
build/
|
||||
package-lock.json
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Now compile with emsdk 3.1.3
|
||||
- Internal calls no longer use dynamic dispatch (skbug.com/12795)
|
||||
- WASM Memory can grow beyond initial 32MB
|
||||
- The debug and test builds of PathKit are no longer published to NPM.
|
||||
|
||||
## [0.7.0] 2019-07-20
|
||||
|
||||
|
@ -1,9 +1,27 @@
|
||||
build:
|
||||
./compile.sh
|
||||
debug:
|
||||
./compile.sh debug
|
||||
- rm -rf build/
|
||||
mkdir -p ./build/wasm ./build/asmjs
|
||||
cp ../../out/pathkit/pathkit.js ./build/wasm/pathkit.js
|
||||
cp ../../out/pathkit/pathkit.wasm ./build/wasm/pathkit.wasm
|
||||
|
||||
npm: npm-test npm-debug
|
||||
mkdir -p ./npm-wasm/bin
|
||||
mkdir -p ./npm-asmjs/bin
|
||||
./compile.sh asm.js debug
|
||||
cp ../../out/pathkit/pathkit.js ./build/asmjs/pathkit.js
|
||||
|
||||
release:
|
||||
./compile.sh
|
||||
- rm -rf build/
|
||||
mkdir -p ./build/wasm ./build/asmjs
|
||||
cp ../../out/pathkit/pathkit.js ./build/wasm/pathkit.js
|
||||
cp ../../out/pathkit/pathkit.wasm ./build/wasm/pathkit.wasm
|
||||
|
||||
./compile.sh asm.js
|
||||
cp ../../out/pathkit/pathkit.js ./build/asmjs/pathkit.js
|
||||
cp ../../out/pathkit/pathkit.js.mem ./build/asmjs/pathkit.js.mem
|
||||
|
||||
npm:
|
||||
rm -rf ./npm-wasm/bin ./npm-asmjs/bin
|
||||
mkdir -p ./npm-wasm/bin ./npm-asmjs/bin
|
||||
./compile.sh
|
||||
cp ../../out/pathkit/pathkit.js ./npm-wasm/bin
|
||||
cp ../../out/pathkit/pathkit.wasm ./npm-wasm/bin
|
||||
@ -11,135 +29,17 @@ npm: npm-test npm-debug
|
||||
cp ../../out/pathkit/pathkit.js ./npm-asmjs/bin/pathkit.js
|
||||
cp ../../out/pathkit/pathkit.js.mem ./npm-asmjs/bin/pathkit.js.mem
|
||||
|
||||
publish:
|
||||
cd npm-wasm; npm publish
|
||||
cd npm-asmjs; npm publish
|
||||
|
||||
update-major:
|
||||
cd npm-wasm; npm version major
|
||||
cd ../npm-asmjs; npm version major
|
||||
echo "Don't forget to publish."
|
||||
|
||||
update-minor:
|
||||
cd npm-wasm; npm version minor
|
||||
cd npm-asmjs; npm version minor
|
||||
echo "Don't forget to publish."
|
||||
|
||||
update-patch:
|
||||
cd npm-wasm; npm version patch
|
||||
cd npm-asmjs; npm version patch
|
||||
echo "Don't forget to publish."
|
||||
|
||||
# Build the library and run the tests. If developing locally, test-continuous is better
|
||||
# suited for that, although if you make changes to the C++/WASM code, you will need
|
||||
# to manually call make npm-test to re-build.
|
||||
test: npm-test
|
||||
npm install
|
||||
npx karma start ./karma.conf.js --single-run
|
||||
ASM_JS=1 npx karma start ./karma.conf.js --single-run
|
||||
|
||||
test-continuous:
|
||||
echo "Assuming npm install has been run by user"
|
||||
echo "Also assuming make npm-test has also been run by a user (if needed)"
|
||||
echo "Assuming npm ci has been run by user"
|
||||
echo "Also assuming make debug or make release has also been run by a user (if needed)"
|
||||
npx karma start ./karma.conf.js --no-single-run --watch-poll
|
||||
|
||||
test-continuous-asmjs:
|
||||
echo "Assuming npm install has been run by user"
|
||||
echo "Also assuming make npm-test has also been run by a user (if needed)"
|
||||
echo "Assuming npm ci has been run by user"
|
||||
echo "Also assuming make debug or make release has also been run by a user (if needed)"
|
||||
ASM_JS=1 npx karma start ./karma.conf.js --no-single-run --watch-poll
|
||||
|
||||
# Build the library and run the tests using the docker image. If developing locally,
|
||||
# test-docker-continuous is better, although if you make changes to the C++/WASM code,
|
||||
# you will need to manually call make npm-test to re-build.
|
||||
test-docker:
|
||||
mkdir -p ./npm-wasm/bin/test
|
||||
mkdir -p ./npm-asmjs/bin/test
|
||||
mkdir -p $$SKIA_ROOT/out/dockerbuild
|
||||
|
||||
docker run --rm -v $$SKIA_ROOT:/SRC -v $$SKIA_ROOT/out/dockerbuild:/OUT \
|
||||
gcr.io/skia-public/emsdk-base:prod /SRC/infra/pathkit/build_pathkit.sh
|
||||
cp ../../out/dockerbuild/pathkit.js ./npm-wasm/bin/test/pathkit.js
|
||||
cp ../../out/dockerbuild/pathkit.wasm ./npm-wasm/bin/test/pathkit.wasm
|
||||
|
||||
docker run --rm -v $$SKIA_ROOT:/SRC -v $$SKIA_ROOT/out/dockerbuild:/OUT \
|
||||
gcr.io/skia-public/emsdk-base:prod /SRC/infra/pathkit/build_pathkit.sh asm.js
|
||||
cp ../../out/dockerbuild/pathkit.js ./npm-asmjs/bin/test/pathkit.js
|
||||
cp ../../out/dockerbuild/pathkit.js.mem ./npm-asmjs/bin/test/pathkit.js.mem
|
||||
|
||||
docker run --shm-size=2gb -v $$SKIA_ROOT:/SRC gcr.io/skia-public/karma-chrome-tests:72.0.3626.121_v1 \
|
||||
karma start /SRC/modules/pathkit/karma.conf.js --single-run
|
||||
docker run --shm-size=2gb -v $$SKIA_ROOT:/SRC -e ASM_JS=1 gcr.io/skia-public/karma-chrome-tests:72.0.3626.121_v1 \
|
||||
karma start /SRC/modules/pathkit/karma.conf.js --single-run
|
||||
|
||||
test-docker-continuous:
|
||||
echo "Assuming make npm-test has also been run by a user (if needed)"
|
||||
docker run --shm-size=2gb -v $$SKIA_ROOT:/SRC gcr.io/skia-public/karma-chrome-tests:72.0.3626.121_v1 \
|
||||
karma start /SRC/modules/pathkit/karma.conf.js --no-single-run
|
||||
|
||||
test-docker-continuous-asmjs:
|
||||
echo "Assuming make npm-test has also been run by a user (if needed)"
|
||||
docker run --shm-size=2gb -v $$SKIA_ROOT:/SRC -e ASM_JS=1 gcr.io/skia-public/karma-chrome-tests:72.0.3626.121_v1 \
|
||||
karma start /SRC/modules/pathkit/karma.conf.js --no-single-run
|
||||
|
||||
npm-test:
|
||||
# This compile time is typically faster than release and good for use with
|
||||
# local-example-test
|
||||
mkdir -p ./npm-wasm/bin/test
|
||||
mkdir -p ./npm-asmjs/bin/test
|
||||
./compile.sh test
|
||||
cp ../../out/pathkit/pathkit.js ./npm-wasm/bin/test/pathkit.js
|
||||
cp ../../out/pathkit/pathkit.wasm ./npm-wasm/bin/test/pathkit.wasm
|
||||
./compile.sh asm.js test
|
||||
cp ../../out/pathkit/pathkit.js ./npm-asmjs/bin/test/pathkit.js
|
||||
cp ../../out/pathkit/pathkit.js.mem ./npm-asmjs/bin/test/pathkit.js.mem
|
||||
|
||||
npm-debug:
|
||||
# This compile time is typically faster than release and good for use with
|
||||
# local-example-test
|
||||
mkdir -p ./npm-wasm/bin/debug
|
||||
mkdir -p ./npm-asmjs/bin/debug
|
||||
./compile.sh debug
|
||||
cp ../../out/pathkit/pathkit.js ./npm-wasm/bin/debug/pathkit.js
|
||||
cp ../../out/pathkit/pathkit.wasm ./npm-wasm/bin/debug/pathkit.wasm
|
||||
|
||||
./compile.sh asm.js debug
|
||||
cp ../../out/pathkit/pathkit.js ./npm-asmjs/bin/debug/pathkit.js
|
||||
|
||||
|
||||
example:
|
||||
npm install pathkit-asmjs pathkit-wasm
|
||||
echo "Go check out localhost:8000/npm-wasm/example.html"
|
||||
python3 ../../tools/serve_wasm.py
|
||||
|
||||
local-example:
|
||||
rm -rf node_modules/pathkit-wasm
|
||||
rm -rf node_modules/pathkit-asmjs
|
||||
mkdir -p node_modules
|
||||
ln -s -T ../npm-wasm node_modules/pathkit-wasm
|
||||
ln -s -T ../npm-asmjs node_modules/pathkit-asmjs
|
||||
echo "Go check out http://localhost:8000/npm-wasm/example.html"
|
||||
echo "or http://localhost:8000/npm-asmjs/example.html"
|
||||
python3 ../../tools/serve_wasm.py
|
||||
|
||||
local-example-test:
|
||||
rm -rf node_modules/pathkit-wasm
|
||||
rm -rf node_modules/pathkit-asmjs
|
||||
mkdir -p node_modules/pathkit-wasm
|
||||
mkdir -p node_modules/pathkit-asmjs
|
||||
ln -s -T ../../npm-wasm/bin/test node_modules/pathkit-wasm/bin
|
||||
ln -s -T ../../npm-asmjs/bin/test node_modules/pathkit-asmjs/bin
|
||||
echo "Go check out localhost:8000/npm-wasm/example.html"
|
||||
echo "or http://localhost:8000/npm-asmjs/example.html"
|
||||
python3 ../../tools/serve_wasm.py
|
||||
|
||||
local-example-debug:
|
||||
rm -rf node_modules/pathkit-wasm
|
||||
rm -rf node_modules/pathkit-asmjs
|
||||
mkdir -p node_modules/pathkit-wasm
|
||||
mkdir -p node_modules/pathkit-asmjs
|
||||
ln -s -T ../../npm-wasm/bin/debug node_modules/pathkit-wasm/bin
|
||||
ln -s -T ../../npm-asmjs/bin/debug node_modules/pathkit-asmjs/bin
|
||||
echo "Go check out localhost:8000/npm-wasm/example.html"
|
||||
echo "or http://localhost:8000/npm-asmjs/example.html"
|
||||
python3 ../../tools/serve_wasm.py
|
||||
|
||||
|
@ -14,17 +14,14 @@ Set the EMSDK environment variable to the directory you installed it to.
|
||||
Run `./compile.sh` to compile a production, WASM build to `$SKIA_HOME/out/pathkit`.
|
||||
Add "--help" for more options.
|
||||
|
||||
|
||||
Deploying to npm
|
||||
----------------
|
||||
|
||||
# Build all 3 versions (release, test, debug) for both asmjs and WASM
|
||||
# Build the release version for both asmjs and WASM
|
||||
# These binaries will be placed in the proper places of npm-*/bin
|
||||
# This takes 5-10 minutes.
|
||||
make npm
|
||||
|
||||
# Update the package.json files of both npm-asmjs and npm-wasm
|
||||
make update-patch # or update-minor or update-major
|
||||
|
||||
# Publish both repos
|
||||
make publish
|
||||
# In each npm- subdirectory, run:
|
||||
npm version minor (or patch or major)
|
||||
npm login --registry https://wombat-dressing-room.appspot.com
|
||||
npm publish
|
||||
|
@ -10,16 +10,16 @@ module.exports = function(config) {
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
{ pattern: 'npm-wasm/bin/test/pathkit.wasm', included:false, served:true},
|
||||
{ pattern: 'build/wasm/pathkit.wasm', included:false, served:true},
|
||||
{ pattern: 'tests/*.json', included:false, served:true},
|
||||
'tests/testReporter.js',
|
||||
'npm-wasm/bin/test/pathkit.js',
|
||||
'build/wasm/pathkit.js',
|
||||
'tests/pathkitinit.js',
|
||||
'tests/*.spec.js'
|
||||
],
|
||||
|
||||
proxies: {
|
||||
'/pathkit/': '/base/npm-wasm/bin/test/'
|
||||
'/pathkit/': '/base/build/wasm/'
|
||||
},
|
||||
|
||||
// test results reporter to use
|
||||
@ -79,16 +79,16 @@ module.exports = function(config) {
|
||||
if (process.env.ASM_JS) {
|
||||
console.log('asm.js is under test');
|
||||
cfg.files = [
|
||||
{ pattern: 'npm-asmjs/bin/test/pathkit.js.mem', included:false, served:true},
|
||||
{ pattern: 'build/asmjs/pathkit.js.mem', included:false, served:true},
|
||||
{ pattern: 'tests/*.json', included:false, served:true},
|
||||
'tests/testReporter.js',
|
||||
'npm-asmjs/bin/test/pathkit.js',
|
||||
'build/asmjs/pathkit.js',
|
||||
'tests/pathkitinit.js',
|
||||
'tests/*.spec.js'
|
||||
];
|
||||
|
||||
cfg.proxies = {
|
||||
'/pathkit/': '/base/npm-asmjs/bin/test/'
|
||||
'/pathkit/': '/base/build/asmjs/'
|
||||
};
|
||||
} else {
|
||||
console.log('wasm is under test');
|
||||
|
@ -47,12 +47,12 @@
|
||||
<h2> Solves Cubics for Y given X </h2>
|
||||
<canvas class=big id=cubics></canvas>
|
||||
|
||||
<script type="text/javascript" src="/node_modules/pathkit-asmjs/bin/pathkit.js"></script>
|
||||
<script type="text/javascript" src="/build/asmjs/pathkit.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
PathKitInit({
|
||||
locateFile: (file) => '/node_modules/pathkit-asmjs/bin/'+file,
|
||||
locateFile: (file) => '/build/asmjs/'+file,
|
||||
}).then((PathKit) => {
|
||||
window.PathKit = PathKit;
|
||||
OutputsExample(PathKit);
|
||||
|
@ -47,12 +47,12 @@
|
||||
<h2> Solves Cubics for Y given X </h2>
|
||||
<canvas class=big id=cubics></canvas>
|
||||
|
||||
<script type="text/javascript" src="/node_modules/pathkit-wasm/bin/pathkit.js"></script>
|
||||
<script type="text/javascript" src="/build/wasm/pathkit.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
PathKitInit({
|
||||
locateFile: (file) => '/node_modules/pathkit-wasm/bin/'+file,
|
||||
locateFile: (file) => '/build/wasm/'+file,
|
||||
}).then((PathKit) => {
|
||||
window.PathKit = PathKit;
|
||||
OutputsExample(PathKit);
|
||||
|
Loading…
Reference in New Issue
Block a user