From 5f68ad3fc689cfee972dc30043b0ab4a9bc38441 Mon Sep 17 00:00:00 2001 From: Sebastian Villena <97059974+ruisebas@users.noreply.github.com> Date: Wed, 30 Aug 2023 16:16:20 -0400 Subject: [PATCH] adding condition to enforce --- .../build_amplify_swift_for_testing.yml | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_amplify_swift_for_testing.yml b/.github/workflows/build_amplify_swift_for_testing.yml index 7108aa0227..f81f41a1c9 100644 --- a/.github/workflows/build_amplify_swift_for_testing.yml +++ b/.github/workflows/build_amplify_swift_for_testing.yml @@ -44,19 +44,35 @@ jobs: with: path: ${{ github.workspace }}/Build key: amplify-iOS-latest-build-main - - name: Build Amplify Swift for iOS - uses: ./.github/composite_actions/run_xcodebuild - with: - scheme: Amplify-Package - destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4' - xcode_path: '/Applications/Xcode_14.3.app' - disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }} - build_for_testing: true - other_flags: '-derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify' + # - name: Build Amplify Swift for iOS + # uses: ./.github/composite_actions/run_xcodebuild + # with: + # scheme: Amplify-Package + # destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4' + # xcode_path: '/Applications/Xcode_14.3.app' + # disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }} + # build_for_testing: true + # other_flags: '-derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify' + - name: Print Env before + run: | + env - name: Enforce a cache update + if: steps.cache-build.outputs.cache-hit run: | CACHE_KEY="amplify-iOS-latest-build-$GITHUB_SHA" echo "STATE_CACHE_RESULT=${CACHE_KEY}" >> $GITHUB_ENV + - name: Print Env after + run: | + env + + - name: Enforce a cache update again with quotes + if: steps.cache-build.outputs.cache-hit + run: | + CACHE_KEY="amplify-iOS-latest-build-$GITHUB_SHA" + echo "STATE_CACHE_RESULT=${CACHE_KEY}" >> "$GITHUB_ENV" + - name: Print Env after again + run: | + env build-for-testing-amplify-swift-macOS: runs-on: macos-13