35b87a5b44
Uses Docker to compile an APK and then run it on an emulator. We use a specialized image for build (includes Clang, etc) And then the 3rd party base image for just the test (which has the emulator and SDK on it). Bug: skia:7578, skia:7692 Change-Id: I948e0b091868e7173b00e3affd7c3d59a5cd1ec2 Reviewed-on: https://skia-review.googlesource.com/c/159681 Reviewed-by: Stephan Altmueller <stephana@google.com> Reviewed-by: Hal Canary <halcanary@google.com> |
||
---|---|---|
.. | ||
android-skqp | ||
README.md |
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.
docker build -t android-skqp ./android-skqp/
ANDROID_SDK_VERSION="8.1_v1" # use v2, v3 for respins
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/
# start an emulator
docker run --privileged -d --name android_em -e DEVICE="Samsung Galaxy S6" -v $SKIA_ROOT:/SRC -v $SKIA_ROOT/out/skqp:/OUT android-skqp
# attach to that emulator
docker exec -it android_em /bin/bash
# Compile SKQP
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)
docker exec -it android_em /SRC/infra/skqp/run_skqp.sh
# Cleanup
docker kill android_em
docker rm android_em