-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Building per platform and running tests without building
- Loading branch information
Showing
4 changed files
with
333 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Build the Amplify Package for Testing | ||
on: | ||
workflow_call: | ||
inputs: | ||
platform: | ||
type: string | ||
required: true | ||
|
||
permissions: | ||
contents: read | ||
actions: write | ||
|
||
jobs: | ||
build-amplify-swift: | ||
name: Build Amplify-Package | ${{ inputs.platform }} | ||
runs-on: macos-13 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Get build parameters for ${{ inputs.platform }} | ||
id: platform | ||
uses: ./.github/composite_actions/get_platform_parameters | ||
with: | ||
platform: ${{ inputs.platform }} | ||
xcode_version: '14.3' | ||
|
||
- name: Attempt to use the dependencies cache | ||
id: dependencies-cache | ||
timeout-minutes: 4 | ||
continue-on-error: true | ||
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | ||
with: | ||
path: ~/Library/Developer/Xcode/DerivedData/Amplify | ||
key: amplify-packages-${{ hashFiles('Package.resolved') }} | ||
restore-keys: | | ||
amplify-packages- | ||
- name: Attempt to restore the build cache from main | ||
id: build-cache | ||
timeout-minutes: 4 | ||
continue-on-error: true | ||
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | ||
with: | ||
path: ${{ github.workspace }}/Build | ||
key: Amplify-${{ inputs.platform }}-cache-main | ||
|
||
- name: Build Amplify-Package for Testing | ||
id: build-package | ||
continue-on-error: true | ||
uses: ./.github/composite_actions/run_xcodebuild | ||
with: | ||
scheme: Amplify-Package | ||
destination: ${{ steps.platform.outputs.destination }} | ||
sdk: ${{ steps.platform.outputs.sdk }} | ||
xcode_path: /Applications/Xcode_14.3.app | ||
cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify | ||
derived_data_path: ${{ github.workspace }}/Build | ||
disable_package_resolution: ${{ steps.dependencies-cache.outputs.cache-hit }} | ||
build_for_testing: true | ||
|
||
- name: Save the build cache | ||
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | ||
with: | ||
path: ${{ github.workspace }}/Build | ||
key: Amplify-${{ inputs.platform }}-cache-${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.