From 4a7407ddbe484172fca0e5efd24f1960bca10ed6 Mon Sep 17 00:00:00 2001 From: Alex Bush Date: Sun, 12 Jul 2026 17:20:23 -0500 Subject: [PATCH] Make SPM the canonical build; isolate Carthage project under ios/ The Swift Package is now the primary, unshadowed build at the repo root. The Carthage Xcode project moves under `ios/` so it no longer sits next to (and shadow) `Package.swift`, which previously forced `xcodebuild` to pick the Carthage project over the package at the root. - Move `RIBs.xcodeproj` to `ios/RIBs.xcodeproj` and fix its group paths (`RIBs` -> `../RIBs`, `RIBsTests` -> `../RIBsTests`) for the new depth. - Add an `spm-test` CI job that builds and tests the package directly from the root, resolving an available simulator at runtime (no pinned model name). - Drop the retired `.travis.yml` (CI runs on GitHub Actions). - Align the Cartfile RxSwift pin (~> 6.9.0) with `Package.swift`. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01J9mruKG6RSYg6SfPaq6MPG --- .github/workflows/iOS.yml | 21 ++++++++++++ .travis.yml | 34 ------------------- Cartfile | 2 +- .../RIBs.xcodeproj}/project.pbxproj | 4 +-- .../xcshareddata/xcschemes/RIBs.xcscheme | 0 5 files changed, 24 insertions(+), 37 deletions(-) delete mode 100755 .travis.yml rename {RIBs.xcodeproj => ios/RIBs.xcodeproj}/project.pbxproj (99%) rename {RIBs.xcodeproj => ios/RIBs.xcodeproj}/xcshareddata/xcschemes/RIBs.xcscheme (100%) diff --git a/.github/workflows/iOS.yml b/.github/workflows/iOS.yml index 0b9e585..671b7dc 100644 --- a/.github/workflows/iOS.yml +++ b/.github/workflows/iOS.yml @@ -56,3 +56,24 @@ jobs: run: | pod lib lint RIBs.podspec \ --skip-tests + + spm-test: + name: SPM build & test + runs-on: macos-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + # The repo root resolves directly to Package.swift — the Carthage + # xcodeproj now lives under ios/ so it no longer shadows the package. + - name: Build & test Swift package on simulator + run: | + # Resolve an available iPhone simulator at runtime instead of pinning a + # model name, which rots whenever the macos-latest runner image updates. + DEVICE_ID=$(xcrun simctl list devices available --json \ + | jq -r '[.devices[][] | select(.name | test("iPhone"))] | first | .udid') + echo "Using simulator: $DEVICE_ID" + xcodebuild test \ + -scheme RIBs \ + -destination "platform=iOS Simulator,id=$DEVICE_ID" diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index ce867e8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -jobs: - include: - - language: objective-c - os: osx - osx_image: xcode11.2 - env: - - LC_CTYPE=en_US.UTF-8 - - LANG=en_US.UTF-8 - - IOS_VER=13.2.2 - - IOS_SDK=iphonesimulator13.2 - - SIMULATOR_NAME="iPhone 8" - - cache: - directories: - - $HOME/Carthage - - script: - - set -o pipefail - - carthage version - - carthage update --platform iOS - - cd ios - - xcodebuild -version - - xcodebuild -showsdks - - instruments -s devices - - xcodebuild -scheme "RIBs" -destination "OS=$IOS_VER,name=$SIMULATOR_NAME" -sdk "$IOS_SDK" -configuration Release clean build | xcpretty -c; - - xcodebuild -scheme "RIBs" -destination "OS=$IOS_VER,platform=iOS Simulator,name=$SIMULATOR_NAME" -sdk "$IOS_SDK" -configuration Debug clean build test | xcpretty -c; - -branches: - except: - - gh-pages - - assets - -notifications: - email: false diff --git a/Cartfile b/Cartfile index 7e913d3..afc23c2 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "ReactiveX/RxSwift" ~> 6.5.0 +github "ReactiveX/RxSwift" ~> 6.9.0 diff --git a/RIBs.xcodeproj/project.pbxproj b/ios/RIBs.xcodeproj/project.pbxproj similarity index 99% rename from RIBs.xcodeproj/project.pbxproj rename to ios/RIBs.xcodeproj/project.pbxproj index e66a516..cd4a9a1 100644 --- a/RIBs.xcodeproj/project.pbxproj +++ b/ios/RIBs.xcodeproj/project.pbxproj @@ -210,7 +210,7 @@ E8E789432378AD000043E59E /* Package.swift */, 8B9882E61F86E1CF00ABE009 /* Info.plist */, ); - path = RIBs; + path = ../RIBs; sourceTree = ""; }; 8B9882EF1F86E1CF00ABE009 /* RIBsTests */ = { @@ -226,7 +226,7 @@ AF90B4121FBA18CD00920384 /* Worker */, AF90B4171FBA1F2400920384 /* Workflow */, ); - path = RIBsTests; + path = ../RIBsTests; sourceTree = ""; }; C0A1000B2B10000300A10001 /* Concurrency */ = { diff --git a/RIBs.xcodeproj/xcshareddata/xcschemes/RIBs.xcscheme b/ios/RIBs.xcodeproj/xcshareddata/xcschemes/RIBs.xcscheme similarity index 100% rename from RIBs.xcodeproj/xcshareddata/xcschemes/RIBs.xcscheme rename to ios/RIBs.xcodeproj/xcshareddata/xcschemes/RIBs.xcscheme