From c9a7d1ed3eaf780ad4ba2a64f839457f379e258a Mon Sep 17 00:00:00 2001 From: Alex Guretzki Date: Wed, 29 Jan 2025 14:09:54 +0100 Subject: [PATCH 1/4] restoring compatibility tests --- .github/workflows/build.yml | 110 ++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..f644277edd --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,110 @@ +name: Compatibility Test + +on: + workflow_dispatch: + push: + branches: + - develop + - release/** + +jobs: + tests: + runs-on: ${{ matrix.os }} + continue-on-error: false + strategy: + fail-fast: false + matrix: + include: + + - version: '17.2' + runtime: 'iOS-17-2' + device: 'iPhone 15' + displayname: 'iPhone-15' + os: 'macos-14-xlarge' + xcode_version: '15.1' + needs_custom_sim: false # Takes the shipped simulator that comes with Xcode 15 + + - version: '17.2' + runtime: 'iOS-17-2' + device: 'iPad Air (5th generation)' + displayname: 'iPad-Air-5' + os: 'macos-14-xlarge' + xcode_version: '15.1' + needs_custom_sim: false # Takes the shipped simulator that comes with Xcode 15 + + - version: '16.4' + runtime: 'iOS-16-4' + device: 'iPhone 14' + displayname: 'iPhone-14' + os: 'macos-13' + xcode_version: '14.3' + needs_custom_sim: false # Takes the shipped simulator that comes with Xcode 14 + + # Github deprecated macos-12 runners + # so we have to find another solution to test on older iOS versions + # + # - version: '15.0' + # runtime: 'iOS-15-0' + # device: 'iPhone 13' + # displayname: 'iPhone-13' + # os: 'macos-12-xl' + # needs_custom_sim: true + # + # - version: '14.2' + # device: 'iPhone 12' + # displayname: 'iPhone-12' + # runtime: 'iOS-14-2' + # os: 'macos-12-xl' + # needs_custom_sim: true + # + # - version: '13.7' + # runtime: 'iOS-13-7' + # device: 'iPhone 11' + # displayname: 'iPhone-11' + # os: 'macos-12-xl' + # needs_custom_sim: true + + steps: + - uses: actions/checkout@v4 + - 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: | + ls /Applications/Xcode_*.app + sudo xcode-select -s /Applications/Xcode_${xcode_version}.app/Contents/Developer + env: + xcode_version: ${{ matrix.xcode_version }} + + - name: Download simulator if needed (${{ matrix.version }}) + if: matrix.needs_custom_sim + run: | + xcversion simulators --install="iOS ${version}" + env: + version: ${{ matrix.version }} + + - 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 }}" From 599ca7ea355f1c6f58f8e1bf912db27114583592 Mon Sep 17 00:00:00 2001 From: Alex Guretzki Date: Wed, 29 Jan 2025 14:36:37 +0100 Subject: [PATCH 2/4] fix carthage tests --- Scripts/test-carthage-integration.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/test-carthage-integration.sh b/Scripts/test-carthage-integration.sh index 94b41684e8..f4810cdbab 100755 --- a/Scripts/test-carthage-integration.sh +++ b/Scripts/test-carthage-integration.sh @@ -160,7 +160,7 @@ cp "../Demo/Configuration.swift" Source/Configuration.swift xcodegen generate echo_header "Run Tests" -xcodebuild build test -project $PROJECT_NAME.xcodeproj -scheme App -destination "name=iPhone 15" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty && exit ${PIPESTATUS[0]} +xcodebuild build test -project $PROJECT_NAME.xcodeproj -scheme App -destination "name=iPhone 16" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty && exit ${PIPESTATUS[0]} if [ "$NEED_CLEANUP" == true ] then From faacbb0c84e95f92ee52807f0d96abd400db2a88 Mon Sep 17 00:00:00 2001 From: Alex Guretzki Date: Wed, 29 Jan 2025 15:39:06 +0100 Subject: [PATCH 3/4] renamed build.yml to test-compatibility.yml --- .../workflows/{build.yml => verify-older-os-compatibility.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build.yml => verify-older-os-compatibility.yml} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/verify-older-os-compatibility.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/verify-older-os-compatibility.yml From d67e357b2e7a0473df8f7cd7e22fa019c219c10b Mon Sep 17 00:00:00 2001 From: Alex Guretzki Date: Thu, 30 Jan 2025 12:20:21 +0100 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c11f46c5db..7c045d8792 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/adyen/adyen-ios/build.yml?branch=develop) +![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/adyen/adyen-ios/verify-older-os-compatibility.yml?branch=develop) [![Pod](https://img.shields.io/cocoapods/v/Adyen.svg?style=flat)](http://cocoapods.org/pods/Adyen) [![carthage compatible](https://img.shields.io/badge/carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![SwiftPM](https://img.shields.io/badge/swift%20package%20manager-compatible-brightgreen.svg)](https://swiftpackageregistry.com/Adyen/adyen-ios)