Skip to content

Commit 04a126b

Browse files
committed
Add webview app make targets and artifact builds
This should help exercise the webview bootstrap in CI and allow testing a webview app using the built artifacts.
1 parent 9e32389 commit 04a126b

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/push.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on: ['push', 'pull_request']
55
env:
66
APK_ARTIFACT_FILENAME: bdist_unit_tests_app-debug-1.1-.apk
77
AAB_ARTIFACT_FILENAME: bdist_unit_tests_app-release-1.1-.aab
8+
WEBVIEW_APK_ARTIFACT_FILENAME: bdist_unit_tests_webview_app-debug-1.1-.apk
9+
WEBVIEW_AAB_ARTIFACT_FILENAME: bdist_unit_tests_webview_app-release-1.1-.aab
810
PYTHONFORANDROID_PREREQUISITES_INSTALL_INTERACTIVE: 0
911

1012
jobs:
@@ -79,13 +81,19 @@ jobs:
7981
run: |
8082
mkdir -p apks
8183
make docker/run/make/with-artifact/apk/testapps-with-numpy
84+
make docker/run/make/with-artifact/apk/testapps-webview
8285
- name: Rename artifact to include the build platform name
8386
run: |
8487
mv apks/${{ env.APK_ARTIFACT_FILENAME }} apks/${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
88+
mv apks/${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }} apks/${{ matrix.runs_on }}-${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }}
8589
- uses: actions/upload-artifact@v1
8690
with:
8791
name: ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
8892
path: apks
93+
- uses: actions/upload-artifact@v1
94+
with:
95+
name: ${{ matrix.runs_on }}-${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }}
96+
path: apks
8997

9098
macos_build_apk:
9199
name: Unit test apk [ ${{ matrix.runs_on }} ]
@@ -129,13 +137,19 @@ jobs:
129137
source ci/osx_ci.sh
130138
arm64_set_path_and_python_version 3.9.7
131139
make testapps-with-numpy
140+
make testapps-webview
132141
- name: Rename artifact to include the build platform name
133142
run: |
134143
mv testapps/on_device_unit_tests/${{ env.APK_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
144+
mv testapps/on_device_unit_tests/${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }}
135145
- uses: actions/upload-artifact@v1
136146
with:
137147
name: ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
138148
path: ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
149+
- uses: actions/upload-artifact@v1
150+
with:
151+
name: ${{ matrix.runs_on }}-${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }}
152+
path: ${{ matrix.runs_on }}-${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }}
139153

140154
ubuntu_build_aab:
141155
name: Unit test aab [ ${{ matrix.runs_on }} ]
@@ -164,13 +178,19 @@ jobs:
164178
run: |
165179
mkdir -p aabs
166180
make docker/run/make/with-artifact/aab/testapps-with-numpy-aab
181+
make docker/run/make/with-artifact/aab/testapps-webview-aab
167182
- name: Rename artifact to include the build platform name
168183
run: |
169184
mv aabs/${{ env.AAB_ARTIFACT_FILENAME }} aabs/${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
185+
mv aabs/${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }} aabs/${{ matrix.runs_on }}-${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }}
170186
- uses: actions/upload-artifact@v1
171187
with:
172188
name: ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
173189
path: aabs
190+
- uses: actions/upload-artifact@v1
191+
with:
192+
name: ${{ matrix.runs_on }}-${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }}
193+
path: aabs
174194

175195
macos_build_aab:
176196
name: Unit test aab [ ${{ matrix.runs_on }} ]
@@ -214,13 +234,19 @@ jobs:
214234
source ci/osx_ci.sh
215235
arm64_set_path_and_python_version 3.9.7
216236
make testapps-with-numpy-aab
237+
make testapps-webview-aab
217238
- name: Rename artifact to include the build platform name
218239
run: |
219240
mv testapps/on_device_unit_tests/${{ env.AAB_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
241+
mv testapps/on_device_unit_tests/${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }}
220242
- uses: actions/upload-artifact@v1
221243
with:
222244
name: ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
223245
path: ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
246+
- uses: actions/upload-artifact@v1
247+
with:
248+
name: ${{ matrix.runs_on }}-${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }}
249+
path: ${{ matrix.runs_on }}-${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }}
224250

225251
ubuntu_rebuild_updated_recipes:
226252
name: Test updated recipes for arch ${{ matrix.android_arch }} [ ubuntu-latest ]

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@ testapps-with-numpy-aab: virtualenv
4747
--requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,urllib3,chardet,idna,sqlite3,setuptools,numpy \
4848
--arch=armeabi-v7a --arch=arm64-v8a --arch=x86_64 --arch=x86 --release
4949

50+
testapps-webview: virtualenv
51+
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
52+
python setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
53+
--bootstrap webview --dist-name bdist_unit_tests_webview_app \
54+
--requirements sqlite3,libffi,openssl,pyjnius,flask,python3,genericndkbuild \
55+
--arch=armeabi-v7a --arch=arm64-v8a --arch=x86_64 --arch=x86
56+
57+
testapps-webview-aab: virtualenv
58+
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
59+
python setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
60+
--bootstrap webview --dist-name bdist_unit_tests_webview_app \
61+
--requirements sqlite3,libffi,openssl,pyjnius,flask,python3,genericndkbuild \
62+
--arch=armeabi-v7a --arch=arm64-v8a --arch=x86_64 --arch=x86
63+
5064
testapps/%: virtualenv
5165
$(eval $@_APP_ARCH := $(shell basename $*))
5266
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \

0 commit comments

Comments
 (0)