build: optimize the happy path when syncing on CI (#17827)

* build: optimize the happy path when syncing on CI

This adds a new cache for the "src" directory that is only ever used if
the cache key matches exactly.  If there is no exact match we fall back
to the old strategy of using the git cache.

On the happy path this can make the checkout on linux/macOS take around
5-6 minutes which is **significantly** faster than the original 15-18
minutes.

* build: sort readdir result to ensure stability

* build: increment cache key

* Update config.yml

* build: ensure that the cleanly checked out Electron has had hooks run on it

* build: do not remove deps/v8

* build: ensure clean git directory when generating deps hash

* chore: add comments to caching logic

* Update .circleci/config.yml

Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>
This commit is contained in:
Samuel Attard
2019-04-22 15:36:59 -07:00
committed by GitHub
parent df269ecb24
commit e9114b3c00
4 changed files with 119 additions and 24 deletions

3
.gitignore vendored
View File

@@ -62,3 +62,6 @@ spec/.hash
# If someone runs tsc this is where stuff will end up
ts-gen
# Used to accelerate CI builds
.depshash