Skip to content

Commit b47ec3e

Browse files
authored
chore: kickoff release
2 parents da563be + a3e267e commit b47ec3e

File tree

69 files changed

+3574
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3574
-250
lines changed

.github/composite_actions/get_platform_parameters/action.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,22 @@ runs:
3939
- id: get-xcode-version
4040
run: |
4141
LATEST_XCODE_VERSION=14.3.1
42-
MINIMUM_XCODE_VERSION=14.0.1
42+
MINIMUM_XCODE_VERSION_IOS_MAC=14.1.0
43+
MINIMUM_XCODE_VERSION_WATCH_TV=14.3.1
4344
4445
INPUT_XCODE_VERSION=${{ inputs.xcode_version }}
4546
4647
case $INPUT_XCODE_VERSION in
4748
latest)
4849
XCODE_VERSION=$LATEST_XCODE_VERSION ;;
4950
minimum)
50-
XCODE_VERSION=$MINIMUM_XCODE_VERSION ;;
51+
INPUT_PLATFORM=${{ inputs.platform }}
52+
case $INPUT_PLATFORM in
53+
iOS|macOS)
54+
XCODE_VERSION=$MINIMUM_XCODE_VERSION_IOS_MAC ;;
55+
tvOS|watchOS)
56+
XCODE_VERSION=$MINIMUM_XCODE_VERSION_WATCH_TV ;;
57+
esac ;;
5158
*)
5259
XCODE_VERSION=$INPUT_XCODE_VERSION ;;
5360
esac
@@ -63,9 +70,9 @@ runs:
6370
6471
DESTINATION_MAPPING='{
6572
"minimum": {
66-
"iOS": "platform=iOS Simulator,name=iPhone 14,OS=16.0",
67-
"tvOS": "platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.0",
68-
"watchOS": "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.0",
73+
"iOS": "platform=iOS Simulator,name=iPhone 14,OS=16.1",
74+
"tvOS": "platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.1",
75+
"watchOS": "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.1",
6976
"macOS": "platform=macOS,arch=x86_64"
7077
},
7178
"latest": {

.github/workflows/build_amplify_swift_platforms.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ jobs:
5252
- platform: ${{ github.event.inputs.macos == 'false' && 'macOS' || 'None' }}
5353
- platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
5454
- platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
55-
uses: ./.github/workflows/build_amplify_swift.yml
55+
uses: ./.github/workflows/build_scheme.yml
5656
with:
57+
scheme: Amplify-Package
5758
platform: ${{ matrix.platform }}
5859

5960
confirm-pass:

.github/workflows/build_minimum_supported_swift_platforms.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
name: Build with Minimum Supported Xcode Versions
1+
name: Build with minimum Xcode version | Amplify Swift
22
on:
33
workflow_dispatch:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
410

511
permissions:
612
contents: read
713
actions: write
814

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: ${{ github.ref_name != 'main'}}
18+
919
jobs:
1020
build-amplify-with-minimum-supported-xcode:
1121
name: Build Amplify Swift for ${{ matrix.platform }}
@@ -14,12 +24,13 @@ jobs:
1424
matrix:
1525
platform: [iOS, macOS, tvOS, watchOS]
1626

17-
uses: ./.github/workflows/build_amplify_swift.yml
27+
uses: ./.github/workflows/build_scheme.yml
1828
with:
19-
os-runner: macos-12
29+
scheme: Amplify-Build
30+
os-runner: ${{ (matrix.platform == 'tvOS' || matrix.platform == 'watchOS') && 'macos-13' || 'macos-12' }}
2031
xcode-version: 'minimum'
2132
platform: ${{ matrix.platform }}
22-
cacheable: false
33+
save_build_cache: false
2334

2435
confirm-pass:
2536
runs-on: ubuntu-latest

.github/workflows/build_amplify_swift.yml renamed to .github/workflows/build_scheme.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
name: Build Amplify-Package for the given platform
1+
name: Build scheme for the given platform and other parameters
22
on:
33
workflow_call:
44
inputs:
5+
scheme:
6+
type: string
7+
required: true
8+
59
platform:
610
type: string
711
required: true
@@ -14,7 +18,7 @@ on:
1418
type: string
1519
default: 'macos-13'
1620

17-
cacheable:
21+
save_build_cache:
1822
type: boolean
1923
default: true
2024

@@ -23,8 +27,8 @@ permissions:
2327
actions: write
2428

2529
jobs:
26-
build-amplify-swift:
27-
name: Build Amplify-Package | ${{ inputs.platform }}
30+
build-scheme:
31+
name: Build ${{ inputs.scheme }} | ${{ inputs.platform }}
2832
runs-on: ${{ inputs.os-runner }}
2933
steps:
3034
- name: Checkout repository
@@ -41,9 +45,8 @@ jobs:
4145

4246
- name: Attempt to use the dependencies cache
4347
id: dependencies-cache
44-
if: inputs.cacheable
4548
timeout-minutes: 4
46-
continue-on-error: ${{ inputs.cacheable }}
49+
continue-on-error: true
4750
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
4851
with:
4952
path: ~/Library/Developer/Xcode/DerivedData/Amplify
@@ -53,20 +56,18 @@ jobs:
5356
5457
- name: Attempt to restore the build cache from main
5558
id: build-cache
56-
if: inputs.cacheable
5759
timeout-minutes: 4
58-
continue-on-error: ${{ inputs.cacheable }}
60+
continue-on-error: true
5961
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
6062
with:
6163
path: ${{ github.workspace }}/Build
6264
key: Amplify-${{ inputs.platform }}-build-cache
6365

64-
- name: Build Amplify for Swift
66+
- name: Build ${{ inputs.scheme }}
6567
id: build-package
66-
continue-on-error: ${{ inputs.cacheable }}
6768
uses: ./.github/composite_actions/run_xcodebuild
6869
with:
69-
scheme: Amplify-Package
70+
scheme: ${{ inputs.scheme }}
7071
destination: ${{ steps.platform.outputs.destination }}
7172
sdk: ${{ steps.platform.outputs.sdk }}
7273
xcode_path: /Applications/Xcode_${{ steps.platform.outputs.xcode-version }}.app
@@ -75,22 +76,22 @@ jobs:
7576
disable_package_resolution: ${{ steps.dependencies-cache.outputs.cache-hit }}
7677

7778
- name: Save the dependencies cache in main
78-
if: inputs.cacheable && steps.dependencies-cache.outputs.cache-hit != 'true' && github.ref_name == 'main'
79+
if: inputs.save_build_cache && steps.dependencies-cache.outputs.cache-hit != 'true' && github.ref_name == 'main'
7980
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
8081
with:
8182
path: ~/Library/Developer/Xcode/DerivedData/Amplify
8283
key: ${{ steps.dependencies-cache.outputs.cache-primary-key }}
8384

8485
- name: Delete the old build cache
85-
if: inputs.cacheable && steps.build-cache.outputs.cache-hit && github.ref_name == 'main'
86+
if: inputs.save_build_cache && steps.build-cache.outputs.cache-hit && github.ref_name == 'main'
8687
env:
8788
GH_TOKEN: ${{ github.token }}
88-
continue-on-error: ${{ inputs.cacheable }}
89+
continue-on-error: true
8990
run: |
9091
gh cache delete ${{ steps.build-cache.outputs.cache-primary-key }}
9192
9293
- name: Save the build cache
93-
if: inputs.cacheable && github.ref_name == 'main'
94+
if: inputs.save_build_cache && github.ref_name == 'main'
9495
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
9596
with:
9697
path: ${{ github.workspace }}/Build

.github/workflows/unit_test.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -78,30 +78,30 @@ jobs:
7878
scheme: ${{ matrix.scheme }}
7979
generate_coverage_report: true
8080

81-
report-coverage:
82-
name: ${{ matrix.file.scheme }} Unit Tests
83-
needs: [unit-tests-with-coverage]
84-
strategy:
85-
fail-fast: false
86-
matrix:
87-
file: [
88-
{ scheme: Amplify, flags: 'Amplify,unit_tests' },
89-
{ scheme: AWSPluginsCore, flags: 'AWSPluginsCore,unit_tests' },
90-
{ scheme: AWSAPIPlugin, flags: 'API_plugin_unit_test,unit_tests' },
91-
{ scheme: AWSCloudWatchLoggingPlugin, flags: 'Logging_plugin_unit_test,unit_tests' },
92-
{ scheme: AWSCognitoAuthPlugin, flags: 'Auth_plugin_unit_test,unit_tests' },
93-
{ scheme: AWSDataStorePlugin, flags: 'DataStore_plugin_unit_test,unit_tests' },
94-
{ scheme: AWSLocationGeoPlugin, flags: 'Geo_plugin_unit_test,unit_tests' },
95-
{ scheme: AWSPredictionsPlugin, flags: 'Predictions_plugin_unit_test,unit_tests' },
96-
{ scheme: AWSPinpointAnalyticsPlugin, flags: 'Analytics_plugin_unit_test,unit_tests' },
97-
{ scheme: AWSPinpointPushNotificationsPlugin, flags: 'PushNotifications_plugin_unit_test,unit_tests' },
98-
{ scheme: AWSS3StoragePlugin, flags: 'Storage_plugin_unit_test,unit_tests' },
99-
{ scheme: CoreMLPredictionsPlugin, flags: 'CoreMLPredictions_plugin_unit_test,unit_tests' }
100-
]
101-
uses: ./.github/workflows/upload_coverage_report.yml
102-
with:
103-
scheme: ${{ matrix.file.scheme }}
104-
flags: ${{ matrix.file.flags }}
81+
# report-coverage:
82+
# name: ${{ matrix.file.scheme }} Unit Tests
83+
# needs: [unit-tests-with-coverage]
84+
# strategy:
85+
# fail-fast: false
86+
# matrix:
87+
# file: [
88+
# { scheme: Amplify, flags: 'Amplify,unit_tests' },
89+
# { scheme: AWSPluginsCore, flags: 'AWSPluginsCore,unit_tests' },
90+
# { scheme: AWSAPIPlugin, flags: 'API_plugin_unit_test,unit_tests' },
91+
# { scheme: AWSCloudWatchLoggingPlugin, flags: 'Logging_plugin_unit_test,unit_tests' },
92+
# { scheme: AWSCognitoAuthPlugin, flags: 'Auth_plugin_unit_test,unit_tests' },
93+
# { scheme: AWSDataStorePlugin, flags: 'DataStore_plugin_unit_test,unit_tests' },
94+
# { scheme: AWSLocationGeoPlugin, flags: 'Geo_plugin_unit_test,unit_tests' },
95+
# { scheme: AWSPredictionsPlugin, flags: 'Predictions_plugin_unit_test,unit_tests' },
96+
# { scheme: AWSPinpointAnalyticsPlugin, flags: 'Analytics_plugin_unit_test,unit_tests' },
97+
# { scheme: AWSPinpointPushNotificationsPlugin, flags: 'PushNotifications_plugin_unit_test,unit_tests' },
98+
# { scheme: AWSS3StoragePlugin, flags: 'Storage_plugin_unit_test,unit_tests' },
99+
# { scheme: CoreMLPredictionsPlugin, flags: 'CoreMLPredictions_plugin_unit_test,unit_tests' }
100+
# ]
101+
# uses: ./.github/workflows/upload_coverage_report.yml
102+
# with:
103+
# scheme: ${{ matrix.file.scheme }}
104+
# flags: ${{ matrix.file.flags }}
105105

106106
unit-test-pass-confirmation:
107107
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)