electron / libchromiumcontent

Shared library build of Chromium’s Content module
MIT License
486 stars 183 forks source link

Use packaged chromium source to speed up CI builds #538

Closed jkleinsc closed 6 years ago

jkleinsc commented 6 years ago

This PR adds the capability of using a tarball cache of the chromium source code to speed up builds. The tarballs are stored on S3 by platform and chromium version (eg libchromiumcontent/linux/src/63.0.3239.150/src.tar.bz2). If the tarball doesn't exist for the version/platform, then the source will be downloaded using gclient sync. In this case if the upload_packaged_src argument is passed to script/update, then the source will be archived and uploaded to S3.

To use this feature, pass the use_packaged_src argument when calling script/update.

The chromium source that is archived does not have the .git directories or the native_client directory.

The tarball sizes for 63.0.3239.150 are as follows:

It may be possible to further optimize these tarballs for size, but I wasn't sure what other files from chromium source we can drop.

zcbenz commented 6 years ago

Just for your information, we were doing this before and I had a service providing universal source tarballs https://github.com/zcbenz/chromium-source-tarball.

I dont remember the reason and when we switched away from it (I was not making the call), but if you are interested in it, I can bring my service back to life.

jkleinsc commented 6 years ago

@zcbenz would your solution have any advantage over this one? It seems to me that using S3 means we don’t need to run another service.

zcbenz commented 6 years ago

It hosts assets on GitHub Releases so it only needs a $5 cloud machine to run. It does not make much difference for us since the bill is on GitHub anyway.