From 31ed16c82867d54bff84793499da6ebf65c19dbd Mon Sep 17 00:00:00 2001 From: "T. R. Bernstein" Date: Sun, 22 Mar 2026 15:40:47 +0100 Subject: [PATCH] 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. --- Sources/TaskCLI/GenerateDocumentation Command.swift | 1 + Sources/TaskCLI/Test Command.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/Sources/TaskCLI/GenerateDocumentation Command.swift b/Sources/TaskCLI/GenerateDocumentation Command.swift index c7fdd83..100821c 100644 --- a/Sources/TaskCLI/GenerateDocumentation Command.swift +++ b/Sources/TaskCLI/GenerateDocumentation Command.swift @@ -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", diff --git a/Sources/TaskCLI/Test Command.swift b/Sources/TaskCLI/Test Command.swift index 28f74a7..8bca657 100644 --- a/Sources/TaskCLI/Test Command.swift +++ b/Sources/TaskCLI/Test Command.swift @@ -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",