@@ -88,156 +88,3 @@ jobs:
88
88
- name : Run `vab test-all`
89
89
run : |
90
90
vab test-all
91
-
92
- macos-legacy-run-v-examples :
93
- runs-on : macos-12
94
- timeout-minutes : 45
95
- env :
96
- VAB_FLAGS : -cg -f '-d no_load_styles' -v 3 --api 30 --build-tools 33.0.2 --device auto --log-clear --archs x86_64
97
- VFLAGS : -no-parallel
98
- steps :
99
- - uses : actions/setup-java@v4
100
- with :
101
- distribution : ' adopt'
102
- java-version : 8
103
-
104
- - name : Checkout V
105
- uses : actions/checkout@v4
106
- with :
107
- repository : vlang/v
108
- path : v
109
-
110
- - name : Build and install v
111
- run : cd ./v && make -j4 && sudo ./v symlink
112
-
113
- - name : Checkout vab
114
- uses : actions/checkout@v4
115
- with :
116
- path : vab
117
-
118
- - name : Simulate "v install vab"
119
- run : mv vab ~/.vmodules
120
-
121
- - name : Build vab with -prod
122
- run : v -prod ~/.vmodules/vab
123
-
124
- - name : Build vab
125
- run : v -g ~/.vmodules/vab
126
-
127
- - name : Symlink vab
128
- run : sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab
129
-
130
- - name : Run vab --help
131
- run : vab --help
132
-
133
- - name : Install SDK dependencies
134
- run : |
135
- vab install "build-tools;33.0.2"
136
- vab install "platforms;android-30"
137
- vab install bundletool
138
- vab install aapt2
139
-
140
- - name : Run vab doctor
141
- run : vab doctor
142
-
143
- - name : Cache emulator
144
- id : cache-emulator
145
- uses : actions/cache@v4
146
- with :
147
- path : |
148
- /Users/runner/Library/Android/sdk/system-images/android-30
149
- key : ${{ runner.os }}-android-emulator-${{ hashFiles('/Users/runner/Library/Android/sdk/system-images/android-30') }}
150
-
151
- - name : Prepare emulator
152
- if : steps.cache-emulator.outputs.cache-hit != 'true'
153
- run : |
154
- vab install 'system-images;android-30;aosp_atd;x86_64'
155
-
156
- - name : Create test AVD
157
- run : |
158
- export ANDROID_SDK_ROOT="$HOME/Library/Android/sdk"
159
- echo no | $ANDROID_SDK_ROOT/tools/bin/avdmanager create avd --force --name test --abi aosp_atd/x86_64 --package 'system-images;android-30;aosp_atd;x86_64'
160
-
161
- - name : Install and run V + V UI examples as APK and AAB
162
- run : |
163
- export ANDROID_SDK_ROOT="$HOME/Library/Android/sdk"
164
- export ANDROID_NDK_ROOT="$ANDROID_SDK_ROOT/ndk-bundle"
165
-
166
- # Don't set Java > 8 here (emulator can't be started otherwise, lol) #export JAVA_HOME=$JAVA_HOME_11_X64
167
- #pgrep emulator >/dev/null 2>&1 ||
168
- $ANDROID_SDK_ROOT/emulator/emulator -avd test -wipe-data -no-metrics -no-snapshot -no-window -no-boot-anim -camera-back emulated -camera-front emulated -gpu swiftshader_indirect &
169
- adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;'
170
-
171
- # Debugging
172
- #export ADB_TAGS="SOKOL_APP:D"
173
- #export ADB_TAGS="$ADB_TAGS V_ANDROID:D v_test_app:D"
174
-
175
- # Test deployment of single file *after* build
176
- echo "Testing vab deployment *after* build"
177
- vab --package-id "io.v.ci.vab.apk.deploytest" --name "V DEPLOY TEST APK" v/examples/gg/bezier.v
178
- vab v_deploy_test_apk.apk
179
- sleep 1 # Experience tells us that the emulator likes to catch it's breath...
180
- vab --package-id "io.v.ci.vab.aab.deploytest" --name "V DEPLOY TEST AAB" --package aab v/examples/gg/bezier.v
181
- v retry -r 2 -- vab v_deploy_test_aab.aab
182
-
183
- # Skip fireworks for now
184
- declare -a v_examples=('2048' 'flappylearning' 'tetris' 'sokol/particles' 'sokol/drawing.v' 'sokol/freetype_raven.v' 'gg/bezier.v' 'gg/bezier_anim.v' 'gg/polygons.v' 'gg/raven_text_rendering.v' 'gg/rectangles.v' 'gg/stars.v' 'gg/worker_thread.v')
185
-
186
- echo "Compiling V examples ${v_examples[@]}"
187
- for example in "${v_examples[@]}"; do
188
- #path_safe_name=$( echo "$example" | sed 's%/%-%' | sed 's%\.%-%' )
189
- package_id=$( echo "$example" | sed 's%/%%' | sed 's%\.%%' )
190
- package_id=$( echo "v$package_id" )
191
-
192
- # APK
193
- echo "Compiling apk from examples/$example ($package_id)"
194
- vab --package-id "io.v.apk.$package_id" run v/examples/$example
195
-
196
- sleep 1 # Experience tells us that the emulator likes to catch it's breath...
197
-
198
- # AAB
199
- echo "Compiling aab from examples/$example ($package_id)"
200
- v retry -r 2 -- vab --package aab --package-id "io.v.aab.$package_id" run v/examples/$example
201
- done
202
-
203
- # Output test
204
- echo "Testing if v/examples/tetris can run..."
205
- vab -g --package-id "io.v.ci.vab.apk.examples.tetris" run v/examples/tetris
206
- sleep 5 # give the emulator a little time to start the application...
207
- adb -e logcat -d > /tmp/logcat.dump.txt
208
- echo "Looking for traces of BDWGC"
209
- cat /tmp/logcat.dump.txt | grep -q 'BDWGC : Grow'; if [ ! $? -eq 0 ]; then cat /tmp/logcat.dump.txt; fi
210
-
211
- # V UI
212
- echo "Installing V UI"
213
- git clone --depth 1 https://github.com/vlang/ui
214
- cd ui ; mkdir -p ~/.vmodules ; ln -s $(pwd) ~/.vmodules/ui ; cd ..
215
-
216
- declare -a v_ui_examples=('rectangles.v')
217
-
218
- echo "Compiling examples ${v_ui_examples[@]}"
219
- for example in "${v_ui_examples[@]}"; do
220
- package_id=$( echo "$example" | sed 's%/%%' | sed 's%\.%%' )
221
- package_id=$( echo "v$package_id" )
222
-
223
- # APK
224
- echo "Compiling apk from ui/examples/$example ($package_id)"
225
- vab --package-id "io.v.apk.ui.$package_id" run ui/examples/$example
226
-
227
- sleep 1 # Experience tells us that the emulator likes to catch it's breath...
228
-
229
- # AAB
230
- echo "Compiling aab from ui/examples/$example ($package_id)"
231
- v retry -r 2 -- vab --package aab --package-id "io.v.aab.ui.$package_id" run ui/examples/$example
232
- done
233
-
234
- # Output test
235
- echo "Testing if ui/examples/calculator can run..."
236
- vab -g --package-id "io.v.ui.ci.examples.calculator" run ui/examples/calculator.v
237
- sleep 5 # give the emulator a little time to start the application...
238
- adb -e logcat -d > /tmp/logcat.dump.txt
239
- echo "Looking for traces of BDWGC"
240
- cat /tmp/logcat.dump.txt | grep -q 'BDWGC : Grow'; if [ ! $? -eq 0 ]; then cat /tmp/logcat.dump.txt; fi
241
-
242
- echo "Killing emulator"
243
- adb -s emulator-5554 emu kill
0 commit comments