Skip to content

Commit c87cfcb

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 c87cfcb

File tree

2 files changed

+95
-23
lines changed

2 files changed

+95
-23
lines changed

.github/workflows/push.yml

Lines changed: 81 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ 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+
SDL2_APK_ARTIFACT_FILENAME: sdl2_bdist_unit_tests_app-debug-1.1-.apk
9+
SDL2_AAB_ARTIFACT_FILENAME: sdl2_bdist_unit_tests_app-release-1.1-.aab
10+
WEBVIEW_APK_ARTIFACT_FILENAME: webview_bdist_unit_tests_app-debug-1.1-.apk
11+
WEBVIEW_AAB_ARTIFACT_FILENAME: webview_bdist_unit_tests_app-release-1.1-.aab
812
PYTHONFORANDROID_PREREQUISITES_INSTALL_INTERACTIVE: 0
913

1014
jobs:
@@ -75,17 +79,30 @@ jobs:
7579
- name: Pull docker image
7680
run: |
7781
make docker/pull
78-
- name: Build multi-arch apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
82+
- name: Build multi-arch sdl2 apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
7983
run: |
8084
mkdir -p apks
8185
make docker/run/make/with-artifact/apk/testapps-with-numpy
82-
- name: Rename artifact to include the build platform name
86+
- name: Rename sdl2 apk artifact to include the build platform name
8387
run: |
84-
mv apks/${{ env.APK_ARTIFACT_FILENAME }} apks/${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
85-
- uses: actions/upload-artifact@v1
88+
mv apks/${{ env.APK_ARTIFACT_FILENAME }} apks/${{ matrix.runs_on }}-${{ env.SDL2_APK_ARTIFACT_FILENAME }}
89+
- name: Upload sdl2 apk artifact
90+
uses: actions/upload-artifact@v1
8691
with:
87-
name: ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
88-
path: apks
92+
name: ${{ matrix.runs_on }}-${{ env.SDL2_APK_ARTIFACT_FILENAME }}
93+
path: apks/${{ matrix.runs_on }}-${{ env.SDL2_APK_ARTIFACT_FILENAME }}
94+
- name: Build multi-arch webview apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
95+
run: |
96+
mkdir -p apks
97+
make docker/run/make/with-artifact/apk/testapps-webview
98+
- name: Rename webview artifact to include the build platform name
99+
run: |
100+
mv apks/${{ env.APK_ARTIFACT_FILENAME }} apks/${{ matrix.runs_on }}-${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }}
101+
- name: Upload webview apk artifact
102+
uses: actions/upload-artifact@v1
103+
with:
104+
name: ${{ matrix.runs_on }}-${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }}
105+
path: apks/${{ matrix.runs_on }}-${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }}
89106

