Skip to content

Commit

Permalink
Update CI for Xcode 14 and 13 (ReactiveX#2455)
Browse files Browse the repository at this point in the history
  • Loading branch information
freak4pc authored Nov 27, 2022
1 parent 8ec08de commit 91a3692
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 33 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
workflow_dispatch:

jobs:
xcode12:
name: "Big Sur (Xcode 12.5.1)"
runs-on: macos-11
xcode14:
name: "Xcode 14 (Monterey)"
runs-on: macos-12

strategy:
fail-fast: false
Expand All @@ -19,12 +19,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Select Xcode 12.5.1
run: sudo xcode-select -s /Applications/Xcode_12.5.1.app
- name: Run Tests
run: CI=1 XCODE12=1 ./scripts/all-tests.sh "${{ matrix.environment }}"
run: CI=1 ./scripts/all-tests.sh "${{ matrix.environment }}"
xcode13:
name: "Big Sur (Xcode 13.2.1)"
name: "Xcode 13 (Big Sur)"
runs-on: macos-11

strategy:
Expand All @@ -34,10 +32,8 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Select Xcode 13.2.1
run: sudo xcode-select -s /Applications/Xcode_13.2.1.app
- name: Run Tests
run: CI=1 ./scripts/all-tests.sh "${{ matrix.environment }}"
run: CI=1 XCODE13=1 ./scripts/all-tests.sh "${{ matrix.environment }}"
linux:
name: "Test (Linux)"
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .jazzy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ custom_categories:
- RxCollectionViewDataSourcePrefetchingProxy
- RxCollectionViewDataSourceProxy
- RxCollectionViewDelegateProxy
- RxDelegateProxyCrashFix
- RxNavigationControllerDelegateProxy
- RxPickerViewDataSourceProxy
- RxPickerViewDelegateProxy
Expand Down
3 changes: 2 additions & 1 deletion RxCocoa/iOS/Proxies/RxDelegateProxyCrashFix.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
// Copyright © 2022 Krunoslav Zaher. All rights reserved.
//

#if os(iOS) || os(tvOS)
import Foundation


// This extension exists solely to get around a crash found on iOS 15.4+ where a `text`
// method invocation is being sent to the RxCollectionViewDelegateProxy which doesn't implement it.
// This is tracked at this bug: https://github.com/ReactiveX/RxSwift/issues/2428 This can be
Expand All @@ -28,3 +28,4 @@ import Foundation
return String()
}
}
#endif
1 change: 1 addition & 0 deletions Sources/RxCocoa/RxDelegateProxyCrashFix.swift
2 changes: 1 addition & 1 deletion scripts/all-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ if [[ "${UNIX_NAME}" == "${DARWIN}" ]]; then
ensureNoGitChanges "Package for Swift package manager isn't updated, please run ./scripts/package-spm.swift and commit the changes"
fi

CONFIGURATIONS=(Release-Tests)
CONFIGURATIONS=(Debug)

if [ "${RELEASE_TEST}" -eq 1 ]; then
CONFIGURATIONS=(Debug Release Release-Tests)
Expand Down
42 changes: 21 additions & 21 deletions scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,55 +21,55 @@ BOLDWHITE="\033[1m\033[37m"

# make sure all tests are passing
if [[ `uname` == "Darwin" ]]; then
if [[ "${XCODE12}" == "" ]]; then
echo "🏔 Running iOS 15.2 / Xcode 13"
if [[ "${XCODE13}" == "" ]]; then
echo "🏔 Running iOS 16.0 / Xcode 14"

if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-15- | wc -l` -ge 1 ]; then
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-12/iOS/15.2
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-16- | wc -l` -ge 1 ]; then
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-14/iOS/16.0
else
echo "No iOS 15.* Simulator found, available runtimes are:"
echo "No iOS 16.* Simulator found, available runtimes are:"
xcrun simctl list runtimes
exit -1
fi

if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.watchOS-8- | wc -l` -ge 1 ]; then
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-Series-6-44mm/watchOS/8.3
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.watchOS-9- | wc -l` -ge 1 ]; then
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-Series-8-45mm/watchOS/9.0
else
echo "No watchOS 8.* Simulator found, available runtimes are:"
echo "No watchOS 9.* Simulator found, available runtimes are:"
xcrun simctl list runtimes
exit -1
fi

if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-15- | wc -l` -ge 1 ]; then
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/15.2
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-16- | wc -l` -ge 1 ]; then
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/16.0
else
echo "No tvOS 15.* Simulator found, available runtimes are:"
echo "No tvOS 16.* Simulator found, available runtimes are:"
xcrun simctl list runtimes
exit -1
fi
else
echo "🗻 Running iOS 14.5 / Xcode 12.5.1"
echo "🏔 Running iOS 15.2 / Xcode 13"

if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-14- | wc -l` -ge 1 ]; then
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-11/iOS/14.5
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-15- | wc -l` -ge 1 ]; then
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-12/iOS/15.2
else
echo "No iOS 14.* Simulator found, available runtimes are:"
echo "No iOS 15.* Simulator found, available runtimes are:"
xcrun simctl list runtimes
exit -1
fi

if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.watchOS-7- | wc -l` -ge 1 ]; then
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-Series-5-44mm/watchOS/7.4
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.watchOS-8- | wc -l` -ge 1 ]; then
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-Series-6-44mm/watchOS/8.3
else
echo "No watchOS 7.* Simulator found, available runtimes are:"
echo "No watchOS 8.* Simulator found, available runtimes are:"
xcrun simctl list runtimes
exit -1
fi

if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-14- | wc -l` -ge 1 ]; then
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/14.5
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-15- | wc -l` -ge 1 ]; then
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/15.2
else
echo "No tvOS 14.* Simulator found, available runtimes are:"
echo "No tvOS 15.* Simulator found, available runtimes are:"
xcrun simctl list runtimes
exit -1
fi
Expand Down

0 comments on commit 91a3692

Please sign in to comment.