From 952ba9afdda32f926ed7c6b5b07463325798910a Mon Sep 17 00:00:00 2001 From: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> Date: Sun, 28 Dec 2025 14:36:54 -0500 Subject: [PATCH] Fix macOS 14 build & test in GitHub. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> --- .github/workflows/build-test.yaml | 11 +++++++++++ Package.swift | 1 - Sources/mas/Commands/List.swift | 2 +- Sources/mas/Commands/Outdated.swift | 2 +- Sources/mas/Commands/Search.swift | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index ecf89c89..c5622933 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -18,6 +18,8 @@ jobs: strategy: matrix: include: + - runner: macos-14 + xcode: brew - runner: macos-15 xcode: 26.1.1 - runner: macos-15-intel @@ -43,16 +45,25 @@ jobs: run: Scripts/setup_workflow_repo - name: ๐Ÿ›  Select Xcode version + if: matrix.xcode != 'brew' run: xcodes select ${{matrix.xcode}} - name: ๐Ÿ‘ข Bootstrap run: Scripts/bootstrap + - name: ๐Ÿ•Š Use Homebrew Core Swift + if: matrix.xcode == 'brew' + run: | + brew install swift + printf $'%s\n' "$(brew --prefix swift)/bin" >> "${GITHUB_PATH}" + - name: ๐Ÿ— Build run: Scripts/build build-test -c release - name: ๐Ÿงช Test + if: matrix.xcode != 'brew' run: Scripts/test - name: ๐Ÿšจ Lint + if: matrix.xcode != 'brew' run: Scripts/lint diff --git a/Package.swift b/Package.swift index 3c2ee123..1e00c086 100644 --- a/Package.swift +++ b/Package.swift @@ -10,7 +10,6 @@ private let swiftSettings = [ .enableUpcomingFeature("InternalImportsByDefault"), .enableUpcomingFeature("MemberImportVisibility"), .enableUpcomingFeature("NonisolatedNonsendingByDefault"), - .strictMemorySafety(), .treatAllWarnings(as: .error), ] diff --git a/Sources/mas/Commands/List.swift b/Sources/mas/Commands/List.swift index 0ac88782..79afb73e 100644 --- a/Sources/mas/Commands/List.swift +++ b/Sources/mas/Commands/List.swift @@ -51,7 +51,7 @@ extension MAS { let format = "%\(maxADAMIDLength)lu %@ (%@)" printer.info( installedApps.map { installedApp in - unsafe String( + String( format: format, installedApp.adamID, installedApp.name.padding(toLength: maxNameLength, withPad: " ", startingAt: 0), diff --git a/Sources/mas/Commands/Outdated.swift b/Sources/mas/Commands/Outdated.swift index 1a92a55b..a0711335 100644 --- a/Sources/mas/Commands/Outdated.swift +++ b/Sources/mas/Commands/Outdated.swift @@ -51,7 +51,7 @@ extension MAS { let format = "%\(maxADAMIDLength)lu %@ (%@ -> %@)" printer.info( outdatedApps.map { installedApp, newVersion in - unsafe String( + String( format: format, installedApp.adamID, installedApp.name.padding(toLength: maxNameLength, withPad: " ", startingAt: 0), diff --git a/Sources/mas/Commands/Search.swift b/Sources/mas/Commands/Search.swift index 7970e4ac..d740b2d4 100644 --- a/Sources/mas/Commands/Search.swift +++ b/Sources/mas/Commands/Search.swift @@ -43,7 +43,7 @@ extension MAS { let format = "%\(maxADAMIDLength)lu %@ (%@)\(price ? " %@" : "")" printer.info( catalogApps.map { catalogApp in - unsafe String( + String( format: format, catalogApp.adamID, catalogApp.name.padding(toLength: maxNameLength, withPad: " ", startingAt: 0),