diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9386b4..5efff76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,22 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - swift-version: ["6.1"] + swift-version: ["6.1", "6.2"] container: image: swift:${{ matrix.swift-version }} steps: - name: Checkout code uses: actions/checkout@v4 + - name: Cache Swift packages + uses: actions/cache@v4 + with: + path: .build + key: ${{ runner.os }}-spm-${{ matrix.swift-version }}-${{ hashFiles('**/Package.resolved') }} + restore-keys: | + ${{ runner.os }}-spm-${{ matrix.swift-version }}- + ${{ runner.os }}-spm- + - name: Build package run: swift build --verbose @@ -30,7 +39,7 @@ jobs: runs-on: macos-latest strategy: matrix: - swift-version: ["6.1"] + swift-version: ["6.1", "6.2"] steps: - name: Checkout code uses: actions/checkout@v4 @@ -40,6 +49,15 @@ jobs: with: swift-version: ${{ matrix.swift-version }} + - name: Cache Swift packages + uses: actions/cache@v4 + with: + path: .build + key: ${{ runner.os }}-spm-${{ matrix.swift-version }}-${{ hashFiles('**/Package.resolved') }} + restore-keys: | + ${{ runner.os }}-spm-${{ matrix.swift-version }}- + ${{ runner.os }}-spm- + - name: Build package run: swift build --verbose