@@ -34,96 +34,57 @@ jobs:
3434 caller_event_name : ${{ github.event_name }}
3535 caller_ref : ${{ github.ref }}
3636
37- build :
38- name : Build ${{ matrix.platform }} ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks}}
39- runs-on : ${{ matrix.runs-on }}
37+ build-ios :
38+ name : Build ios ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks }}
39+ runs-on : ["ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0", "runner_group_id:10"]
4040 needs : [diff_check, detect-changes]
41- if : ${{ needs.diff_check.outputs.skip_ci != 'true' && needs.detect-changes.outputs.needs_sample_expo == 'true' }}
41+ if : >-
42+ ${{
43+ needs.diff_check.outputs.skip_ci != 'true'
44+ && needs.detect-changes.outputs.needs_sample_expo == 'true'
45+ && (needs.detect-changes.outputs.sample_expo == 'true' || needs.detect-changes.outputs.needs_ios == 'true')
46+ }}
4247 env :
4348 SENTRY_DISABLE_AUTO_UPLOAD : ' true'
4449 strategy :
45- # we want that the matrix keeps running, default is to cancel them if it fails.
4650 fail-fast : false
4751 matrix :
4852 ios-use-frameworks : ['no-frameworks', 'dynamic-frameworks']
49- platform : ['android', 'ios']
5053 build-type : ['dev', 'production']
51- include :
52- - platform : ios
53- runs-on : ["ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0", "runner_group_id:10"]
54- - platform : android
55- runs-on : ubuntu-latest
56- - platform : web
57- runs-on : ubuntu-latest
58- exclude :
59- - platform : ' android'
60- ios-use-frameworks : ' dynamic-frameworks'
6154 steps :
6255 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
6356
64- - name : Check if platform is needed
65- id : platform-check
66- uses : ./.github/actions/platform-check
67- with :
68- platform : ${{ matrix.platform }}
69- sample_changed : ${{ needs.detect-changes.outputs.sample_expo }}
70- needs_ios : ${{ needs.detect-changes.outputs.needs_ios }}
71- needs_android : ${{ needs.detect-changes.outputs.needs_android }}
72- needs_web : ${{ needs.detect-changes.outputs.needs_web }}
73-
74- - name : Enable Corepack (NPM)
75- if : ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform != 'ios' }}
76- run : npm i -g corepack
77-
7857 - name : Enable Corepack
79- if : ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'ios' }}
8058 run : corepack enable
8159
8260 - uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
83- if : ${{ steps.platform-check.outputs.skip != 'true' }}
8461 with :
8562 package-manager-cache : false
8663 node-version : 20
8764 cache : ' yarn'
8865 cache-dependency-path : yarn.lock
8966
9067 - uses : ruby/setup-ruby@v1
91- if : ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'ios' }}
9268 with :
9369 working-directory : samples/expo
9470 ruby-version : ' 3.3.0' # based on what is used in the sample
9571 bundler-cache : true # runs 'bundle install' and caches installed gems automatically
9672 cache-version : 1 # cache the installed gems
9773
98- - uses : actions/setup-java@v5
99- if : ${{ steps.platform-check.outputs.skip != 'true' }}
100- with :
101- java-version : ' 17'
102- distribution : ' adopt'
103-
104- - name : Gradle cache
105- if : ${{ steps.platform-check.outputs.skip != 'true' }}
106- uses : gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3.5.0
107-
10874 - name : Setup Global Xcode Tools
109- if : ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'ios' }}
11075 run : which xcbeautify || brew install xcbeautify
11176
11277 - name : Install SDK Dependencies
113- if : ${{ steps.platform-check.outputs.skip != 'true' }}
11478 run : yarn install
11579
11680 - name : Build SDK
117- if : ${{ steps.platform-check.outputs.skip != 'true' }}
11881 run : yarn build
11982
12083 - name : Prebuild apps
121- if : ${{ steps.platform-check.outputs.skip != 'true' && (matrix.platform == 'android' || matrix.platform == 'ios') }}
12284 working-directory : samples/expo
123- run : npx expo prebuild
85+ run : npx expo prebuild --platform ios
12486
12587 - name : Install App Pods
126- if : ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'ios' }}
12788 working-directory : samples/expo/ios
12889 run : |
12990 [[ "${{ matrix.build-type }}" == "production" ]] && ENABLE_PROD=1 || ENABLE_PROD=0
@@ -134,19 +95,7 @@ jobs:
13495 PRODUCTION=$ENABLE_PROD pod install
13596 cat Podfile.lock | grep $RN_SENTRY_POD_NAME
13697
137- - name : Build Android App
138- if : ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'android' }}
139- working-directory : samples/expo/android
140- env :
141- # Increase memory for Expo SDK 55 lint tasks
142- GRADLE_OPTS : " -Dorg.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g"
143- run : |
144- [[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug'
145- echo "Building $CONFIG"
146- ./gradlew ":app:assemble$CONFIG" -PreactNativeArchitectures=x86
147-
14898 - name : Build iOS App
149- if : ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'ios' }}
15099 working-directory : samples/expo/ios
151100 env :
152101 # Fix for Xcode 26+ with MetalToolchain: use default Xcode toolchain to avoid
@@ -171,21 +120,119 @@ jobs:
171120 | tee xcodebuild.log \
172121 | xcbeautify --quieter --is-ci --disable-colored-output
173122
174- - name : Build Web App
175- if : ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'web' }}
123+ - name : Export Expo
176124 working-directory : samples/expo
177125 run : |
178- npx expo export -p web
126+ npx expo export -p ios
127+
128+ - name : Upload logs
129+ if : ${{ always() }}
130+ uses : actions/upload-artifact@v7
131+ with :
132+ name : build-sample-expo-ios-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks}}-logs
133+ path : samples/expo/ios/*.log
134+
135+ build-android :
136+ name : Build android ${{ matrix.build-type }}
137+ runs-on : ubuntu-latest
138+ needs : [diff_check, detect-changes]
139+ if : >-
140+ ${{
141+ needs.diff_check.outputs.skip_ci != 'true'
142+ && needs.detect-changes.outputs.needs_sample_expo == 'true'
143+ && (needs.detect-changes.outputs.sample_expo == 'true' || needs.detect-changes.outputs.needs_android == 'true')
144+ }}
145+ env :
146+ SENTRY_DISABLE_AUTO_UPLOAD : ' true'
147+ strategy :
148+ fail-fast : false
149+ matrix :
150+ build-type : ['dev', 'production']
151+ steps :
152+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
153+
154+ - name : Enable Corepack (NPM)
155+ run : npm i -g corepack
156+
157+ - uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
158+ with :
159+ package-manager-cache : false
160+ node-version : 20
161+ cache : ' yarn'
162+ cache-dependency-path : yarn.lock
163+
164+ - uses : actions/setup-java@v5
165+ with :
166+ java-version : ' 17'
167+ distribution : ' adopt'
168+
169+ - name : Gradle cache
170+ uses : gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3.5.0
171+
172+ - name : Install SDK Dependencies
173+ run : yarn install
174+
175+ - name : Build SDK
176+ run : yarn build
177+
178+ - name : Prebuild apps
179+ working-directory : samples/expo
180+ run : npx expo prebuild --platform android
181+
182+ - name : Build Android App
183+ working-directory : samples/expo/android
184+ env :
185+ # Increase memory for Expo SDK 55 lint tasks
186+ GRADLE_OPTS : " -Dorg.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g"
187+ run : |
188+ [[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug'
189+ echo "Building $CONFIG"
190+ ./gradlew ":app:assemble$CONFIG" -PreactNativeArchitectures=x86
179191
180192 - name : Export Expo
181- if : ${{ steps.platform-check.outputs.skip != 'true' }}
182193 working-directory : samples/expo
183194 run : |
184- npx expo export
195+ npx expo export -p android
185196
186197 - name : Upload logs
187- if : ${{ always() && steps.platform-check.outputs.skip != 'true' }}
198+ if : ${{ always() }}
188199 uses : actions/upload-artifact@v7
189200 with :
190- name : build-sample-expo-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks}}-logs
191- path : samples/expo/${{ matrix.platform }}/*.log
201+ name : build-sample-expo-android-${{ matrix.build-type }}-logs
202+ path : samples/expo/android/*.log
203+
204+ build-web :
205+ name : Build web
206+ runs-on : ubuntu-latest
207+ needs : [diff_check, detect-changes]
208+ if : >-
209+ ${{
210+ needs.diff_check.outputs.skip_ci != 'true'
211+ && needs.detect-changes.outputs.needs_sample_expo == 'true'
212+ && (needs.detect-changes.outputs.sample_expo == 'true' || needs.detect-changes.outputs.needs_web == 'true')
213+ }}
214+ env :
215+ SENTRY_DISABLE_AUTO_UPLOAD : ' true'
216+ steps :
217+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
218+
219+ - name : Enable Corepack (NPM)
220+ run : npm i -g corepack
221+
222+ - uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
223+ with :
224+ package-manager-cache : false
225+ node-version : 20
226+ cache : ' yarn'
227+ cache-dependency-path : yarn.lock
228+
229+ - name : Install SDK Dependencies
230+ run : yarn install
231+
232+ - name : Build SDK
233+ run : yarn build
234+
235+ - name : Build Web App
236+ working-directory : samples/expo
237+ run : |
238+ npx expo export -p web
0 commit comments