Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vision os unit test #3900

Draft
wants to merge 9 commits into
base: visionos-preview-rebased
Choose a base branch
from
Draft
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
27 changes: 18 additions & 9 deletions .github/composite_actions/get_platform_parameters/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ runs:
run: |
INPUT_PLATFORM=${{ inputs.platform }}
case $INPUT_PLATFORM in
iOS|tvOS|watchOS|macOS) ;;
iOS|tvOS|watchOS|macOS|visionOS) ;;
*) echo "Unsupported platform: $INPUT_PLATFORM"; exit 1 ;;
esac
shell: bash

- id: get-xcode-version
run: |
LATEST_XCODE_VERSION=15.3.0
LATEST_XCODE_VERSION=16.0.0
MINIMUM_XCODE_VERSION=15.0.1

INPUT_XCODE_VERSION=${{ inputs.xcode_version }}
Expand All @@ -66,35 +66,44 @@ runs:

case $INPUT_PLATFORM/$INPUT_XCODE_VERSION in
iOS/latest)
DEVICE="iPhone 15"
OS_VERSION="17.4"
DEVICE="iPhone 16"
OS_VERSION="18.0"
;;
iOS/*)
DEVICE="iPhone 14"
OS_VERSION="17.0.1"
;;
tvOS/latest)
DEVICE="Apple TV 4K (3rd generation)"
OS_VERSION="17.4"
OS_VERSION="18.0"
;;
tvOS/*)
DEVICE="Apple TV 4K (3rd generation)"
OS_VERSION="17.0"
;;
watchOS/latest)
DEVICE="Apple Watch Series 9 (45mm)"
OS_VERSION="10.4"
DEVICE="Apple Watch Series 10 (46mm)"
OS_VERSION="11.0"
;;
watchOS/*)
DEVICE="Apple Watch Series 8 (45mm)"
OS_VERSION="10.0"
;;
visionOS/latest)
DEVICE="Apple Vision Pro"
OS_VERSION="2.0"
;;
visionOS/*)
DEVICE="Apple Vision Pro"
OS_VERSION="1.0"
;;
esac

DESTINATION_MAPPING="{
\"iOS\": \"platform=iOS Simulator,name=$DEVICE,OS=$OS_VERSION\",
\"tvOS\": \"platform=tvOS Simulator,name=$DEVICE,OS=$OS_VERSION\",
\"watchOS\": \"platform=watchOS Simulator,name=$DEVICE,OS=$OS_VERSION\",
\"visionOS\": \"platform=visionOS Simulator,name=$DEVICE,OS=$OS_VERSION\",
\"macOS\": \"platform=macOS,arch=arm64\"
}"

Expand All @@ -119,8 +128,8 @@ runs:
"iOS": "iphonesimulator",
"tvOS": "appletvsimulator",
"watchOS": "watchsimulator",
"visionOS": "xrsimulator",
"macOS": "macosx"
}'
echo "sdk=$(echo $SDK_MAPPING | jq -r .$INPUT_PLATFORM)" >> $GITHUB_OUTPUT
shell: bash

shell: bash
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 @@ -46,12 +46,13 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [iOS, macOS, tvOS, watchOS]
platform: [iOS, macOS, tvOS, watchOS, visionOS]
exclude:
- platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
- platform: ${{ github.event.inputs.macos == 'false' && 'macOS' || 'None' }}
- platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
- platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
- platform: ${{ github.event.inputs.visionos == 'false' && 'visionOS' || 'None' }}
uses: ./.github/workflows/build_scheme.yml
with:
scheme: Amplify-Package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_scheme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

os-runner:
type: string
default: 'macos-latest'
default: 'macos-15'

save_build_cache:
type: boolean
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
inputs:
os-runner:
type: string
default: 'macos-latest'
default: 'macos-15'
scheme:
description: 'The scheme to run the tests'
required: true
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/run_unit_tests_platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
os-runner:
description: 'runs-on input'
type: string
default: 'macos-latest'
default: 'macos-15'

permissions:
contents: read
Expand All @@ -35,12 +35,13 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [iOS, macOS, tvOS, watchOS]
platform: [iOS, macOS, tvOS, watchOS, visionOS]
exclude:
- platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
- platform: ${{ github.event.inputs.macos == 'false' && 'macOS' || 'None' }}
- platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
- platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
- platform: ${{ github.event.inputs.visionos == 'false' && 'visionOS' || 'None' }}
uses: ./.github/workflows/run_unit_tests.yml
with:
scheme: ${{ inputs.scheme }}
Expand Down
Loading