Skip to content

Commit

Permalink
using proper action
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisebas committed Aug 30, 2023
1 parent cb92887 commit 682f99b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/composite_actions/run_xcodebuild/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ runs:
fi
xcodebuild -version
xcodebuild build -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' $otherFlags | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}
xcodebuild $action -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' $otherFlags | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}
shell: bash
20 changes: 1 addition & 19 deletions .github/workflows/build_amplify_swift_for_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:

concurrency:
group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main'}}
cancel-in-progress: true

jobs:
build-for-testing-amplify-swift-iOS:
Expand Down Expand Up @@ -58,12 +58,6 @@ jobs:
with:
path: ${{ github.workspace }}/Build
key: amplify-iOS-latest-build-main
- 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 }}

build-for-testing-amplify-swift-macOS:
runs-on: macos-13
Expand Down Expand Up @@ -126,12 +120,6 @@ 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 }}

build-for-testing-amplify-swift-watchOS:
runs-on: macos-13
Expand Down Expand Up @@ -160,9 +148,3 @@ 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 }}
13 changes: 7 additions & 6 deletions .github/workflows/run_xcodebuild_test_platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,19 @@ jobs:
key: amplify-packages-${{ hashFiles('Package.resolved') }}
restore-keys: |
amplify-packages-
- name: Attempt to restore the Amplify build cache
id: restore-amplify-build
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
key: amplify-iOS-latest-build-main
- name: Attempt to restore the scheme build cache
id: restore-build
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
key: ${{ env.SCHEME }}-iOS-build-${{ github.sha }}
- name: Attempt to restore the Amplify build cache
if: steps.restore-build.outputs.cache-hit != true
id: restore-amplify-build
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
key: amplify-iOS-latest-build-main
- name: Run iOS Test Suite
id: run-tests
continue-on-error: ${{ env.RETRY_ON_ERROR == 'true' }}
Expand Down

0 comments on commit 682f99b

Please sign in to comment.