diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1062bff16..a8dd08c7c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift index a3b96a5e2..2fdee21c8 100644 --- a/Package@swift-5.9.swift +++ b/Package@swift-5.9.swift @@ -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")] ) diff --git a/scripts/all-tests.sh b/scripts/all-tests.sh index ce636de39..be4180321 100755 --- a/scripts/all-tests.sh +++ b/scripts/all-tests.sh @@ -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` @@ -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 @@ -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 diff --git a/scripts/common.sh b/scripts/common.sh index 8359ec999..fd0350705 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -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 @@ -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}