@@ -140,3 +140,103 @@ jobs:
140
140
path : |
141
141
./sample/*.log
142
142
./sample/*.png
143
+
144
+ metrics :
145
+ runs-on : macos-latest
146
+ strategy :
147
+ # we want that the matrix keeps running, default is to cancel them if it fails.
148
+ fail-fast : false
149
+ matrix :
150
+ platform : ["ios", "android"]
151
+ include :
152
+ - platform : ios
153
+ name : iOS
154
+ appPlain : test/perf/test-app-plain.ipa
155
+ - platform : android
156
+ name : Android
157
+ appPlain : test/perf/TestAppPlain/android/app/build/outputs/apk/release/app-release.apk
158
+ steps :
159
+ - uses : actions/checkout@v3
160
+ - uses : actions/setup-node@v3
161
+ with :
162
+ node-version : " 12"
163
+ - uses : actions/setup-java@v3
164
+ with :
165
+ java-version : " 11"
166
+ distribution : " adopt"
167
+ - name : Install Global Dependencies
168
+ run : yarn global add react-native-cli @sentry/cli yalc
169
+ - uses : actions/cache@v3
170
+ id : deps-cache
171
+ with :
172
+ path : |
173
+ node_modules
174
+ test/perf/TestAppSentry/node_modules
175
+ key : ${{ github.workflow }}-${{ github.job }}-${{ hashFiles('yarn.lock', 'test/perf/TestAppSentry/yarn.lock') }}
176
+ - name : Install Dependencies
177
+ if : steps.deps-cache.outputs['cache-hit'] != 'true'
178
+ run : yarn install
179
+ - name : Build SDK
180
+ run : yarn build
181
+ - name : Package SDK
182
+ run : yalc publish
183
+ - uses : actions/setup-node@v3
184
+ with :
185
+ node-version : " 16"
186
+ - uses : actions/cache@v3
187
+ id : app-plain-cache
188
+ with :
189
+ path : ${{ matrix.appPlain }}
190
+ key : ${{ github.workflow }}-${{ github.job }}-appplain-${{ hashFiles('test/perf/TestAppPlain/**') }}
191
+ - name : Build app plain
192
+ if : steps.app-plain-cache.outputs['cache-hit'] != 'true'
193
+ working-directory : ./test/perf/TestAppPlain
194
+ run : |
195
+ yarn install
196
+ cd ${{ matrix.platform }}
197
+ if [[ "${{ matrix.platform }}" == "android" ]]; then
198
+ ./gradlew assembleRelease
199
+ else
200
+ pod install
201
+ cd ../..
202
+ fastlane build_perf_test_app_plain
203
+ fi
204
+ env :
205
+ APP_STORE_CONNECT_KEY_ID : ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
206
+ APP_STORE_CONNECT_ISSUER_ID : ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
207
+ APP_STORE_CONNECT_KEY : ${{ secrets.APP_STORE_CONNECT_KEY }}
208
+ FASTLANE_KEYCHAIN_PASSWORD : ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }}
209
+ MATCH_GIT_PRIVATE_KEY : ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
210
+ MATCH_PASSWORD : ${{ secrets.MATCH_PASSWORD }}
211
+ MATCH_USERNAME : ${{ secrets.MATCH_USERNAME }}
212
+ - name : Build app with Sentry
213
+ working-directory : ./test/perf/TestAppSentry
214
+ run : |
215
+ yalc add @sentry/react-native
216
+ yarn install
217
+ cd ${{ matrix.platform }}
218
+ if [[ "${{ matrix.platform }}" == "android" ]]; then
219
+ ./gradlew assembleRelease
220
+ else
221
+ pod install
222
+ cd ../..
223
+ fastlane build_perf_test_app_sentry
224
+ cd TestAppSentry
225
+ fi
226
+ # Remove after build so that the cache isn't invaldiated due to the changes in yarn.lock.
227
+ yarn remove @sentry/react-native
228
+ env :
229
+ APP_STORE_CONNECT_KEY_ID : ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
230
+ APP_STORE_CONNECT_ISSUER_ID : ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
231
+ APP_STORE_CONNECT_KEY : ${{ secrets.APP_STORE_CONNECT_KEY }}
232
+ FASTLANE_KEYCHAIN_PASSWORD : ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }}
233
+ MATCH_GIT_PRIVATE_KEY : ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
234
+ MATCH_PASSWORD : ${{ secrets.MATCH_PASSWORD }}
235
+ MATCH_USERNAME : ${{ secrets.MATCH_USERNAME }}
236
+ - name : Collect apps metrics
237
+ uses : getsentry/action-app-sdk-overhead-metrics@v1
238
+ with :
239
+ name : ${{ matrix.name }}
240
+ config : ./test/perf/metrics-${{ matrix.platform }}.yml
241
+ sauce-user : ${{ secrets.SAUCE_USERNAME }}
242
+ sauce-key : ${{ secrets.SAUCE_ACCESS_KEY }}
0 commit comments