From 0bacf0e0c512dc9769b8fce228abcc8a1232dbf0 Mon Sep 17 00:00:00 2001 From: Anthony DePasquale Date: Thu, 26 Dec 2024 14:03:53 +0100 Subject: [PATCH] Fix GitHub actions --- .github/workflows/swift.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 5326ac6..722a97a 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -11,23 +11,33 @@ on: jobs: build: - name: Swift ${{ matrix.swift }} + name: Swift ${{ matrix.swift }} on Xcode ${{ matrix.xcode }} strategy: matrix: - swift: ["5.8", "5.9", "5.10"] + include: + - swift: "5.9" + xcode: "15.2" + - swift: "5.10" + xcode: "15.2" runs-on: macos-14 steps: - uses: actions/checkout@v4 - - name: Setup Swift + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app + + - name: Set up Swift uses: swift-actions/setup-swift@v2 with: swift-version: ${{ matrix.swift }} - - if: ${{ matrix.swift == '5.8' }} - name: Xcode Select - run: sudo xcode-select -s /Applications/Xcode_14.3.1.app + - name: Install swift-format + run: brew install swift-format + + - name: Run swift-format + if: ${{ matrix.swift == '5.9' }} + run: swift-format lint --recursive . - name: Build run: swift build -v