diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-07-05 13:08:28 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-07-13 11:50:39 -0700 |
commit | 74ef93ab4f5e88d2d111d6400bc8d80642075544 (patch) | |
tree | 8619a34288a358b9a8f3e5908648bb7be1fc5c88 /Makefile | |
parent | 3896a65c8e8c5a49981b2e4776310ee24baa6997 (diff) | |
download | qtlocation-mapboxgl-74ef93ab4f5e88d2d111d6400bc8d80642075544.tar.gz |
[build] Improve ccache freshness
Save a fresh ccache on every build by including (a checksum of) the current revision in the cache key. In the worst case, saving the cache appears to take ~1:30 for android-release; other builds appear to take a small amount of time compared to the time saved by having a fresh cache, versus a cache that's up to a week old.
Restore caches in the following priority order (all scoped to current architecture and job):
1. The cache for the current branch and revision.
2. If that doesn't exist, the most recent cache for the current branch.
3. If that doesn't exist, the cache for the parent branch and merge base, where "parent branch" means the base branch of the pull request specified by $CIRCLE_PULL_REQUEST (obtained from the GitHub API), and "merge base" means the revision returned by `git merge-base` when given the parent branch and $CIRCLE_BRANCH (obtained by executing that shell command). The intent here is to start a newly created branch off with the most relevant cache from its parent branch.
4. If that doesn't exist, the most recent cache for the parent branch.
5. If that doesn't exist, the most recent cache for master.
6. If that doesn't exist, use the most recent cache for any build.
We cannot use the branch names or revisions themselves as key segments, because CircleCI lacks a way to interpolate arbitrary environment variables into the cache key name. Instead, we write the desired value into a file and use the `{{ checksum "filename" }}` syntax.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions