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,60 @@
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..."

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

# Download the platform - this will get the appropriate version for Xcode 16.0
echo "Downloading $PLATFORM platform 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]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why only 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
23 changes: 15 additions & 8 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 Down Expand Up @@ -50,6 +51,12 @@ 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 }}"
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ app.post("/notifications", async (req, res) => {
data: data ?? {}
}
try {
const cmd = `echo '${JSON.stringify(apns)}' | xcrun simctl --set testing push ${deviceId} ${bundleId} -`
const cmd = `echo '${JSON.stringify(apns)}' | xcrun simctl push ${deviceId} ${bundleId} -`
await run(cmd)
res.send("Done")
} catch (error) {
Expand All @@ -60,7 +60,7 @@ app.post('/uninstall', async (req, res) => {
console.log("POST /uninstall ")
const { deviceId } = req.body
try {
const cmd = `xcrun simctl --set testing uninstall ${deviceId} ${bundleId}`
const cmd = `xcrun simctl uninstall ${deviceId} ${bundleId}`
await run(cmd)
res.send("Done")
} catch (error) {
Expand All @@ -73,7 +73,7 @@ app.post('/boot', async (req, res) => {
console.log("POST /boot ")
const { deviceId } = req.body
try {
const cmd = `xcrun simctl --set testing bootstatus ${deviceId} -b`
const cmd = `xcrun simctl bootstatus ${deviceId} -b`
await run(cmd)
res.send("Done")
} catch (error) {
Expand All @@ -84,4 +84,4 @@ app.post('/boot', async (req, res) => {

app.listen(9293, () => {
console.log("Starting server")
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
},
"testTargets" : [
{
"parallelizable" : true,
"target" : {
"containerPath" : "container:PushNotificationHostApp.xcodeproj",
"identifier" : "6084F1AB2967B87200434CBF",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
parallelizable = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6084F1AB2967B87200434CBF"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
parallelizable = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6875F9882A3CD258001C9AAF"
Expand Down
Loading
Loading