@@ -16,46 +16,24 @@ jobs:
1616 android :
1717 runs-on : ubuntu-latest
1818
19- env :
20- TURBO_CACHE_DIR : .turbo/android
21-
2219 steps :
2320 - name : Checkout
2421 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2522
2623 - name : Setup
2724 uses : ./.github/actions/setup
2825
29- - name : Cache turborepo for Android
30- uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
31- with :
32- path : ${{ env.TURBO_CACHE_DIR }}
33- key : ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
34- restore-keys : |
35- ${{ runner.os }}-turborepo-android-
36-
37- - name : Check turborepo cache for Android
38- run : |
39- TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
40-
41- if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
42- echo "turbo_cache_hit=1" >> $GITHUB_ENV
43- fi
44-
4526 - name : Install JDK
46- if : env.turbo_cache_hit != 1
4727 uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
4828 with :
4929 distribution : ' zulu'
5030 java-version : ' 17'
5131
5232 - name : Finalize Android SDK
53- if : env.turbo_cache_hit != 1
5433 run : |
5534 /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
5635
5736 - name : Cache Gradle
58- if : env.turbo_cache_hit != 1
5937 uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
6038 with :
6139 path : |
@@ -69,33 +47,31 @@ jobs:
6947 env :
7048 JAVA_OPTS : " -XX:MaxHeapSize=6g"
7149 run : |
72- yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
50+ cd example/bare
51+ npx react-native build-android --mode release --extra-params "--no-daemon --console=plain -PreactNativeArchitectures=x86_64"
7352
7453 - name : Install Maestro
75- if : env.turbo_cache_hit != 1
7654 run : |
7755 curl -Ls "https://get.maestro.mobile.dev" | bash
7856 echo "$HOME/.maestro/bin" >> $GITHUB_PATH
7957
8058 - name : Enable KVM
81- if : env.turbo_cache_hit != 1
8259 run : |
8360 echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
8461 sudo udevadm control --reload-rules
8562 sudo udevadm trigger --name-match=kvm
8663
8764 - name : Run Maestro tests
88- if : env.turbo_cache_hit != 1
8965 uses : reactivecircus/android-emulator-runner@v2
9066 with :
9167 api-level : 31
9268 arch : x86_64
9369 script : |
94- adb install example/bare/android/app/build/intermediates /apk/debug /app-debug .apk
70+ adb install example/bare/android/app/build/outputs /apk/release /app-release .apk
9571 maestro test .maestro/ --format junit --output report.xml
9672
9773 - name : Upload test report
98- if : always() && env.turbo_cache_hit != 1
74+ if : always()
9975 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
10076 with :
10177 name : e2e-android-report
10682
10783 env :
10884 XCODE_VERSION : latest-stable
109- TURBO_CACHE_DIR : .turbo/ios
11085 RCT_USE_RN_DEP : 1
11186 RCT_USE_PREBUILT_RNCORE : 1
11287
@@ -117,30 +92,12 @@ jobs:
11792 - name : Setup
11893 uses : ./.github/actions/setup
11994
120- - name : Cache turborepo for iOS
121- uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
122- with :
123- path : ${{ env.TURBO_CACHE_DIR }}
124- key : ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
125- restore-keys : |
126- ${{ runner.os }}-turborepo-ios-
127-
128- - name : Check turborepo cache for iOS
129- run : |
130- TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
131-
132- if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
133- echo "turbo_cache_hit=1" >> $GITHUB_ENV
134- fi
135-
13695 - name : Use appropriate Xcode version
137- if : env.turbo_cache_hit != 1
13896 uses : maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
13997 with :
14098 xcode-version : ${{ env.XCODE_VERSION }}
14199
142100 - name : Cache iOS build
143- if : env.turbo_cache_hit != 1
144101 id : ios-cache
145102 uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
146103 with :
@@ -154,44 +111,40 @@ jobs:
154111 ${{ runner.os }}-ios-
155112
156113 - name : Install ccache
157- if : env.turbo_cache_hit != 1
158114 run : brew install ccache
159115
160116 - name : Install cocoapods
161- if : env.turbo_cache_hit != 1 && steps.ios-cache.outputs.cache-hit != 'true'
117+ if : steps.ios-cache.outputs.cache-hit != 'true'
162118 run : |
163119 cd example/bare
164120 bundle install
165121 bundle exec pod install --project-directory=ios
166122
167123 - name : Build example for iOS
168124 run : |
169- yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
125+ cd example/bare
126+ npx react-native build-ios --mode Release
170127
171128 - name : Install Maestro
172- if : env.turbo_cache_hit != 1
173129 run : |
174130 curl -Ls "https://get.maestro.mobile.dev" | bash
175131 echo "$HOME/.maestro/bin" >> $GITHUB_PATH
176132
177133 - name : Boot iOS Simulator
178- if : env.turbo_cache_hit != 1
179134 run : |
180135 DEVICE=$(xcrun simctl list devices available -j | jq -r '[.devices[] | .[] | select(.name | contains("iPhone"))][0].udid')
181136 xcrun simctl boot "$DEVICE"
182137
183138 - name : Install app on Simulator
184- if : env.turbo_cache_hit != 1
185139 run : |
186- APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData -name "TrueSheetExample.app" -path "*/Debug -iphonesimulator/*" | head -1)
140+ APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData -name "TrueSheetExample.app" -path "*/Release -iphonesimulator/*" | head -1)
187141 xcrun simctl install booted "$APP_PATH"
188142
189143 - name : Run Maestro tests
190- if : env.turbo_cache_hit != 1
191144 run : maestro test .maestro/ --format junit --output report.xml
192145
193146 - name : Upload test report
194- if : always() && env.turbo_cache_hit != 1
147+ if : always()
195148 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
196149 with :
197150 name : e2e-ios-report
0 commit comments