From b3230188813768d0fa8bc3a1969584ad0028d1ba Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 28 Jan 2021 00:20:19 -0800 Subject: [PATCH] devops: fetch chromium checkout if it has not been before (#5169) Checkouts should reside outside of gihtub action working directory so will be reused between builds. --- browser_patches/chromium/build.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/browser_patches/chromium/build.sh b/browser_patches/chromium/build.sh index d3699feff8..ecd3a7cb27 100755 --- a/browser_patches/chromium/build.sh +++ b/browser_patches/chromium/build.sh @@ -95,6 +95,18 @@ compile_chromium() { # Update Chromium checkout. One might think that this step should go to `prepare_checkout.sh` # script, but the `prepare_checkout.sh` is in fact designed to prepare a fork checkout, whereas # we don't fork Chromium. + # + # This is based on https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md#get-the-code + if [[ ! -d "${CR_CHECKOUT_PATH}" ]]; then + mkdir "${CR_CHECKOUT_PATH}" + cd "${CR_CHECKOUT_PATH}" + fetch --no-hooks chromium + cd src + if [[ $(uname) == "Linux" ]]; then + ./build/install-build-deps.sh + fi + gclient runhooks + fi cd "${CR_CHECKOUT_PATH}/src" git checkout master git pull origin master