Cache build directory of linux containers

SwiftPM uses caches heavily to reduce compilation and download time.
Before this change, we through these caches away with each container.
This commit is contained in:
T. R. Bernstein
2026-03-22 15:40:47 +01:00
committed by T. R. Bernstein
parent ac1c86c431
commit 31ed16c828
2 changed files with 2 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ struct GenerateDocumentationCommand: Script {
try await docker(
"run", "--rm",
"-v", "\(tempDirectory.path):/code",
"-v", "swift-inotify-build-cache:/code/.build",
"--platform", Docker.getLinuxPlatformStringWithHostArchitecture(),
"-w", "/code",
"swift:latest",

View File

@@ -25,6 +25,7 @@ struct TestCommand: Script {
try await docker(
"run",
"-v", "\(currentDirectory):/code",
"-v", "swift-inotify-build-cache:/code/.build",
"--security-opt", "systempaths=unconfined",
"--platform", Docker.getLinuxPlatformStringWithHostArchitecture(),
"-w", "/code", "swift:latest",