Skip to content

Move ENVIRONMENT to xcconfig #233

Move ENVIRONMENT to xcconfig

Move ENVIRONMENT to xcconfig #233

name: Compatibility Test
on:
workflow_dispatch:
push:
branches:
- develop
pull_request:
types: [opened, synchronize, reopened]
branches:
- 'release/**'
- 'develop'
permissions:
contents: read
jobs:
tests:
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
# Xcode 26 - iOS 18
- version: '18.6'
runtime: 'iOS-18-6'
device: 'iPhone 16 Pro'
displayname: 'iPhone-16-Pro'
os: 'macos-15'
xcode_version: '26.0'
needs_custom_sim: false
# Xcode 16.2 - iOS 17
- version: '17.5'
runtime: 'iOS-17-5'
device: 'iPhone 15 Pro'
displayname: 'iPhone-15-Pro'
os: 'macos-15'
xcode_version: '16.4'
needs_custom_sim: true
# Xcode 16.2 - iOS 16
- version: '16.4'
runtime: 'iOS-16-4'
device: 'iPhone 14 Pro'
displayname: 'iPhone-14-Pro'
os: 'macos-15'
xcode_version: '16.4'
needs_custom_sim: true
steps:
- uses: actions/checkout@v5
- uses: n1hility/cancel-previous-runs@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare custom devices
run: |
sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes
- name: Select Xcode ${{ matrix.xcode_version }}
if: matrix.xcode_version != ''
run: |
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version }}.app
xcodebuild -version
- name: Download and install simulator runtime
if: matrix.needs_custom_sim == true
run: |
echo "Downloading iOS ${{ matrix.version }} runtime using xcodes..."
sudo xcodes runtimes install "iOS ${{ matrix.version }}"
# Verify simulator is available
xcrun simctl list runtimes
# This step is now handled by the xcodes tool above
- name: Create simulator ${{ matrix.version }}
run: |
xcrun simctl list devices ${version}
xcrun simctl create ${displayname} "${device}" "com.apple.CoreSimulator.SimRuntime.${runtime}"
env:
version: ${{ matrix.version }}
displayname: ${{ matrix.displayname }}
device: ${{ matrix.device }}
runtime: ${{ matrix.runtime }}
- name: Build and test
run: |
xcodebuild -version
xcodebuild build test -project ${project} -scheme "${scheme}" ${params} -destination "${destination}" ## | xcpretty --utf --color && exit ${PIPESTATUS[0]}
env:
project: 'Adyen.xcodeproj'
params: "-skipPackagePluginValidation"
scheme: 'IntegrationUIKitTests'
destination: "OS=${{ matrix.version }},name=${{ matrix.displayname }}"