From 96175696dea8e017084f9d7dbf3bcb8c86daea19 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Mon, 5 Nov 2018 17:28:53 -0500 Subject: [PATCH] Add skia-wasm-release image. This should let us pipe continuous builds into jsfiddle.skia.org and skottie.skia.org Bug: skia: Change-Id: I587e1293237d42dfdacae0757f44634f29d6f251 Reviewed-on: https://skia-review.googlesource.com/c/168440 Reviewed-by: Joe Gregorio --- docker/README.md | 14 ++++++++++++++ docker/cloudbuild.yaml | 11 +++++++++++ docker/skia-wasm-release/Dockerfile | 18 ++++++++++++++++++ infra/pathkit/docker/Makefile | 2 ++ 4 files changed, 45 insertions(+) create mode 100644 docker/skia-wasm-release/Dockerfile diff --git a/docker/README.md b/docker/README.md index 41c2a39346..7079a817f7 100644 --- a/docker/README.md +++ b/docker/README.md @@ -15,6 +15,20 @@ need to manually push a verison, then run the following commands: docker tag skia-release gcr.io/skia-public/skia-release:prod docker push gcr.io/skia-public/skia-release:prod +skia-wasm-release +------ + +This image is used to build the Web Assembly (WASM) libraries of Skia +at TOT. + +There is a continuous process that builds this docker image, but if you +need to manually push a verison, then run the following commands: + + docker build -t skia-wasm-release ./docker/skia-wasm-release/ + docker tag skia-wasm-release gcr.io/skia-public/skia-wasm-release:prod + docker push gcr.io/skia-public/skia-wasm-release:prod + + skia-with-swift-shader-base ------ diff --git a/docker/cloudbuild.yaml b/docker/cloudbuild.yaml index 8f5554b9a4..3265ed9335 100644 --- a/docker/cloudbuild.yaml +++ b/docker/cloudbuild.yaml @@ -13,6 +13,11 @@ steps: - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$PROJECT_ID/skia-release:prod', './docker/skia-release'] timeout: 7200s + + - name: 'gcr.io/cloud-builders/docker' + args: ['build', '-t', 'gcr.io/$PROJECT_ID/skia-wasm-release:prod', './docker/skia-wasm-release'] + timeout: 7200s + - name: 'gcr.io/skia-public/infra:prod' dir: '/home/skia/golib/src/go.skia.org/infra/fiddlek' env: @@ -20,6 +25,7 @@ steps: - 'SKIP_BUILD=1' args: ['./build_fiddler_release'] timeout: 600s + - name: 'gcr.io/skia-public/infra:prod' dir: '/home/skia/golib/src/go.skia.org/infra/skottie' env: @@ -27,6 +33,7 @@ steps: - 'SKIP_BUILD=1' args: ['make', 'release_ci'] timeout: 600s + - name: 'gcr.io/skia-public/infra:prod' dir: '/home/skia/golib/src/go.skia.org/infra/debugger' env: @@ -34,12 +41,15 @@ steps: - 'SKIP_BUILD=1' args: ['make', 'release_ci'] timeout: 600s + - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$PROJECT_ID/fiddler:$COMMIT_SHA', '/workspace/__fiddler_staging'] timeout: 600s + - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$PROJECT_ID/skottie:$COMMIT_SHA', '/workspace/__skottie_staging'] timeout: 600s + - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$PROJECT_ID/debugger:$COMMIT_SHA', '/workspace/__debugger_staging'] timeout: 600s @@ -48,6 +58,7 @@ images: - 'gcr.io/$PROJECT_ID/skottie:$COMMIT_SHA' - 'gcr.io/$PROJECT_ID/debugger:$COMMIT_SHA' - 'gcr.io/$PROJECT_ID/skia-release:prod' + - 'gcr.io/$PROJECT_ID/skia-wasm-release:prod' timeout: 7200s options: machineType: 'N1_HIGHCPU_32' diff --git a/docker/skia-wasm-release/Dockerfile b/docker/skia-wasm-release/Dockerfile new file mode 100644 index 0000000000..95209792fe --- /dev/null +++ b/docker/skia-wasm-release/Dockerfile @@ -0,0 +1,18 @@ +# Dockerfile for building the WASM libraries used by jsfiddle.skia.org +FROM gcr.io/skia-public/emsdk-release:prod + +RUN cd /tmp \ + && git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' \ + && mkdir -p /tmp/skia \ + && cd /tmp/skia \ + && /tmp/depot_tools/fetch skia + +RUN cd /tmp/skia/skia \ + && python tools/git-sync-deps \ + && ./bin/fetch-gn + +# PathKit should be in /tmp/skia/skia/out/pathkit/ +RUN /tmp/skia/skia/modules/pathkit/compile.sh + +# CanvasKit should be in /tmp/skia/skia/out/canvaskit_wasm +RUN /tmp/skia/skia/experimental/canvaskit/compile.sh diff --git a/infra/pathkit/docker/Makefile b/infra/pathkit/docker/Makefile index 11566579e3..23c848ccde 100644 --- a/infra/pathkit/docker/Makefile +++ b/infra/pathkit/docker/Makefile @@ -8,6 +8,8 @@ publish_emsdk_base: docker build --no-cache -t emsdk-base ./emsdk-base/ docker tag emsdk-base gcr.io/skia-public/emsdk-release:${EMSDK_VERSION} docker push gcr.io/skia-public/emsdk-release:${EMSDK_VERSION} + docker tag emsdk-base gcr.io/skia-public/emsdk-release:prod + docker push gcr.io/skia-public/emsdk-release:prod publish_karma_chrome_tests: docker build --no-cache -t karma-chrome-tests ./karma-chrome-tests/