diff --git a/.github/workflows/spm-test.yml b/.github/workflows/spm-test.yml index 0e7cded..eff52b9 100644 --- a/.github/workflows/spm-test.yml +++ b/.github/workflows/spm-test.yml @@ -6,20 +6,27 @@ on: jobs: build: - runs-on: macos-latest + name: Swift ${{ matrix.swift }} on ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest] + swift: ["5.3", "5.4", "5.5"] + runs-on: ${{ matrix.os }} steps: - - uses: maxim-lobanov/setup-xcode@v1 + - uses: swift-actions/setup-swift@v2.1.0 with: - xcode-version: latest-stable + swift-version: ${{ matrix.swift }} + - name: Get swift version + run: swift --version - name: Checkout repository uses: actions/checkout@v4 - name: SPM Cache uses: actions/cache@v3 with: path: .build - key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + key: ${{ runner.os }}-spm-${{ matrix.swift }}-${{ hashFiles('**/Package.resolved') }} restore-keys: | - ${{ runner.os }}-spm- + ${{ runner.os }}-spm-${{ matrix.swift }} - name: Build run: swift build --build-tests - name: Test