Add Linux job to CI workflow #37
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| test-macos: | |
| name: Swift ${{ matrix.swift }} on macOS ${{ matrix.macos }} with Xcode ${{ matrix.xcode }} | |
| runs-on: macos-${{ matrix.macos }} | |
| env: | |
| DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - macos: "15" | |
| swift: "6.1" | |
| xcode: "16.3" | |
| - macos: "26" | |
| swift: "6.2" | |
| xcode: "26.0" | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Cache Swift Package Manager dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/org.swift.swiftpm | |
| .build | |
| key: ${{ runner.os }}-swift-${{ matrix.swift }}-spm-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-swift-${{ matrix.swift }}-spm- | |
| - name: Build | |
| run: swift build -v | |
| - name: Test | |
| run: swift test -v | |
| test-linux: | |
| name: Swift ${{ matrix.swift-version }} on Linux | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| swift-version: | |
| - 6.1.0 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Swift | |
| uses: vapor/swiftly-action@v0.2 | |
| with: | |
| toolchain: ${{ matrix.swift-version }} | |
| - name: Build | |
| run: swift build -v | |
| - name: Test | |
| run: swift test -v |