From 2859e9527067d34de386bdac76f27722e786fa5a Mon Sep 17 00:00:00 2001 From: 417-72KI <417.72ki@gmail.com> Date: Thu, 4 Jul 2024 02:55:03 +0900 Subject: [PATCH] fix cache keys --- .github/workflows/ci.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e43184c..45dcf70 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,9 +39,10 @@ jobs: cache-name: swiftpm with: path: .build - key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/Package.swift') }} + key: ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}-${{ env.cache-name }}-${{ hashFiles('**/Package.swift') }} restore-keys: | - ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}- ${{ runner.os }}-${{ github.job }}- ${{ runner.os }}- - name: Disable SwiftLint Plugin @@ -73,9 +74,10 @@ jobs: path: | Demo/.build Demo/Tools/.build - key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/Package.swift') }} + key: ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}-${{ env.cache-name }}-${{ hashFiles('**/Package.swift') }} restore-keys: | - ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}- ${{ runner.os }}-${{ github.job }}- ${{ runner.os }}- - name: Cache DerivedData @@ -84,9 +86,10 @@ jobs: cache-name: derived-data with: path: Demo/DerivedData - key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/Package.swift') }} + key: ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}-${{ env.cache-name }}-${{ hashFiles('**/Package.swift') }} restore-keys: | - ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}- ${{ runner.os }}-${{ github.job }}- ${{ runner.os }}- - name: Disable SwiftLint Plugin @@ -118,9 +121,10 @@ jobs: path: | DemoWithPackage/.build DemoWithPackage/Tools/.build - key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/Package.swift') }} + key: ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}-${{ env.cache-name }}-${{ hashFiles('**/Package.swift') }} restore-keys: | - ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}- ${{ runner.os }}-${{ github.job }}- ${{ runner.os }}- - name: Cache DerivedData @@ -129,9 +133,10 @@ jobs: cache-name: derived-data with: path: DemoWithPackage/DerivedData - key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/Package.swift') }} + key: ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}-${{ env.cache-name }}-${{ hashFiles('**/Package.swift') }} restore-keys: | - ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}-${{ env.cache-name }}- + ${{ runner.os }}-${{ github.job }}-${{ matrix.xcode_version }}- ${{ runner.os }}-${{ github.job }}- ${{ runner.os }}- - name: Disable SwiftLint Plugin