Commit 7edbfa9
authored
Implement Docker layer caching for all workflows (#176)
* Add Docker layer caching to PR workflow
- Use docker/build-push-action with GHA cache backend
- Implement PR-specific cache scope with fallback to main branch
- Enable mode=max to cache all Dockerfile stages
- Expected improvement: 60s → 10-20s on warm builds
* Add Docker layer caching to release workflow
- Use docker/build-push-action with GHA cache backend for both beta and stable releases
- Implement shared 'release' cache scope for main branch builds
- Enable mode=max to cache all Dockerfile stages including multi-arch layers
- Expected improvement: 7.5min → 2min on warm builds (70% reduction)
* Add Docker layer caching to preview package workflow
- Use docker/build-push-action with GHA cache backend
- Implement preview-specific cache scope with multi-level fallback
- Reuse PR cache from pullrequest.yml when available
- Enable mode=max to cache all Dockerfile stages
- Expected improvement: 7.5min → 2-3min on warm builds
* Add cache mounts for package managers
- Add npm cache mount in builder stage for faster dependency installs
- Add apt cache mounts in runtime stage for faster system package installs
- Add pip cache mount in runtime stage for faster Python package installs
- Removes --no-cache-dir from pip to enable caching
- Additional ~20% speedup when dependencies change
* Add cache mount to prod-deps stage
Adds npm cache mount to prod-deps stage for consistency with builder stage.
This speeds up production dependency installs when layers are invalidated.
* Improve workflow configuration
- Remove leftover instructional comment in pullrequest.yml
- Centralize version extraction in release.yml unit-tests job
- Reuse version output in publish jobs to eliminate duplication
* Add changeset for Dockerfile cache mounts
* Increase pkg-pr-new timeout to 15 minutes
Multi-arch Docker builds take 7-8 minutes on cold cache. The previous
10-minute timeout was too tight and caused failures when builds took
slightly longer due to runner variance or network conditions. 15 minutes
provides adequate 2x buffer while still catching genuinely stuck builds.1 parent 1bf3576 commit 7edbfa9
File tree
5 files changed
+92
-15
lines changed- .changeset
- .github/workflows
- packages/sandbox
5 files changed
+92
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
77 | 90 | | |
78 | 91 | | |
79 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
| |||
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
102 | 111 | | |
103 | 112 | | |
104 | 113 | | |
105 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
106 | 118 | | |
107 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
108 | 131 | | |
109 | 132 | | |
110 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| |||
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
109 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
110 | 128 | | |
111 | 129 | | |
112 | 130 | | |
| |||
153 | 171 | | |
154 | 172 | | |
155 | 173 | | |
156 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
157 | 185 | | |
158 | 186 | | |
159 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | | - | |
73 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
| |||
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
85 | | - | |
86 | | - | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| |||
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
99 | | - | |
100 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
| |||
0 commit comments