Skip to content

Commit

Permalink
adding condition to enforce
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisebas committed Aug 30, 2023
1 parent 6cb1996 commit 5f68ad3
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/build_amplify_swift_for_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f68ad3

Please sign in to comment.