Skip to content

Reconsider caching the full Swift toolchain (~1 GB per version) + document matrix cost #113

Open

Description

@leogdion

Problem

Consumer repos each carry ~1 GB Swift toolchain caches per Swift version (e.g. swift-6.3-ubuntu2404 ≈ 1015 MB, swift-6.2.3-ubuntu2404 ≈ 957 MB). Repos testing two Swift versions pay ~2 GB just for toolchains, and these are saved on PR refs too (see #111), so they multiply.

Questions / proposal

  • Is caching the full toolchain tarball worth it vs. pulling from swift.org / using the official Swift container image, which is often comparably fast and costs zero cache quota?
  • If we keep toolchain caching, it should only be saved on the default branch (covered by Gate cache saves to the default branch (eliminate PR-stranded caches) #111) and ideally shared, not re-saved per PR.
  • Consider documenting the matrix cost: each (OS × Swift version × Windows-server image) combination multiplies cache count. Trimming Swift versions / Windows images the project doesn't need to support is a quick win.

Acceptance criteria

  • Decision recorded on whether to keep toolchain caching by default
  • If kept, toolchain caches are not written on PR refs
  • README notes the matrix-multiplication storage effect with guidance to trim unused combinations

Activity

  1. added
    enhancementNew feature or request
    questionFurther information is requested
    cacheActions cache storage / cache-key behavior
    on Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cacheActions cache storage / cache-key behaviorenhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions