Skip to content

Commit

Permalink
forcing cache update
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisebas committed Aug 30, 2023
1 parent 682f99b commit 6cb1996
Showing 1 changed file with 43 additions and 14 deletions.
57 changes: 43 additions & 14 deletions .github/workflows/build_amplify_swift_for_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
key: amplify-packages-${{ hashFiles('Package.resolved') }}
restore-keys: |
amplify-packages-
- name: Attempt to restore the build cache
- name: Restore the build cache
id: cache-build
timeout-minutes: 4
continue-on-error: true
uses: actions/cache/@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
key: amplify-iOS-latest-build-main
Expand All @@ -53,11 +53,10 @@ jobs:
disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
build_for_testing: true
other_flags: '-derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify'
- name: Save the build cache
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
key: amplify-iOS-latest-build-main
- name: Enforce a cache update
run: |
CACHE_KEY="amplify-iOS-latest-build-$GITHUB_SHA"
echo "STATE_CACHE_RESULT=${CACHE_KEY}" >> $GITHUB_ENV
build-for-testing-amplify-swift-macOS:
runs-on: macos-13
Expand All @@ -76,6 +75,14 @@ jobs:
key: amplify-packages-${{ hashFiles('Package.resolved') }}
restore-keys: |
amplify-packages-
- name: Restore the build cache
id: cache-build
timeout-minutes: 4
continue-on-error: true
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
key: amplify-macOS-latest-build-main
- name: Build Amplify Swift for macOS
uses: ./.github/composite_actions/run_xcodebuild
with:
Expand All @@ -86,12 +93,10 @@ jobs:
disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
build_for_testing: true
other_flags: '-derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify'
- name: Save the dependencies cache if necessary
if: steps.cache-packages.outputs.cache-hit != 'true' && github.ref_name == 'main'
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ~/Library/Developer/Xcode/DerivedData/Amplify
key: ${{ steps.cache-packages.outputs.cache-primary-key }}
- name: Enforce a cache update
run: |
CACHE_KEY="amplify-macOS-latest-build-$GITHUB_SHA"
echo "STATE_CACHE_RESULT=${CACHE_KEY}" >> $GITHUB_ENV
build-for-testing-amplify-swift-tvOS:
runs-on: macos-13
Expand All @@ -110,6 +115,14 @@ jobs:
key: amplify-packages-${{ hashFiles('Package.resolved') }}
restore-keys: |
amplify-packages-
- name: Restore the build cache
id: cache-build
timeout-minutes: 4
continue-on-error: true
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
key: amplify-tvOS-latest-build-main
- name: Build Amplify Swift for tvOS
uses: ./.github/composite_actions/run_xcodebuild
with:
Expand All @@ -120,6 +133,10 @@ jobs:
disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
build_for_testing: true
other_flags: '-derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify'
- name: Enforce a cache update
run: |
CACHE_KEY="amplify-tvOS-latest-build-$GITHUB_SHA"
echo "STATE_CACHE_RESULT=${CACHE_KEY}" >> $GITHUB_ENV
build-for-testing-amplify-swift-watchOS:
runs-on: macos-13
Expand All @@ -132,12 +149,20 @@ jobs:
id: cache-packages
timeout-minutes: 4
continue-on-error: true
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ~/Library/Developer/Xcode/DerivedData/Amplify
key: amplify-packages-${{ hashFiles('Package.resolved') }}
restore-keys: |
amplify-packages-
- name: Restore the build cache
id: cache-build
timeout-minutes: 4
continue-on-error: true
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
key: amplify-watchOS-latest-build-main
- name: Build Amplify Swift for watchOS
uses: ./.github/composite_actions/run_xcodebuild
with:
Expand All @@ -148,3 +173,7 @@ jobs:
disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
build_for_testing: true
other_flags: '-derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify'
- name: Enforce a cache update
run: |
CACHE_KEY="amplify-watchOS-latest-build-$GITHUB_SHA"
echo "STATE_CACHE_RESULT=${CACHE_KEY}" >> $GITHUB_ENV

0 comments on commit 6cb1996

Please sign in to comment.