Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 57 additions & 13 deletions .github/composite_actions/get_platform_parameters/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
required: true
type: string
xcode_version:
description: "The version of Xcode. Available aliases are 'latest' and 'minimum'"
description: "The version of Xcode. Available aliases are 'latest', 'minimum', and 'beta'"
default: 'latest'
type: string
destination:
Expand Down Expand Up @@ -41,8 +41,9 @@ runs:

- id: get-xcode-version
run: |
LATEST_XCODE_VERSION=16.2.0
MINIMUM_XCODE_VERSION=16.1.0
LATEST_XCODE_VERSION=16.4.0
MINIMUM_XCODE_VERSION=16.0.0
DEFAULT_BETA_XCODE_VERSION=26.0_beta

INPUT_XCODE_VERSION=${{ inputs.xcode_version }}

Expand All @@ -51,6 +52,17 @@ runs:
XCODE_VERSION=$LATEST_XCODE_VERSION ;;
minimum)
XCODE_VERSION=$MINIMUM_XCODE_VERSION ;;
beta)
# Try to auto-detect installed Xcode 26 beta app name
DETECTED=$(ls -1 /Applications 2>/dev/null | grep -E '^Xcode_26.*\.app$' | head -n1 || true)
if [ -n "$DETECTED" ]; then
# strip prefix and suffix to get the version token used in the path template
# e.g., Xcode_26.0_beta.app -> 26.0_beta
XCODE_VERSION=$(echo "$DETECTED" | sed -E 's/^Xcode_//; s/\.app$//')
else
XCODE_VERSION=$DEFAULT_BETA_XCODE_VERSION
fi
;;
*)
XCODE_VERSION=$INPUT_XCODE_VERSION ;;
esac
Expand All @@ -66,36 +78,68 @@ runs:

