Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/scripts/matrix/generate-matrix.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,8 @@ struct MinimumVersion {
"""
)
}
self.floor = version
// The floor is the minor release, not the patch: a `6.2` label must satisfy a `6.2.3` minimum.
self.floor = SwiftVersion(majorMinor: "\(version.major).\(version.minor)")
}

/// A nightly is always kept: it is not a released version this can order.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,25 @@ struct MinimumVersionTests {
#expect(generated.versions == ["6.2", "6.3"])
}

@Test("A patch tools version keeps its own minor release, which is published as major.minor")
func patchToolsVersionKeepsItsMinorRelease() throws {
let generated = try Generator.run(
["ENABLE_LINUX": "true", "LINUX_SWIFT_VERSIONS": #"["6.1","6.2","6.3"]"#],
manifests: ["Package.swift": Generator.manifest(toolsVersion: "6.2.3")]
)
#expect(generated.versions == ["6.2", "6.3"])
}

@Test("A patch minimum_swift_version keeps its own minor release")
func patchExplicitMinimumKeepsItsMinorRelease() throws {
let generated = try Generator.run([
"ENABLE_LINUX": "true",
"LINUX_SWIFT_VERSIONS": #"["6.1","6.2","6.3"]"#,
"MINIMUM_SWIFT_VERSION": "6.2.3",
])
#expect(generated.versions == ["6.2", "6.3"])
}

@Test("The lowest of all manifests wins")
func lowestManifestWins() throws {
let generated = try Generator.run(
Expand Down
Loading