From 22483f3da2bd40d626196e8f4b43a436ea919c6c Mon Sep 17 00:00:00 2001 From: Sebastian Villena <97059974+ruisebas@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:57:27 -0400 Subject: [PATCH] chore: fixing build cache and scheme --- .../build_minimum_supported_swift_platforms.yml | 2 +- .github/workflows/build_scheme.yml | 10 ++++------ .../xcshareddata/xcschemes/Amplify-Build.xcscheme | 12 +----------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_minimum_supported_swift_platforms.yml b/.github/workflows/build_minimum_supported_swift_platforms.yml index 9ac4f98025..581bc96902 100644 --- a/.github/workflows/build_minimum_supported_swift_platforms.yml +++ b/.github/workflows/build_minimum_supported_swift_platforms.yml @@ -26,7 +26,7 @@ jobs: os-runner: ${{ (matrix.platform == 'tvOS' || matrix.platform == 'watchOS') && 'macos-13' || 'macos-12' }} xcode-version: 'minimum' platform: ${{ matrix.platform }} - use_cache: false + save_build_cache: false confirm-pass: runs-on: ubuntu-latest diff --git a/.github/workflows/build_scheme.yml b/.github/workflows/build_scheme.yml index f5dbc206bb..dfb899d5cc 100644 --- a/.github/workflows/build_scheme.yml +++ b/.github/workflows/build_scheme.yml @@ -18,7 +18,7 @@ on: type: string default: 'macos-13' - use_cache: + save_build_cache: type: boolean default: true @@ -45,7 +45,6 @@ jobs: - name: Attempt to use the dependencies cache id: dependencies-cache - if: inputs.use_cache timeout-minutes: 4 continue-on-error: true uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 @@ -57,7 +56,6 @@ jobs: - name: Attempt to restore the build cache from main id: build-cache - if: inputs.use_cache timeout-minutes: 4 continue-on-error: true uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 @@ -79,14 +77,14 @@ jobs: disable_package_resolution: ${{ steps.dependencies-cache.outputs.cache-hit }} - name: Save the dependencies cache in main - if: inputs.use_cache && steps.dependencies-cache.outputs.cache-hit != 'true' && github.ref_name == 'main' + if: (success() || failure()) && inputs.save_build_cache && steps.dependencies-cache.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.dependencies-cache.outputs.cache-primary-key }} - name: Delete the old build cache - if: inputs.use_cache && steps.build-cache.outputs.cache-hit && github.ref_name == 'main' + if: (success() || failure()) && inputs.save_build_cache && steps.build-cache.outputs.cache-hit && github.ref_name == 'main' env: GH_TOKEN: ${{ github.token }} continue-on-error: true @@ -94,7 +92,7 @@ jobs: gh cache delete ${{ steps.build-cache.outputs.cache-primary-key }} - name: Save the build cache - if: inputs.use_cache && github.ref_name == 'main' + if: (success() || failure()) && inputs.save_build_cache && github.ref_name == 'main' uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 with: path: ${{ github.workspace }}/Build diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Build.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Build.xcscheme index cc42e44d53..dd2eea7c5b 100644 --- a/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Build.xcscheme +++ b/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Build.xcscheme @@ -4,8 +4,7 @@ version = "1.7"> + buildImplicitDependencies = "YES"> - - - -