diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 5326ac6..716fa35 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: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app + - name: Setup 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 --recursive . --mode lint --configuration .swift-format.json - name: Build run: swift build -v