Skip to content

Commit a09110f

Browse files
itaybreclaude
andauthored
fix(ci): Skip Java, Gradle, and replay-stubs for iOS E2E jobs (#6353)
* fix(ci): Cache Gradle wrapper and skip replay-stubs build for iOS Cache the Gradle wrapper distribution in CI to prevent timeout failures on Bitrise runners, and skip the replay-stubs Gradle build for iOS E2E builds since the JAR is only needed on Android. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): Remove redundant Gradle wrapper cache steps setup-gradle already caches ~/.gradle/wrapper/dists. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): Skip Java and Gradle setup for iOS E2E jobs Java and Gradle are only needed for Android builds. With replay-stubs now skipped for iOS, there is no reason to install them on iOS runners. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): Set PLATFORM env var for yarn build in E2E workflow Without it, build:replay-stubs defaults to running Gradle on iOS jobs where Java is not installed, causing CI failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ab203f9 commit a09110f

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/e2e-v2.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ jobs:
117117
run: sudo apt-get update && sudo apt-get install -y ninja-build
118118

119119
- uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5
120-
if: ${{ steps.platform-check.outputs.skip != 'true' }}
120+
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'android' }}
121121
with:
122122
java-version: "17"
123123
distribution: "adopt"
124124

125125
- name: Gradle cache
126-
if: ${{ steps.platform-check.outputs.skip != 'true' }}
126+
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'android' }}
127127
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6
128128

129129
- name: Setup asdf Node.js (Bitrise)
@@ -170,6 +170,8 @@ jobs:
170170
- name: Build SDK
171171
if: ${{ steps.platform-check.outputs.skip != 'true' }}
172172
run: yarn build
173+
env:
174+
PLATFORM: ${{ matrix.platform }}
173175

174176
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
175177
if: ${{ steps.platform-check.outputs.skip != 'true' }}
@@ -388,13 +390,13 @@ jobs:
388390
run: sudo apt-get update && sudo apt-get install -y ninja-build
389391

390392
- uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5
391-
if: ${{ steps.platform-check.outputs.skip != 'true' }}
393+
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'android' }}
392394
with:
393395
java-version: "17"
394396
distribution: "adopt"
395397

396398
- name: Gradle cache
397-
if: ${{ steps.platform-check.outputs.skip != 'true' }}
399+
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'android' }}
398400
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6
399401

400402
- name: Setup Global Tools
@@ -561,13 +563,13 @@ jobs:
561563
run: sudo apt-get update && sudo apt-get install -y ninja-build
562564

563565
- uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5
564-
if: ${{ steps.platform-check.outputs.skip != 'true' }}
566+
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'android' }}
565567
with:
566568
java-version: "17"
567569
distribution: "adopt"
568570

569571
- name: Gradle cache
570-
if: ${{ steps.platform-check.outputs.skip != 'true' }}
572+
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'android' }}
571573
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6
572574

573575
- name: Setup KVM

dev-packages/e2e-tests/cli.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function patchBoostIfNeeded(rnVersion, patchScriptsDir) {
108108
// Build and publish the SDK - we only need to do this once in CI.
109109
// Locally, we may want to get updates from the latest build so do it on every app build.
110110
if (actions.includes('create') || (env.CI === undefined && actions.includes('build'))) {
111-
execSync(`yarn build`, { stdio: 'inherit', cwd: workspaceRootDir, env: env });
111+
execSync(`yarn build`, { stdio: 'inherit', cwd: workspaceRootDir, env: { ...env, PLATFORM: platform } });
112112
execSync(`yalc publish --private`, { stdio: 'inherit', cwd: e2eDir, env: env });
113113
execSync(`yalc publish`, { stdio: 'inherit', cwd: expoUploadSourcemapsPackageDir, env: env });
114114
execSync(`yalc publish`, { stdio: 'inherit', cwd: corePackageDir, env: env });

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"build:tools": "tsc -p tsconfig.build.tools.json",
2525
"build:tools:watch": "tsc -p tsconfig.build.tools.json -w --preserveWatchOutput",
2626
"build:plugin": "EXPO_NONINTERACTIVE=true expo-module build plugin",
27-
"build:replay-stubs": "cd android/replay-stubs && ./gradlew jar",
27+
"build:replay-stubs": "[ \"$PLATFORM\" = \"ios\" ] && echo 'Skipping replay-stubs for iOS' && exit 0 || cd android/replay-stubs && ./gradlew jar",
2828
"build:tarball": "bash scripts/build-tarball.sh",
2929
"downlevel": "downlevel-dts dist ts3.8/dist --to=3.8",
3030
"clean": "rimraf dist coverage && yarn clean:plugin",

0 commit comments

Comments
 (0)