Commit c8b09f5
authored
Cache bazel builds with
This PR addresses issue #9659, caching bazel build artifacts on
`--disk_cache` using GitHub `cache` action. This should allow PRs from
external repositories (i.e. forks) to benefit from build caching. That's
because remote cache is only enabled for PRs from within `pytorch/xla`
repository.
In summary, this PR will add the following cache behavior:
1. Every commit pushed to `master` or any release candidate branch (e.g.
`rX.X`) will:
- Create a new disk cache
- Populate the cache as it builds PyTorch/XLA
- Save the populated disk cache, associating it with the current branch,
and the current commit
2. Every PR on branch `X` (either `master` or a release candidate
branch) will:
- Try to restore the cache associated with `X` at the commit it's trying
to merge with
- Build PyTorch/XLA using the restored disk cache
- If we don't actually find a cache to restore, we won't use a disk
cache
Note that we only have 10GB of cache storage. So, in order to minimize
it, I made the following decisions:
- The disk caches created in (1) won't restore any cache in the
beginning
- Smaller caches
- The disk caches restored in (2) won't be saved in the end
- Fewer caches--disk_cache using GitHub cache action. (#9695)1 parent af2a47a commit c8b09f5
File tree
3 files changed
+45
-0
lines changed- .github/workflows
3 files changed
+45
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
52 | 67 | | |
53 | 68 | | |
54 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
55 | 79 | | |
56 | 80 | | |
57 | 81 | | |
| 82 | + | |
58 | 83 | | |
59 | 84 | | |
60 | 85 | | |
61 | 86 | | |
62 | 87 | | |
63 | 88 | | |
| 89 | + | |
64 | 90 | | |
65 | 91 | | |
66 | 92 | | |
67 | 93 | | |
68 | 94 | | |
69 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
70 | 107 | | |
71 | 108 | | |
72 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
0 commit comments