mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Don't generate matrix jobs for Swift versions which aren't supported by the package. ### Motivation: Matrix workflows should not generate jobs for Swift versions < tools version, doing so wastes compute and adds noise. This means that: - New repos don’t need to manually opt-out of old Swift versions - Repos which have dropped an old Swift version (during a migration window) won’t have failing tests until it’s turned off centrally. ### Modifications: - The generate script now looks for `Package.swift` and `Package@swift-*.swift` files and uses the lowest tools version in any found file to determine the minimum supported Swift version - Any Swift version lower than the minimum is disregarded and no jobs are generated for it - A new parameter is added to the workflows which allows the minimum Swift version to be set manually (`minimum_swift_version`) ### Result: By default in this and downstream packages we don't generate matrix jobs for Swift versions which aren't supported by the package. An example of this working: https://github.com/apple/swift-nio/actions/runs/18711362977/job/53360387720?pr=3415