Skip to content

Commit 929c622

Browse files
authored
chore: Test React Native build on Cirrus Labs (#6940)
* chore: Test React Native build on Cirrus Labs * Uninstall yarn on Cirrus * Use npm * Install cocoapods * Use sudo * Change ruby version * Set path * Only set version on Cirrus * Only run integration test on Cirrus Runners * Ensure runtime is loaded * Update script path * Added comment explaining ruby version used
1 parent 7969533 commit 929c622

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.github/file-filters.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ run_test_cross_platform_for_prs: &run_test_cross_platform_for_prs
156156
- "scripts/ci-select-xcode.sh"
157157
- "scripts/ci-diagnostics.sh"
158158
- "scripts/ci-utils.sh"
159+
- "scripts/ci-ensure-runtime-loaded.sh"
159160

160161
# Build configuration
161162
- "Makefile"

.github/workflows/test-cross-platform.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
# Run the job only for PRs with related changes or non-PR events.
4040
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_test_cross_platform_for_prs == 'true'
4141
needs: files-changed
42-
runs-on: macos-15
42+
runs-on: ["ghcr.io/cirruslabs/macos-runner:sequoia", "runner_group_id:10"]
4343
# This job can take a while to run, so we set a timeout.
4444
timeout-minutes: 30
4545
steps:
@@ -61,7 +61,7 @@ jobs:
6161

6262
- name: Enable Corepack
6363
working-directory: sentry-react-native
64-
run: npm i -g corepack
64+
run: npm i -g corepack --force
6565

6666
- uses: actions/setup-node@v6
6767
with:
@@ -70,6 +70,13 @@ jobs:
7070
cache-dependency-path: sentry-react-native/yarn.lock
7171
- run: ./sentry-cocoa/scripts/ci-select-xcode.sh 16.4
7272

73+
- name: Ensure required runtime is loaded
74+
# Ideally we will not need this, but CI sometimes is failing to load some runtimes, this will ensure they are loaded
75+
timeout-minutes: 5 # 5 minutes timeout
76+
env:
77+
OS_VERSION: "18.4"
78+
run: ./sentry-cocoa/scripts/ci-ensure-runtime-loaded.sh --os-version "$OS_VERSION"
79+
7380
- name: Create simulator device for iOS 18.4
7481
run: ./sentry-cocoa/scripts/ci-create-simulator.sh --platform "iOS" --os-version "18.4" --device-name "iPhone 15 Pro"
7582

@@ -87,6 +94,17 @@ jobs:
8794
working-directory: sentry-react-native/packages/core/RNSentryCocoaTester
8895
run: sed -i '' "s/parallelizable = \"YES\"/parallelizable = \"NO\"/" RNSentryCocoaTester.xcodeproj/xcshareddata/xcschemes/RNSentryCocoaTester.xcscheme
8996

97+
- name: Change ruby to 3.3.10
98+
# We use the same ruby version used by Cirrus to install fastlane and other tools
99+
# see: https://github.com/cirruslabs/macos-image-templates/blob/9115ef25530497999073cdf0f5497a4d142e3256/templates/xcode.pkr.hcl#L235
100+
working-directory: sentry-react-native/packages/core/RNSentryCocoaTester
101+
run: |
102+
rbenv global 3.3.10
103+
104+
- name: Install cocoapods
105+
working-directory: sentry-react-native/packages/core/RNSentryCocoaTester
106+
run: gem install cocoapods
107+
90108
- name: Install App Pods
91109
working-directory: sentry-react-native/packages/core/RNSentryCocoaTester
92110
run: pod install

0 commit comments

Comments
 (0)