90107
macos_build_apk:
91108
name: Unit test apk [ ${{ matrix.runs_on }} ]
@@ -124,18 +141,32 @@ jobs:
124141
arm64_set_path_and_python_version 3.9.7
125142
brew install autoconf automake libtool openssl pkg-config
126143
make --file ci/makefiles/osx.mk
127-
- name: Build multi-arch apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
144+
- name: Build multi-arch sdl2 apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
128145
run: |
129146
source ci/osx_ci.sh
130147
arm64_set_path_and_python_version 3.9.7
131148
make testapps-with-numpy
132-
- name: Rename artifact to include the build platform name
149+
- name: Rename sdl2 artifact to include the build platform name
150+
run: |
151+
mv testapps/on_device_unit_tests/${{ env.APK_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.SDL2_APK_ARTIFACT_FILENAME }}
152+
- name: Upload sdl2 apk artifact
153+
uses: actions/upload-artifact@v1
154+
with:
155+
name: ${{ matrix.runs_on }}-${{ env.SDL2_APK_ARTIFACT_FILENAME }}
156+
path: ${{ matrix.runs_on }}-${{ env.SDL2_APK_ARTIFACT_FILENAME }}
157+
- name: Build multi-arch webview apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
158+
run: |
159+
source ci/osx_ci.sh
160+
arm64_set_path_and_python_version 3.9.7
161+
make testapps-webview
162+
- name: Rename webview artifact to include the build platform name
133163
run: |
134-
mv testapps/on_device_unit_tests/${{ env.APK_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
135-
- uses: actions/upload-artifact@v1
164+
mv testapps/on_device_unit_tests/${{ env.APK_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }}
165+
- name: Upload webview apk artifact
166+
uses: actions/upload-artifact@v1
136167
with:
137-
name: ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
138-
path: ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
168+
name: ${{ matrix.runs_on }}-${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }}
169+
path: ${{ matrix.runs_on }}-${{ env.WEBVIEW_APK_ARTIFACT_FILENAME }}
139170

140171
ubuntu_build_aab:
141172
name: Unit test aab [ ${{ matrix.runs_on }} ]
@@ -160,17 +191,30 @@ jobs:
160191
- name: Pull docker image
161192
run: |
162193
make docker/pull
163-
- name: Build Android App Bundle Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
194+
- name: Build sdl2 Android App Bundle Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
164195
run: |
165196
mkdir -p aabs
166197
make docker/run/make/with-artifact/aab/testapps-with-numpy-aab
167-
- name: Rename artifact to include the build platform name
198+
- name: Rename sdl2 artifact to include the build platform name
168199
run: |
169-
mv aabs/${{ env.AAB_ARTIFACT_FILENAME }} aabs/${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
170-
- uses: actions/upload-artifact@v1
200+
mv aabs/${{ env.AAB_ARTIFACT_FILENAME }} aabs/${{ matrix.runs_on }}-${{ env.SDL2_AAB_ARTIFACT_FILENAME }}
201+
- name: Upload sdl2 apk artifact
202+
uses: actions/upload-artifact@v1
171203
with:
172204
name: ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
173-
path: aabs
205+
path: aabs/${{ matrix.runs_on }}-${{ env.SDL2_AAB_ARTIFACT_FILENAME }}
206+
- name: Build webview Android App Bundle Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
207+
run: |
208+
mkdir -p aabs
209+
make docker/run/make/with-artifact/aab/testapps-webview-aab
210+
- name: Rename webview artifact to include the build platform name
211+
run: |
212+
mv aabs/${{ env.AAB_ARTIFACT_FILENAME }} aabs/${{ matrix.runs_on }}-${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }}
213+
- name: Upload webview apk artifact
214+
uses: actions/upload-artifact@v1
215+
with:
216+
name: ${{ matrix.runs_on }}-${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }}
217+
path: aabs/${{ matrix.runs_on }}-${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }}
174218

175219
macos_build_aab:
176220
name: Unit test aab [ ${{ matrix.runs_on }} ]
@@ -209,18 +253,32 @@ jobs:
209253
arm64_set_path_and_python_version 3.9.7
210254
brew install autoconf automake libtool openssl pkg-config
211255
make --file ci/makefiles/osx.mk
212-
- name: Build multi-arch aab Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
256+
- name: Build multi-arch sdl2 aab Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
213257
run: |
214258
source ci/osx_ci.sh
215259
arm64_set_path_and_python_version 3.9.7
216260
make testapps-with-numpy-aab
217-
- name: Rename artifact to include the build platform name
261+
- name: Rename sdl2 artifact to include the build platform name
262+
run: |
263+
mv testapps/on_device_unit_tests/${{ env.AAB_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.SDL2_AAB_ARTIFACT_FILENAME }}
264+
- name: Upload sdl2 apk artifact
265+
uses: actions/upload-artifact@v1
266+
with:
267+
name: ${{ matrix.runs_on }}-${{ env.SDL2_AAB_ARTIFACT_FILENAME }}
268+
path: ${{ matrix.runs_on }}-${{ env.SDL2_AAB_ARTIFACT_FILENAME }}
269+
- name: Build multi-arch webview aab Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
270+
run: |
271+
source ci/osx_ci.sh
272+
arm64_set_path_and_python_version 3.9.7
273+
make testapps-webview-aab
274+
- name: Rename webview artifact to include the build platform name
218275
run: |
219-
mv testapps/on_device_unit_tests/${{ env.AAB_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
220-
- uses: actions/upload-artifact@v1
276+
mv testapps/on_device_unit_tests/${{ env.AAB_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }}
277+
- name: Upload webview apk artifact
278+
uses: actions/upload-artifact@v1
221279
with:
222-
name: ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
223-
path: ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
280+
name: ${{ matrix.runs_on }}-${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }}
281+
path: ${{ matrix.runs_on }}-${{ env.WEBVIEW_AAB_ARTIFACT_FILENAME }}
224282

225283
ubuntu_rebuild_updated_recipes:
226284
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 \
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 aab --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
60+
--bootstrap webview \
61+
--requirements sqlite3,libffi,openssl,pyjnius,flask,python3,genericndkbuild \
62+
--arch=armeabi-v7a --arch=arm64-v8a --arch=x86_64 --arch=x86 --release
63+
5064
testapps/%: virtualenv
5165
$(eval $@_APP_ARCH := $(shell basename $*))
5266
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \

0 commit comments

Comments
 (0)