From d951f5350405b74decfaf0889c42cc44752e60a9 Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Mon, 5 Aug 2024 15:15:42 +0100 Subject: [PATCH] fix SPM --- .github/workflows/check.yaml | 4 ++-- Sources/BuildTool/BuildTool.swift | 27 +++++++++++++++++---------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 26244aba..b17b1574 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -48,7 +48,7 @@ jobs: needs: generate-matrices strategy: fail-fast: false - matrix: ${{ fromJson(needs.generate-matrices.outputs.matrix) }} + matrix: ${{ fromJson(needs.generate-matrices.outputs.matrix).withoutPlatform }} steps: - uses: actions/checkout@v4 @@ -67,7 +67,7 @@ jobs: strategy: fail-fast: false - matrix: ${{ fromJson(needs.generate-matrices.outputs.matrix) }} + matrix: ${{ fromJson(needs.generate-matrices.outputs.matrix).withPlatform }} steps: - uses: actions/checkout@v4 diff --git a/Sources/BuildTool/BuildTool.swift b/Sources/BuildTool/BuildTool.swift index 893ce72c..049480d7 100644 --- a/Sources/BuildTool/BuildTool.swift +++ b/Sources/BuildTool/BuildTool.swift @@ -99,18 +99,25 @@ struct BuildAndTestLibrary: ParsableCommand { struct GenerateMatrices: ParsableCommand { mutating func run() throws { + let tooling = [ + [ + "xcode-version": "15.3", + "swift-version": 5, + ], + [ + "xcode-version": "16-beta", + "swift-version": 6, + ], + ] + let matrix: [String: Any] = [ - "tooling": [ - [ - "xcode-version": "15.3", - "swift-version": 5, - ], - [ - "xcode-version": "16-beta", - "swift-version": 6, - ], + "without-platform": [ + "tooling": tooling, + ], + "with-platform": [ + "tooling": tooling, + "platform": Platform.allCases.map(\.rawValue), ], - "platform": Platform.allCases.map(\.rawValue), ] // I’m assuming the JSONSerialization output has no newlines