From d637b95450b652bec18ca083796bc1c93fff8b48 Mon Sep 17 00:00:00 2001 From: laosb Date: Thu, 23 Oct 2025 20:01:04 +0800 Subject: [PATCH] chore: Add Swift 6.2 to CI matrix and cache packages --- .github/workflows/ci.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) 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