case $INPUT_PLATFORM/$INPUT_XCODE_VERSION in
iOS/latest)
DEVICE="iPhone 16 Pro Max"
OS_VERSION="18.5"
;;
iOS/beta)
DEVICE="iPhone 16"
OS_VERSION="18.2"
OS_VERSION="26.0"
;;
iOS/minimum)
DEVICE="iPhone 16 Pro Max"
OS_VERSION="18.0"
;;
iOS/*)
DEVICE="iPhone 15"
OS_VERSION="17.0.1"
DEVICE="iPhone 16 Pro Max"
OS_VERSION="18.5"
;;
tvOS/latest)
DEVICE="Apple TV 4K (3rd generation)"
OS_VERSION="18.2"
OS_VERSION="18.5"
;;
tvOS/beta)
DEVICE="Apple TV 4K (3rd generation)"
OS_VERSION="26.0"
;;
tvOS/minimum)
DEVICE="Apple TV 4K (3rd generation)"
OS_VERSION="18.0"
;;
tvOS/*)
DEVICE="Apple TV 4K (3rd generation)"
OS_VERSION="17.0"
OS_VERSION="18.5"
;;
watchOS/latest)
DEVICE="Apple Watch Series 10 (46mm)"
OS_VERSION="11.2"
OS_VERSION="11.5"
;;
watchOS/beta)
DEVICE="Apple Watch Series 10 (46mm)"
OS_VERSION="26.0"
;;
watchOS/minimum)
DEVICE="Apple Watch SE (44mm) (2nd generation)"
OS_VERSION="11.0"
;;
watchOS/*)
DEVICE="Apple Watch Series 7 (45mm)"
OS_VERSION="10.0"
DEVICE="iPhone 16 Pro Max"
OS_VERSION="18.5"
;;
visionOS/latest)
DEVICE="Apple Vision Pro"
OS_VERSION="2.2"
OS_VERSION="2.5"
;;
visionOS/beta)
DEVICE="Apple Vision Pro"
OS_VERSION="26.0"
;;
visionOS/minimum)
DEVICE="Apple Vision Pro"
OS_VERSION="2.0"
;;
visionOS/*)
DEVICE="Apple Vision Pro"
OS_VERSION="1.0"
OS_VERSION="2.5"
;;
esac

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: 'Install Simulators if Needed'
description: 'Downloads and installs simulator runtimes for Xcode 16.0'

inputs:
xcode_version:
description: 'The Xcode version being used'
required: true
type: string
platform:
description: 'The platform to install simulators for'
required: true
type: string

runs:
using: "composite"
steps:
- name: Install Simulators for Xcode 16.0
shell: bash
run: |
XCODE_VERSION="${{ inputs.xcode_version }}"
PLATFORM="${{ inputs.platform }}"

# Only run for Xcode 16.0.0
if [[ "$XCODE_VERSION" != "16.0.0" ]]; then
echo "Not Xcode 16.0.0 (current: $XCODE_VERSION), skipping simulator installation"
exit 0
fi

# Skip for macOS as it doesn't need simulators
if [[ "$PLATFORM" == "macOS" ]]; then
echo "macOS doesn't need simulator downloads"
exit 0
fi

echo "Installing simulators for $PLATFORM with Xcode 16.0.0..."

# Ensure we're using Xcode 16.0.0 for simulator downloads
echo "Switching to Xcode 16.0.0..."
sudo xcode-select -switch /Applications/Xcode_16.0.0.app/Contents/Developer

# Verify the switch worked
echo "Current Xcode version:"
xcodebuild -version

# Show what's available before download
echo "Simulators before download:"
xcrun simctl list runtimes || true

# Download the platform runtime for Xcode 16.0.0
echo "Downloading $PLATFORM runtime for Xcode 16.0..."
case $PLATFORM in
iOS)
sudo xcodebuild -downloadPlatform iOS || echo "Failed to download iOS platform"
;;
tvOS)
sudo xcodebuild -downloadPlatform tvOS || echo "Failed to download tvOS platform"
;;
watchOS)
sudo xcodebuild -downloadPlatform watchOS || echo "Failed to download watchOS platform"
;;
visionOS)
sudo xcodebuild -downloadPlatform visionOS || echo "Failed to download visionOS platform"
;;
esac

# Show what's available after download
echo "Simulators after download:"
xcrun simctl list runtimes || true
2 changes: 1 addition & 1 deletion .github/workflows/api-breaking-changes-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
jobs:
build-and-check-api-breakage:
name: Build and Check API Breakage
runs-on: macos-latest
runs-on: macos-15

steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api_digester_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
check-swift-api-digester:
runs-on: macos-latest
runs-on: macos-15

steps:
- name: Checkout repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: ./.github/workflows/build_scheme.yml
with:
scheme: Amplify-Build
os-runner: 'macos-latest'
os-runner: 'macos-15'
xcode-version: 'minimum'
platform: ${{ matrix.platform }}
save_build_cache: false
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build_scheme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ jobs:
platform: ${{ inputs.platform }}
xcode_version: ${{ inputs.xcode-version }}

- name: Install simulators if needed
uses: ./.github/composite_actions/install_simulators_if_needed
with:
xcode_version: ${{ steps.platform.outputs.xcode-version }}
platform: ${{ inputs.platform }}

- name: Attempt to use the dependencies cache
id: dependencies-cache
timeout-minutes: 4
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/build_xcode_beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build with Xcode Beta | 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-xcode-beta:
name: Build Amplify Swift for ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [macOS]

uses: ./.github/workflows/build_scheme.yml
with:
scheme: Amplify-Build
os-runner: 'macos-15'
xcode-version: 'beta'
platform: ${{ matrix.platform }}
save_build_cache: false

confirm-pass:
runs-on: ubuntu-latest
name: Confirm Passing Build Steps
if: ${{ !cancelled() }}
needs: [build-amplify-with-xcode-beta]
env:
EXIT_CODE: ${{ contains(needs.*.result, 'failure') && 1 || 0 }}
steps:
- run: exit $EXIT_CODE
29 changes: 19 additions & 10 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Canary Test

on:
workflow_dispatch:
schedule:
- cron: '0 16 * * *' # Everyday 16:00 UTC

Expand All @@ -15,14 +16,14 @@ jobs:
strategy:
matrix:
include:
- os: macos-latest
xcode-version: 15.3.0
device: iPhone 15
version: 17.4
- os: macos-latest
xcode-version: 15.0.1
device: iPhone 14
version: 17.0.1
- os: macos-15
xcode-version: '16.4.0'
device: 'iPhone 16 Pro Max'
version: '18.5'
- os: macos-15
xcode-version: '16.0.0'
device: 'iPhone 16 Pro Max'
version: '18.0'
name: Canary Test - Xcode ${{ matrix.xcode-version }}
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -39,7 +40,7 @@ jobs:
run: amplify init --quickstart --frontend ios

- name: Setup Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0
uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
with:
ruby-version: '3.2.1'
bundler-cache: true
Expand All @@ -50,7 +51,15 @@ jobs:
sudo xcode-select -s "/Applications/Xcode_${{ matrix.xcode-version }}.app"
xcodebuild -version

- name: Install simulators if needed
uses: ./.github/composite_actions/install_simulators_if_needed
with:
xcode_version: ${{ matrix.xcode-version }}
platform: iOS

- name: Run Tests - ${{ matrix.device }} with iOS ${{ matrix.version }}
working-directory: ${{ github.workspace }}/canaries/example
run: bundle exec fastlane scan --device "${{ matrix.device }}" --deployment_target_version "${{ matrix.version }}"
run: |
export FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT=120
bundle exec fastlane scan --device "${{ matrix.device }}" --deployment_target_version "${{ matrix.version }}"

2 changes: 1 addition & 1 deletion .github/workflows/deploy_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
token: ${{steps.retrieve-token.outputs.token}}

- name: Setup Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0
uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
with:
ruby-version: '3.2.1'
bundler-cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
token: ${{steps.retrieve-token.outputs.token}}

- name: Setup Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0
uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
with:
ruby-version: '3.2.1'
bundler-cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
token: ${{steps.retrieve-token.outputs.token}}

- name: Setup Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0
uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
with:
ruby-version: '3.2.1'
bundler-cache: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Amplify Nightly Repeated Unit Test
name: Amplify Nightly Unit Test
on:
workflow_dispatch:
schedule:
Expand All @@ -13,7 +13,7 @@ concurrency:

jobs:
unit_tests:
name: ${{ matrix.scheme }} Repeated Unit Tests
name: ${{ matrix.scheme }} Nightly Unit Tests
strategy:
fail-fast: false
matrix:
Expand All @@ -35,6 +35,6 @@ jobs:
uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: ${{ matrix.scheme }}
timeout-minutes: 50
timeout-minutes: 60
generate_coverage_report: false
test_iterations_flags: -test-iterations 25 -run-tests-until-failure
retry_tests: false
2 changes: 1 addition & 1 deletion .github/workflows/release_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
token: ${{steps.retrieve-token.outputs.token}}

- name: Setup Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0
uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
with:
ruby-version: '3.2.1'
bundler-cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_kickoff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
jobs:
release:
name: Release
runs-on: macos-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
Expand Down
Loading
Loading