1cb93a386Sopenharmony_ciDocker
2cb93a386Sopenharmony_ci======
3cb93a386Sopenharmony_ci
4cb93a386Sopenharmony_ciDocker files to ease working with PathKit and CanvasKit.
5cb93a386Sopenharmony_ci
6cb93a386Sopenharmony_ciemsdk-base
7cb93a386Sopenharmony_ci----------
8cb93a386Sopenharmony_ci
9cb93a386Sopenharmony_ciThis image has an Emscripten SDK environment that can be used for
10cb93a386Sopenharmony_cicompiling projects (e.g. Skia's PathKit) to WASM/asm.js.
11cb93a386Sopenharmony_ci
12cb93a386Sopenharmony_ciThis image tracks the official emscripten Docker image and installs
13cb93a386Sopenharmony_cipython 2 (which some of our scripts still use).
14cb93a386Sopenharmony_ci
15cb93a386Sopenharmony_ci    make publish_emsdk_base
16cb93a386Sopenharmony_ci
17cb93a386Sopenharmony_ciFor testing the image locally, the following flow can be helpful:
18cb93a386Sopenharmony_ci
19cb93a386Sopenharmony_ci    docker build -t emsdk-base ./emsdk-base/
20cb93a386Sopenharmony_ci    # Run bash in it to poke around and make sure things are properly installed
21cb93a386Sopenharmony_ci    docker run -it emsdk-base /bin/bash
22cb93a386Sopenharmony_ci    # Compile PathKit with the local image
23cb93a386Sopenharmony_ci    docker run -v $SKIA_ROOT:/SRC -v $SKIA_ROOT/out/dockerpathkit:/OUT emsdk-base /SRC/infra/pathkit/build_pathkit.sh
24cb93a386Sopenharmony_ci
25cb93a386Sopenharmony_cikarma-chrome-tests
26cb93a386Sopenharmony_ci------------------
27cb93a386Sopenharmony_ci
28cb93a386Sopenharmony_ciThis image has Google Chrome and karma/jasmine installed on it, which can
29cb93a386Sopenharmony_cibe used to run JS tests.
30cb93a386Sopenharmony_ci
31cb93a386Sopenharmony_ciThis image is standalone and does not have any extra dependencies that make
32cb93a386Sopenharmony_ciit Skia-exclusive.
33cb93a386Sopenharmony_ci
34cb93a386Sopenharmony_ciIt gets manually pushed anytime there's an update to the Dockerfile or relevant
35cb93a386Sopenharmony_ciinstalled libraries.
36cb93a386Sopenharmony_ci
37cb93a386Sopenharmony_ci    make publish_karma_chrome_tests
38cb93a386Sopenharmony_ci
39cb93a386Sopenharmony_ciOf note, some versions (generally before Chrome 60) run out of space on /dev/shm when
40cb93a386Sopenharmony_ciusing the default Docker settings.  To be safe, it is recommended to run the container
41cb93a386Sopenharmony_ciwith the flag --shm-size=2gb.
42cb93a386Sopenharmony_ci
43cb93a386Sopenharmony_ciFor testing the image locally, the following can be helpful:
44cb93a386Sopenharmony_ci
45cb93a386Sopenharmony_ci    docker build -t karma-chrome-tests ./karma-chrome-tests/
46cb93a386Sopenharmony_ci    # Run bash in it to poke around and make sure things are properly installed
47cb93a386Sopenharmony_ci    docker run -it --shm-size=2gb karma-chrome-tests /bin/bash
48cb93a386Sopenharmony_ci    # Run the tests (but not capturing Gold output) with the local source repo
49cb93a386Sopenharmony_ci    docker run --shm-size=2gb -v $SKIA_ROOT:/SRC karma-chrome-tests karma start /SRC/infra/pathkit/karma-docker.conf.js --single-run
50cb93a386Sopenharmony_ci
51cb93a386Sopenharmony_cigold-karma-chrome-tests
52cb93a386Sopenharmony_ci------------------
53cb93a386Sopenharmony_ci
54cb93a386Sopenharmony_ciThis image has Google Chrome and karma/jasmine installed on it, which can
55cb93a386Sopenharmony_cibe used to run JS tests.
56cb93a386Sopenharmony_ci
57cb93a386Sopenharmony_ciThis image assumes the runner wants to collect the output images and JSON data
58cb93a386Sopenharmony_cispecific to Skia Infra's Gold tool (image correctness).
59cb93a386Sopenharmony_ci
60cb93a386Sopenharmony_ciIt gets manually pushed anytime there's an update to the Dockerfile or the parent
61cb93a386Sopenharmony_ciimage (karma-chrome-tests).
62cb93a386Sopenharmony_ci
63cb93a386Sopenharmony_ci    # Run the following from $SKIA_ROOT/infra/pathkit
64cb93a386Sopenharmony_ci    make publish_gold_karma_chrome_tests
65cb93a386Sopenharmony_ci
66cb93a386Sopenharmony_ciOf note, some versions (generally before Chrome 60) run out of space on /dev/shm when
67cb93a386Sopenharmony_ciusing the default Docker settings.  To be safe, it is recommended to run the container
68cb93a386Sopenharmony_ciwith the flag --shm-size=2gb.
69cb93a386Sopenharmony_ci
70cb93a386Sopenharmony_ciFor testing the image locally, the following can be helpful:
71cb93a386Sopenharmony_ci
72cb93a386Sopenharmony_ci    # Run the following from $SKIA_ROOT/infra/pathkit
73cb93a386Sopenharmony_ci    make gold-docker-image
74cb93a386Sopenharmony_ci    # Run bash in it to poke around and make sure things are properly installed
75cb93a386Sopenharmony_ci    docker run -it --shm-size=2gb gold-karma-chrome-tests /bin/bash
76cb93a386Sopenharmony_ci    # Run the tests and collect Gold output with the local source repo
77cb93a386Sopenharmony_ci    mkdir -p -m 0777 /tmp/dockergold
78cb93a386Sopenharmony_ci    docker run --shm-size=2gb -v $SKIA_ROOT:/SRC -v /tmp/dockergold:/OUT gold-karma-chrome-tests /SRC/infra/pathkit/test_pathkit.sh
79cb93a386Sopenharmony_ci
80cb93a386Sopenharmony_ciperf-karma-chrome-tests
81cb93a386Sopenharmony_ci------------------
82cb93a386Sopenharmony_ci
83cb93a386Sopenharmony_ciThis image has Google Chrome and karma/jasmine installed on it, which can
84cb93a386Sopenharmony_cibe used to run JS tests.
85cb93a386Sopenharmony_ci
86cb93a386Sopenharmony_ciThis image assumes the runner wants to collect the output images and JSON data
87cb93a386Sopenharmony_cispecific to Skia Infra's Perf tool.
88cb93a386Sopenharmony_ci
89cb93a386Sopenharmony_ciIt gets manually pushed anytime there's an update to the Dockerfile or the parent
90cb93a386Sopenharmony_ciimage (karma-chrome-tests).
91cb93a386Sopenharmony_ci
92cb93a386Sopenharmony_ci    # Run the following from $SKIA_ROOT/infra/pathkit
93cb93a386Sopenharmony_ci    make publish_perf_karma_chrome_tests
94cb93a386Sopenharmony_ci
95cb93a386Sopenharmony_ciOf note, some versions (generally before Chrome 60) run out of space on /dev/shm when
96cb93a386Sopenharmony_ciusing the default Docker settings.  To be safe, it is recommended to run the container
97cb93a386Sopenharmony_ciwith the flag --shm-size=2gb.
98cb93a386Sopenharmony_ci
99cb93a386Sopenharmony_ciFor testing the image locally, the following can be helpful:
100cb93a386Sopenharmony_ci
101cb93a386Sopenharmony_ci    # Run the following from $SKIA_ROOT/infra/pathkit
102cb93a386Sopenharmony_ci    make perf-docker-image
103cb93a386Sopenharmony_ci    # Run bash in it to poke around and make sure things are properly installed
104cb93a386Sopenharmony_ci    docker run -it --shm-size=2gb perf-karma-chrome-tests /bin/bash
105cb93a386Sopenharmony_ci    # Run the tests and collect Perf output with the local source repo
106cb93a386Sopenharmony_ci    mkdir -p -m 0777 /tmp/dockerperf
107cb93a386Sopenharmony_ci    docker run --shm-size=2gb -v $SKIA_ROOT:/SRC -v /tmp/dockerperf:/OUT perf-karma-chrome-tests /SRC/infra/pathkit/perf_pathkit.sh
108