@@ -66,105 +66,44 @@ jobs:
6666 cd ..
6767 xcodebuild -workspace ios/RNExternalDisplayExample.xcworkspace -scheme RNExternalDisplayExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build
6868
69- test-ios-oldarch :
70- runs-on : macOS-latest
71- steps :
72- - uses : actions/checkout@v4
73- 74- with :
75- node-version : 18.x
76- - name : Get yarn cache directory path
77- id : yarn-cache-dir-path
78- run : echo "::set-output name=dir::$(yarn cache dir)"
79- - uses : actions/cache@v4
80- id : yarn-cache
81- with :
82- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
83- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
84- restore-keys : |
85- ${{ runner.os }}-yarn-
86- - name : Cache pods
87- uses : actions/cache@v4
88- with :
89- path : |
90- packages/RNExternalDisplayExample/ios/Pods
91- packages/RNExternalDisplayExample/ios/build
92- key : ${{ runner.os }}-pods-oldarch-${{ hashFiles('**/RNExternalDisplayExample/ios/Podfile.lock') }}
93- restore-keys : |
94- ${{ runner.os }}-pods-oldarch-
95- - name : Install deps
96- run : yarn
97- - name : Build RNExternalDisplayExample
98- env :
99- RCT_NEW_ARCH_ENABLED : 0
100- run : |
101- cd packages/RNExternalDisplayExample/ios
102- pod repo update
103- pod install
104- cd ..
105- xcodebuild -workspace ios/RNExternalDisplayExample.xcworkspace -scheme RNExternalDisplayExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build
106-
107- test-android-newarch :
69+ build-android :
10870 runs-on : ubuntu-latest
109- steps :
110- - uses : actions/checkout@v4
111- 112- with :
113- node-version : 18.x
114- - name : Get yarn cache directory path
115- id : yarn-cache-dir-path
116- run : echo "::set-output name=dir::$(yarn cache dir)"
117- - uses : actions/cache@v4
118- id : yarn-cache
119- with :
120- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
121- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
122- restore-keys : |
123- ${{ runner.os }}-yarn-
124- - name : Install Java
125- uses : actions/setup-java@v4
126- with :
127- distribution : zulu
128- java-version : 17
129- # - name: Setup Android Emulator
130- # run: |
131- # $ANDROID_HOME/tools/bin/sdkmanager --install emulator
132- # $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-28;google_apis;x86"
133- # echo no | $ANDROID_HOME/tools/bin/avdmanager create avd --force -n Test -k "system-images;android-28;google_apis;x86"
134- # $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window &
135- - name : Install deps
136- run : yarn
137- - name : Build RNExternalDisplayExample
138- run : |
139- cd packages/RNExternalDisplayExample/android
140- ./gradlew assemblerelease
14171
142- test-android-oldarch :
143- runs-on : ubuntu-latest
14472 steps :
145- - uses : actions/checkout@v4
146- 73+ # Checkout the code
74+ - name : Checkout the code
75+ uses : actions/checkout@v4
76+
77+ # Set up Node.js environment
78+ - name : Set up Node.js
79+ 14780 with :
14881 node-version : 18.x
82+
83+ # Cache Yarn dependencies to speed up the build
14984 - name : Get yarn cache directory path
15085 id : yarn-cache-dir-path
15186 run : echo "::set-output name=dir::$(yarn cache dir)"
87+
15288 - uses : actions/cache@v4
15389 id : yarn-cache
15490 with :
15591 path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
15692 key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
15793 restore-keys : |
15894 ${{ runner.os }}-yarn-
159- - name : Install Java
160- uses : actions/setup-java@v4
161- with :
162- distribution : zulu
163- java-version : 17
164- - name : Install deps
95+
96+ # Install dependencies
97+ - name : Install dependencies
16598 run : yarn
166- - name : Build RNExternalDisplayExample
99+
100+ # Prebuild the Android folder for Expo
101+ - name : Prebuild Android with Expo
102+ working-directory : apps/external-display-example
167103 run : |
168- cd packages/RNExternalDisplayExample/android
169- sed -i 's/newArchEnabled=true/newArchEnabled=false/g' gradle.properties
170- ./gradlew assemblerelease
104+ yarn expo prebuild --platform android
105+
106+ # Build the APK without running on a device
107+ - name : Build Android APK
108+ working-directory : apps/external-display-example/android
109+ run : ./gradlew assembleRelease
0 commit comments