2018-10-08 19:07:42 +00:00
|
|
|
Docker
|
|
|
|
======
|
|
|
|
|
|
|
|
Docker files to ease working with the Android SDK/NDK and SKQP.
|
|
|
|
|
|
|
|
android-skqp
|
|
|
|
-------------
|
|
|
|
|
|
|
|
This image has an Android emulator, the Android SDK and NDK installed on it.
|
|
|
|
Additionally, it has the dependencies needed to build SKQP - Clang, python, ninja.
|
|
|
|
|
|
|
|
It gets manually pushed anytime there's an update to the Dockerfile or relevant
|
|
|
|
installed libraries.
|
|
|
|
|
2019-01-22 23:09:30 +00:00
|
|
|
# This will pause after the "Accept? (y/N)" prompt as it installs the NDK;
|
|
|
|
# you do not need to hit "y".
|
2018-10-08 19:07:42 +00:00
|
|
|
docker build -t android-skqp ./android-skqp/
|
2019-01-22 23:09:30 +00:00
|
|
|
# use v2, v3 for respins; see http://gcr.io/skia-public/android-skqp for
|
|
|
|
# latest version
|
|
|
|
ANDROID_SDK_VERSION="8.1_v1"
|
2018-10-08 19:07:42 +00:00
|
|
|
docker tag android-skqp gcr.io/skia-public/android-skqp:$ANDROID_SDK_VERSION
|
|
|
|
docker push gcr.io/skia-public/android-skqp:$ANDROID_SDK_VERSION
|
|
|
|
|
|
|
|
|
|
|
|
For testing the image locally, the following flow can be helpful:
|
|
|
|
|
|
|
|
docker build -t android-skqp ./android-skqp/
|
2018-10-26 17:31:49 +00:00
|
|
|
|
2018-10-08 19:07:42 +00:00
|
|
|
# start an emulator
|
2018-10-26 17:31:49 +00:00
|
|
|
docker run --privileged -d --name android_em \
|
|
|
|
-e DEVICE="Samsung Galaxy S6" \
|
|
|
|
-v $SKIA_ROOT:/SRC \
|
|
|
|
-v $SKIA_ROOT/out/skqp:/OUT \
|
|
|
|
android-skqp
|
|
|
|
|
2018-10-08 19:07:42 +00:00
|
|
|
# attach to that emulator
|
|
|
|
docker exec -it android_em /bin/bash
|
2018-10-26 17:31:49 +00:00
|
|
|
|
2018-10-08 19:07:42 +00:00
|
|
|
# Compile SKQP
|
2018-10-26 17:31:49 +00:00
|
|
|
docker run -it --rm -w /SRC/infra/skqp \
|
|
|
|
-v $SKIA_ROOT:/SRC \
|
|
|
|
android-skqp ./build_apk.sh
|
|
|
|
|
|
|
|
# Run SKQP (can't mount anything with -v here, must do it on
|
|
|
|
# original docker run)
|
2018-10-08 19:07:42 +00:00
|
|
|
docker exec -it android_em /SRC/infra/skqp/run_skqp.sh
|
2018-10-26 17:31:49 +00:00
|
|
|
|
2018-10-08 19:07:42 +00:00
|
|
|
# Cleanup
|
|
|
|
docker kill android_em
|
2018-10-26 17:31:49 +00:00
|
|
|
docker rm android_em
|