fix(ci): mount /root/.flutter as cache volume to keep pub-get snapshot small
Flutter writes tool state to /root/.flutter on every invocation. Without a cache mount this ends up in the pub-get snapshot, making it large and prone to GC eviction. Moving it to a cache volume keeps the snapshot tiny so BuildKit's exec cache for pub get survives between CI runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
1393a31d61
commit
6dcefa856e
@@ -186,6 +186,7 @@ func (m *Ci) Base() *dagger.Container {
|
||||
WithExec([]string{"apt-get", "install", "-y", "clang", "cmake", "ninja-build", "pkg-config", "libgtk-3-dev", "liblzma-dev", "libsecret-1-dev", "libgcrypt20-dev", "libjsoncpp-dev", "sqlite3", "iproute2", "netcat-openbsd", "xvfb", "libosmesa6", "libegl1", "lld"}).
|
||||
WithMountedCache("/root/.pub-cache", dag.CacheVolume("flutter-pub-cache")).
|
||||
WithMountedCache("/root/.gradle", dag.CacheVolume("gradle-cache")).
|
||||
WithMountedCache("/root/.flutter", dag.CacheVolume("flutter-user-cache")).
|
||||
WithEnvVariable("PUB_CACHE", "/root/.pub-cache").
|
||||
WithExec([]string{"/bin/sh", "-c", `yes | sdkmanager "ndk;28.2.13676358" "cmake;3.22.1" "build-tools;35.0.0" "platforms;android-34"`})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user