Don't try to run xcode-select on Ubuntu #32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # setup-swift doesn't support Swift 6 so use the Swift included in macos-latest. | |
| - name: Set up Swift | |
| uses: beeauvin/swiftly-swift@v1 | |
| with: | |
| swift-version: "6.1.2" | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # - name: Select Xcode | |
| # run: sudo xcode-select -s '/Applications/Xcode_16.0.app/Contents/Developer' | |
| - name: Get swift version | |
| run: swift --version # Swift 6.0 | |
| - name: Find swift-format path | |
| run: xcrun --find swift-format | |
| - name: Check Formatting | |
| run: swift format lint --strict --recursive Sources Tests Package.swift | |
| - name: Build | |
| run: swift build | |
| - name: Run tests | |
| run: swift test |