Skip to content

Commit

Permalink
chore: kickoff release
Browse files Browse the repository at this point in the history
  • Loading branch information
lawmicha authored Apr 29, 2024
2 parents da563be + 2b2856a commit 56ec313
Show file tree
Hide file tree
Showing 68 changed files with 3,550 additions and 226 deletions.
17 changes: 12 additions & 5 deletions .github/composite_actions/get_platform_parameters/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,22 @@ runs:
- id: get-xcode-version
run: |
LATEST_XCODE_VERSION=14.3.1
MINIMUM_XCODE_VERSION=14.0.1
MINIMUM_XCODE_VERSION_IOS_MAC=14.1.0
MINIMUM_XCODE_VERSION_WATCH_TV=14.3.1
INPUT_XCODE_VERSION=${{ inputs.xcode_version }}
case $INPUT_XCODE_VERSION in
latest)
XCODE_VERSION=$LATEST_XCODE_VERSION ;;
minimum)
XCODE_VERSION=$MINIMUM_XCODE_VERSION ;;
INPUT_PLATFORM=${{ inputs.platform }}
case $INPUT_PLATFORM in
iOS|macOS)
XCODE_VERSION=$MINIMUM_XCODE_VERSION_IOS_MAC ;;
tvOS|watchOS)
XCODE_VERSION=$MINIMUM_XCODE_VERSION_WATCH_TV ;;
esac ;;
*)
XCODE_VERSION=$INPUT_XCODE_VERSION ;;
esac
Expand All @@ -63,9 +70,9 @@ runs:
DESTINATION_MAPPING='{
"minimum": {
"iOS": "platform=iOS Simulator,name=iPhone 14,OS=16.0",
"tvOS": "platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.0",
"watchOS": "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.0",
"iOS": "platform=iOS Simulator,name=iPhone 14,OS=16.1",
"tvOS": "platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.1",
"watchOS": "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.1",
"macOS": "platform=macOS,arch=x86_64"
},
"latest": {
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build_amplify_swift_platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ jobs:
- platform: ${{ github.event.inputs.macos == 'false' && 'macOS' || 'None' }}
- platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
- platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/build_amplify_swift.yml
uses: ./.github/workflows/build_scheme.yml
with:
scheme: Amplify-Package
platform: ${{ matrix.platform }}

confirm-pass:
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/build_minimum_supported_swift_platforms.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
name: Build with Minimum Supported Xcode Versions
name: Build with minimum Xcode version | Amplify Swift
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main

permissions:
contents: read
actions: write

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

jobs:
build-amplify-with-minimum-supported-xcode:
name: Build Amplify Swift for ${{ matrix.platform }}
Expand All @@ -14,12 +24,13 @@ jobs:
matrix:
platform: [iOS, macOS, tvOS, watchOS]

uses: ./.github/workflows/build_amplify_swift.yml
uses: ./.github/workflows/build_scheme.yml
with:
os-runner: macos-12
scheme: Amplify-Build
os-runner: ${{ (matrix.platform == 'tvOS' || matrix.platform == 'watchOS') && 'macos-13' || 'macos-12' }}
xcode-version: 'minimum'
platform: ${{ matrix.platform }}
cacheable: false
save_build_cache: false

confirm-pass:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Build Amplify-Package for the given platform
name: Build scheme for the given platform and other parameters
on:
workflow_call:
inputs:
scheme:
type: string
required: true

platform:
type: string
required: true
Expand All @@ -14,7 +18,7 @@ on:
type: string
default: 'macos-13'

cacheable:
save_build_cache:
type: boolean
default: true

Expand All @@ -23,8 +27,8 @@ permissions:
actions: write

jobs:
build-amplify-swift:
name: Build Amplify-Package | ${{ inputs.platform }}
build-scheme:
name: Build ${{ inputs.scheme }} | ${{ inputs.platform }}
runs-on: ${{ inputs.os-runner }}
steps:
- name: Checkout repository
Expand All @@ -41,9 +45,8 @@ jobs:

- name: Attempt to use the dependencies cache
id: dependencies-cache
if: inputs.cacheable
timeout-minutes: 4
continue-on-error: ${{ inputs.cacheable }}
continue-on-error: true
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ~/Library/Developer/Xcode/DerivedData/Amplify
Expand All @@ -53,20 +56,18 @@ jobs:
- name: Attempt to restore the build cache from main
id: build-cache
if: inputs.cacheable
timeout-minutes: 4
continue-on-error: ${{ inputs.cacheable }}
continue-on-error: true
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
key: Amplify-${{ inputs.platform }}-build-cache

- name: Build Amplify for Swift
- name: Build ${{ inputs.scheme }}
id: build-package
continue-on-error: ${{ inputs.cacheable }}
uses: ./.github/composite_actions/run_xcodebuild
with:
scheme: Amplify-Package
scheme: ${{ inputs.scheme }}
destination: ${{ steps.platform.outputs.destination }}
sdk: ${{ steps.platform.outputs.sdk }}
xcode_path: /Applications/Xcode_${{ steps.platform.outputs.xcode-version }}.app
Expand All @@ -75,22 +76,22 @@ jobs:
disable_package_resolution: ${{ steps.dependencies-cache.outputs.cache-hit }}

- name: Save the dependencies cache in main
if: inputs.cacheable && steps.dependencies-cache.outputs.cache-hit != 'true' && github.ref_name == 'main'
if: 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.cacheable && steps.build-cache.outputs.cache-hit && github.ref_name == 'main'
if: inputs.save_build_cache && steps.build-cache.outputs.cache-hit && github.ref_name == 'main'
env:
GH_TOKEN: ${{ github.token }}
continue-on-error: ${{ inputs.cacheable }}
continue-on-error: true
run: |
gh cache delete ${{ steps.build-cache.outputs.cache-primary-key }}
- name: Save the build cache
if: inputs.cacheable && github.ref_name == 'main'
if: inputs.save_build_cache && github.ref_name == 'main'
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
Expand Down
211 changes: 211 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/Amplify-Build.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Amplify"
BuildableName = "Amplify"
BlueprintName = "Amplify"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AWSCognitoAuthPlugin"
BuildableName = "AWSCognitoAuthPlugin"
BlueprintName = "AWSCognitoAuthPlugin"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AWSDataStorePlugin"
BuildableName = "AWSDataStorePlugin"
BlueprintName = "AWSDataStorePlugin"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AWSCloudWatchLoggingPlugin"
BuildableName = "AWSCloudWatchLoggingPlugin"
BlueprintName = "AWSCloudWatchLoggingPlugin"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CoreMLPredictionsPlugin"
BuildableName = "CoreMLPredictionsPlugin"
BlueprintName = "CoreMLPredictionsPlugin"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AWSS3StoragePlugin"
BuildableName = "AWSS3StoragePlugin"
BlueprintName = "AWSS3StoragePlugin"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AWSPredictionsPlugin"
BuildableName = "AWSPredictionsPlugin"
BlueprintName = "AWSPredictionsPlugin"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AWSPinpointPushNotificationsPlugin"
BuildableName = "AWSPinpointPushNotificationsPlugin"
BlueprintName = "AWSPinpointPushNotificationsPlugin"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AWSPinpointAnalyticsPlugin"
BuildableName = "AWSPinpointAnalyticsPlugin"
BlueprintName = "AWSPinpointAnalyticsPlugin"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AWSAPIPlugin"
BuildableName = "AWSAPIPlugin"
BlueprintName = "AWSAPIPlugin"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AWSLocationGeoPlugin"
BuildableName = "AWSLocationGeoPlugin"
BlueprintName = "AWSLocationGeoPlugin"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AWSPluginsCore"
BuildableName = "AWSPluginsCore"
BlueprintName = "AWSPluginsCore"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading

0 comments on commit 56ec313

Please sign in to comment.