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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
environment: [iOS, iOS-Example, Unix, watchOS, tvOS, SPM]
environment: [iOS, iOS-Example, Unix, watchOS, tvOS, macCatalyst, SPM]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion Package@swift-5.9.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ extension Target {
dependencies: [
"RxSwift",
"RxRelay",
.target(name: "RxCocoaRuntime", condition: .when(platforms: [.iOS, .macOS, .tvOS, .watchOS, .visionOS]))
.target(name: "RxCocoaRuntime", condition: .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS, .watchOS, .visionOS]))
],
resources: [.copy("PrivacyInfo.xcprivacy")]
)
Expand Down
26 changes: 26 additions & 0 deletions scripts/all-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ VALIDATE_UNIX=1
VALIDATE_IOS=1
VALIDATE_TVOS=1
VALIDATE_WATCHOS=1
VALIDATE_MACCATALYST=0
TEST_SPM=1

UNIX_NAME=`uname`
Expand Down Expand Up @@ -61,6 +62,14 @@ elif [ "$1" == "watchOS" ]; then
VALIDATE_TVOS=0
VALIDATE_WATCHOS=1
TEST_SPM=0
elif [ "$1" == "macCatalyst" ]; then
VALIDATE_IOS_EXAMPLE=0
VALIDATE_UNIX=0
VALIDATE_IOS=0
VALIDATE_TVOS=0
VALIDATE_WATCHOS=0
TEST_SPM=0
VALIDATE_MACCATALYST=1
elif [ "$1" == "SPM" ]; then
VALIDATE_IOS_EXAMPLE=0
VALIDATE_UNIX=0
Expand Down Expand Up @@ -244,6 +253,23 @@ else
printf "${RED}Skipping watchOS tests ...${RESET}\n"
fi

if [ "${VALIDATE_MACCATALYST}" -eq 1 ]; then
if [[ "${UNIX_NAME}" == "${DARWIN}" ]]; then
MAC_CATALYST_BUILD_TARGETS=(RxSwift RxCocoa RxRelay RxBlocking)
for scheme in ${MAC_CATALYST_BUILD_TARGETS[@]}
do
for configuration in ${CONFIGURATIONS[@]}
do
rx "${scheme}" "${configuration}" "macCatalyst" build
done
done
else
unsupported_os
fi
else
printf "${RED}Skipping macCatalyst tests ...${RESET}\n"
fi

if [ "${TEST_SPM}" -eq 1 ]; then
rm -rf .build || true
swift build -c release --disable-sandbox # until compiler is fixed
Expand Down
10 changes: 6 additions & 4 deletions scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ if [[ `uname` == "Darwin" ]]; then

if [ "$XCODE_MAJOR" -ge 26 ]; then
echo "Running Xcode $XCODE_VERSION (iOS 26 / watchOS 26 / tvOS 26)"
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-17/iOS/26.0
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-Series-11-46mm/watchOS/26.0
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/26.0
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-17/iOS/26.2
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-Series-11-46mm/watchOS/26.2
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/26.2
elif [ "$XCODE_MAJOR" -ge 16 ]; then
echo "Running Xcode $XCODE_VERSION (iOS 18.5 / watchOS 11.5 / tvOS 18.5)"
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-16/iOS/18.5
Expand Down Expand Up @@ -138,7 +138,9 @@ function action() {
echo

DESTINATION=""
if [ "${SIMULATOR}" != "" ]; then
if [ "${SIMULATOR}" == "macCatalyst" ]; then
DESTINATION='platform=macOS,variant=Mac Catalyst'
elif [ "${SIMULATOR}" != "" ]; then
#if it's a real device
if is_real_device "${SIMULATOR}"; then
DESTINATION='name='${SIMULATOR}
Expand Down
Loading