-
-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tmp: trying to fix android tests hanging
- Loading branch information
Showing
1 changed file
with
161 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,135 +26,135 @@ jobs: | |
with: | ||
access_token: ${{ github.token }} | ||
|
||
metrics: | ||
runs-on: ${{ matrix.runs-on }} | ||
needs: [diff_check] | ||
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} | ||
env: | ||
SENTRY_DISABLE_AUTO_UPLOAD: 'true' | ||
strategy: | ||
# we want that the matrix keeps running, default is to cancel them if it fails. | ||
fail-fast: false | ||
matrix: | ||
rn-architecture: ['legacy', 'new'] | ||
platform: ["ios", "android"] | ||
include: | ||
- platform: ios | ||
runs-on: macos-12 | ||
name: iOS | ||
appPlain: test/perf/test-app-plain.ipa | ||
- platform: android | ||
runs-on: ubuntu-latest | ||
name: Android | ||
appPlain: test/perf/TestAppPlain/android/app/build/outputs/apk/release/app-release.apk | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer | ||
if: ${{ matrix.platform == 'ios' }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: "adopt" | ||
- name: Gradle cache | ||
uses: gradle/gradle-build-action@v3 | ||
- name: Install Global Dependencies | ||
run: yarn global add react-native-cli @sentry/cli yalc | ||
- uses: actions/cache@v4 | ||
id: deps-cache | ||
with: | ||
path: | | ||
node_modules | ||
test/perf/TestAppSentry/node_modules | ||
key: ${{ github.workflow }}-${{ github.job }}-${{ hashFiles('yarn.lock', 'test/perf/TestAppSentry/yarn.lock') }} | ||
- name: Install Dependencies | ||
if: steps.deps-cache.outputs['cache-hit'] != 'true' | ||
run: yarn install | ||
- name: Build SDK | ||
run: yarn build | ||
- name: Package SDK | ||
run: yalc publish | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- uses: actions/cache@v4 | ||
id: app-plain-cache | ||
with: | ||
path: ${{ matrix.appPlain }} | ||
# if the whole plain app folder is hashed the cache is never hit as there are files generated in the folder | ||
# the cache key is calculated both at cache retrieval and save time | ||
# hashFiles fails when there are rn android new arch generated files in the folder (exact reason unknown) | ||
key: ${{ github.workflow }}-${{ github.job }}-appplain-${{ matrix.platform }}-${{ matrix.rn-architecture }}-${{ hashFiles('test/perf/TestAppPlain/yarn.lock') }} | ||
- name: Build app plain | ||
if: steps.app-plain-cache.outputs['cache-hit'] != 'true' | ||
working-directory: ./test/perf/TestAppPlain | ||
run: | | ||
yarn install | ||
cd ${{ matrix.platform }} | ||
if [[ "${{ matrix.platform }}" == "android" ]]; then | ||
if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then | ||
perl -i -pe's/newArchEnabled=false/newArchEnabled=true/g' gradle.properties | ||
fi | ||
./gradlew assembleRelease | ||
else | ||
export PRODUCTION=1 | ||
if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then | ||
export RCT_NEW_ARCH_ENABLED=1 | ||
fi | ||
pod install | ||
cd ../.. | ||
fastlane build_perf_test_app_plain | ||
fi | ||
env: | ||
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} | ||
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | ||
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} | ||
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }} | ||
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }} | ||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} | ||
- name: Build app with Sentry | ||
working-directory: ./test/perf/TestAppSentry | ||
run: | | ||
yalc add @sentry/react-native | ||
yarn install | ||
cd ${{ matrix.platform }} | ||
if [[ "${{ matrix.platform }}" == "android" ]]; then | ||
if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then | ||
perl -i -pe's/newArchEnabled=false/newArchEnabled=true/g' gradle.properties | ||
fi | ||
./gradlew assembleRelease | ||
else | ||
export PRODUCTION=1 | ||
if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then | ||
export RCT_NEW_ARCH_ENABLED=1 | ||
fi | ||
pod install | ||
cd ../.. | ||
fastlane build_perf_test_app_sentry | ||
cd TestAppSentry | ||
fi | ||
# Remove after build so that the cache isn't invaldiated due to the changes in yarn.lock. | ||
yarn remove @sentry/react-native | ||
env: | ||
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} | ||
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | ||
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} | ||
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }} | ||
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }} | ||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} | ||
- name: Collect apps metrics | ||
uses: getsentry/action-app-sdk-overhead-metrics@v1 | ||
with: | ||
name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) | ||
config: ./test/perf/metrics-${{ matrix.platform }}.yml | ||
sauce-user: ${{ secrets.SAUCE_USERNAME }} | ||
sauce-key: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
# metrics: | ||
# runs-on: ${{ matrix.runs-on }} | ||
# needs: [diff_check] | ||
# if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} | ||
# env: | ||
# SENTRY_DISABLE_AUTO_UPLOAD: 'true' | ||
# strategy: | ||
# # we want that the matrix keeps running, default is to cancel them if it fails. | ||
# fail-fast: false | ||
# matrix: | ||
# rn-architecture: ['legacy', 'new'] | ||
# platform: ["ios", "android"] | ||
# include: | ||
# - platform: ios | ||
# runs-on: macos-12 | ||
# name: iOS | ||
# appPlain: test/perf/test-app-plain.ipa | ||
# - platform: android | ||
# runs-on: ubuntu-latest | ||
# name: Android | ||
# appPlain: test/perf/TestAppPlain/android/app/build/outputs/apk/release/app-release.apk | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
|
||
# - run: sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer | ||
# if: ${{ matrix.platform == 'ios' }} | ||
|
||
# - uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: 18 | ||
# - uses: actions/setup-java@v4 | ||
# with: | ||
# java-version: '17' | ||
# distribution: "adopt" | ||
# - name: Gradle cache | ||
# uses: gradle/gradle-build-action@v3 | ||
# - name: Install Global Dependencies | ||
# run: yarn global add react-native-cli @sentry/cli yalc | ||
# - uses: actions/cache@v4 | ||
# id: deps-cache | ||
# with: | ||
# path: | | ||
# node_modules | ||
# test/perf/TestAppSentry/node_modules | ||
# key: ${{ github.workflow }}-${{ github.job }}-${{ hashFiles('yarn.lock', 'test/perf/TestAppSentry/yarn.lock') }} | ||
# - name: Install Dependencies | ||
# if: steps.deps-cache.outputs['cache-hit'] != 'true' | ||
# run: yarn install | ||
# - name: Build SDK | ||
# run: yarn build | ||
# - name: Package SDK | ||
# run: yalc publish | ||
# - uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: 18 | ||
# - uses: actions/cache@v4 | ||
# id: app-plain-cache | ||
# with: | ||
# path: ${{ matrix.appPlain }} | ||
# # if the whole plain app folder is hashed the cache is never hit as there are files generated in the folder | ||
# # the cache key is calculated both at cache retrieval and save time | ||
# # hashFiles fails when there are rn android new arch generated files in the folder (exact reason unknown) | ||
# key: ${{ github.workflow }}-${{ github.job }}-appplain-${{ matrix.platform }}-${{ matrix.rn-architecture }}-${{ hashFiles('test/perf/TestAppPlain/yarn.lock') }} | ||
# - name: Build app plain | ||
# if: steps.app-plain-cache.outputs['cache-hit'] != 'true' | ||
# working-directory: ./test/perf/TestAppPlain | ||
# run: | | ||
# yarn install | ||
# cd ${{ matrix.platform }} | ||
# if [[ "${{ matrix.platform }}" == "android" ]]; then | ||
# if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then | ||
# perl -i -pe's/newArchEnabled=false/newArchEnabled=true/g' gradle.properties | ||
# fi | ||
# ./gradlew assembleRelease | ||
# else | ||
# export PRODUCTION=1 | ||
# if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then | ||
# export RCT_NEW_ARCH_ENABLED=1 | ||
# fi | ||
# pod install | ||
# cd ../.. | ||
# fastlane build_perf_test_app_plain | ||
# fi | ||
# env: | ||
# APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} | ||
# APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | ||
# APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} | ||
# FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }} | ||
# MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }} | ||
# MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
# MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} | ||
# - name: Build app with Sentry | ||
# working-directory: ./test/perf/TestAppSentry | ||
# run: | | ||
# yalc add @sentry/react-native | ||
# yarn install | ||
# cd ${{ matrix.platform }} | ||
# if [[ "${{ matrix.platform }}" == "android" ]]; then | ||
# if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then | ||
# perl -i -pe's/newArchEnabled=false/newArchEnabled=true/g' gradle.properties | ||
# fi | ||
# ./gradlew assembleRelease | ||
# else | ||
# export PRODUCTION=1 | ||
# if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then | ||
# export RCT_NEW_ARCH_ENABLED=1 | ||
# fi | ||
# pod install | ||
# cd ../.. | ||
# fastlane build_perf_test_app_sentry | ||
# cd TestAppSentry | ||
# fi | ||
# # Remove after build so that the cache isn't invaldiated due to the changes in yarn.lock. | ||
# yarn remove @sentry/react-native | ||
# env: | ||
# APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} | ||
# APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | ||
# APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} | ||
# FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }} | ||
# MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }} | ||
# MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
# MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} | ||
# - name: Collect apps metrics | ||
# uses: getsentry/action-app-sdk-overhead-metrics@v1 | ||
# with: | ||
# name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) | ||
# config: ./test/perf/metrics-${{ matrix.platform }}.yml | ||
# sauce-user: ${{ secrets.SAUCE_USERNAME }} | ||
# sauce-key: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
|
||
react-native-build: | ||
name: Build RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.engine }} ${{ matrix.platform }} ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks }} | ||
|
@@ -172,23 +172,23 @@ jobs: | |
strategy: | ||
fail-fast: false # keeps matrix running if one fails | ||
matrix: | ||
rn-version: ['0.65.3', '0.73.9'] | ||
rn-architecture: ['legacy', 'new'] | ||
platform: ['android', 'ios'] | ||
rn-version: ['0.73.9'] | ||
rn-architecture: ['new'] | ||
platform: ['android'] | ||
build-type: ['production'] | ||
ios-use-frameworks: ['no', 'static', 'dynamic'] | ||
engine: ['hermes', 'jsc'] | ||
include: | ||
- platform: ios | ||
rn-version: '0.73.9' | ||
runs-on: macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/ | ||
runtime: 'latest' | ||
device: 'iPhone 14' | ||
- platform: ios | ||
rn-version: '0.65.3' | ||
runs-on: macos-12 | ||
runtime: 'latest' | ||
device: 'iPhone 14' | ||
# - platform: ios | ||
# rn-version: '0.73.9' | ||
# runs-on: macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/ | ||
# runtime: 'latest' | ||
# device: 'iPhone 14' | ||
# - platform: ios | ||
# rn-version: '0.65.3' | ||
# runs-on: macos-12 | ||
# runtime: 'latest' | ||
# device: 'iPhone 14' | ||
- platform: android | ||
runs-on: ubuntu-latest | ||
exclude: | ||
|
@@ -332,23 +332,23 @@ jobs: | |
strategy: | ||
fail-fast: false # keeps matrix running if one fails | ||
matrix: | ||
rn-version: ['0.65.3', '0.73.9'] | ||
rn-architecture: ['legacy', 'new'] | ||
platform: ['android', 'ios'] | ||
rn-version: ['0.73.9'] | ||
rn-architecture: ['new'] | ||
platform: ['android'] | ||
build-type: ['production'] | ||
ios-use-frameworks: ['no'] # test only no framworks | ||
engine: ['hermes', 'jsc'] | ||
include: | ||
- platform: ios | ||
rn-version: '0.73.9' | ||
runs-on: macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/ | ||
runtime: 'latest' | ||
device: 'iPhone 14' | ||
- platform: ios | ||
rn-version: '0.65.3' | ||
runs-on: macos-latest | ||
runtime: 'latest' | ||
device: 'iPhone 14' | ||
# - platform: ios | ||
# rn-version: '0.73.9' | ||
# runs-on: macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/ | ||
# runtime: 'latest' | ||
# device: 'iPhone 14' | ||
# - platform: ios | ||
# rn-version: '0.65.3' | ||
# runs-on: macos-latest | ||
# runtime: 'latest' | ||
# device: 'iPhone 14' | ||
- platform: android | ||
runs-on: ubuntu-latest | ||
exclude: | ||
|
@@ -417,9 +417,15 @@ jobs: | |
working-directory: test/e2e | ||
run: yarn install | ||
|
||
- name: Setup tmate session | ||
if: ${{ matrix.platform == 'android' }} | ||
uses: mxschmitt/action-tmate@v3 | ||
|
||
- name: Run tests on Android | ||
if: ${{ matrix.platform == 'android' }} | ||
uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32 # [email protected] | ||
env: | ||
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 60 | ||
with: | ||
api-level: 30 | ||
force-avd-creation: false | ||
|
@@ -438,8 +444,6 @@ jobs: | |
-timezone US/Pacific | ||
script: | | ||
./scripts/e2e.mjs ${{ matrix.platform }} --test | ||
# See https://github.com/ReactiveCircus/android-emulator-runner/issues/385 | ||
killall --signal 9 crashpad_handler | ||
- uses: actions/cache@v4 | ||
if: ${{ matrix.platform == 'ios' }} | ||
|