@@ -66,105 +66,51 @@ jobs:
66
66
cd ..
67
67
xcodebuild -workspace ios/RNExternalDisplayExample.xcworkspace -scheme RNExternalDisplayExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build
68
68
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 :
108
70
runs-on : ubuntu-latest
71
+
109
72
steps :
110
- - uses : actions/checkout@v4
111
-
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
+
112
80
with :
113
81
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
82
+
83
+ # Install Java 17
84
+ - name : Set up Java 17
125
85
uses : actions/setup-java@v4
126
86
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
87
+ distribution : ' temurin'
88
+ java-version : ' 17'
141
89
142
- test-android-oldarch :
143
- runs-on : ubuntu-latest
144
- steps :
145
- - uses : actions/checkout@v4
146
-
147
- with :
148
- node-version : 18.x
90
+ # Cache Yarn dependencies to speed up the build
149
91
- name : Get yarn cache directory path
150
92
id : yarn-cache-dir-path
151
93
run : echo "::set-output name=dir::$(yarn cache dir)"
94
+
152
95
- uses : actions/cache@v4
153
96
id : yarn-cache
154
97
with :
155
98
path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
156
99
key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
157
100
restore-keys : |
158
101
${{ 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
102
+
103
+ # Install dependencies
104
+ - name : Install dependencies
165
105
run : yarn
166
- - name : Build RNExternalDisplayExample
106
+
107
+ # Prebuild the Android folder for Expo
108
+ - name : Prebuild Android with Expo
109
+ working-directory : apps/external-display-example
167
110
run : |
168
- cd packages/RNExternalDisplayExample/android
169
- sed -i 's/newArchEnabled=true/newArchEnabled=false/g' gradle.properties
170
- ./gradlew assemblerelease
111
+ yarn expo prebuild --platform android
112
+
113
+ # Build the APK without running on a device
114
+ - name : Build Android APK
115
+ working-directory : apps/external-display-example/android
116
+ run : ./gradlew assembleDebug
0 commit comments