Skip to content

Commit 598cc79

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 eb33352 commit 598cc79

File tree

2 files changed

+69
-27
lines changed

2 files changed

+69
-27
lines changed

.github/workflows/push.yml

Lines changed: 55 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,17 @@ jobs:
5353
flag-name: run-${{ matrix.os }}-${{ matrix.python-version }}
5454

5555
ubuntu_build_apk:
56-
name: Unit test apk [ ${{ matrix.runs_on }} ]
56+
name: Unit test apk [ ${{ matrix.runs_on }} | ${{ matrix.bootstrap.name }} ]
5757
needs: [flake8]
5858
runs-on: ${{ matrix.runs_on }}
59+
continue-on-error: true
5960
strategy:
6061
matrix:
62+
bootstrap:
63+
- name: sdl2
64+
target: testapps-with-numpy
65+
- name: webview
66+
target: testapps-webview
6167
include:
6268
- runs_on: ubuntu-latest
6369
steps:
@@ -78,24 +84,31 @@ jobs:
7884
- name: Build multi-arch apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
7985
run: |
8086
mkdir -p apks
81-
make docker/run/make/with-artifact/apk/testapps-with-numpy
82-
- name: Rename artifact to include the build platform name
87+
make docker/run/make/with-artifact/apk/${{ matrix.bootstrap.target }}
88+
- name: Rename apk artifact to include the build platform name
8389
run: |
84-
mv apks/${{ env.APK_ARTIFACT_FILENAME }} apks/${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
85-
- uses: actions/upload-artifact@v1
90+
mv apks/${{ env.APK_ARTIFACT_FILENAME }} apks/${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
91+
- name: Upload apk artifact
92+
uses: actions/upload-artifact@v1
8693
with:
87-
name: ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
88-
path: apks
94+
name: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
95+
path: apks/${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
8996

9097
macos_build_apk:
91-
name: Unit test apk [ ${{ matrix.runs_on }} ]
98+
name: Unit test apk [ ${{ matrix.runs_on }} | ${{ matrix.bootstrap.name }} ]
9299
needs: [flake8]
93100
defaults:
94101
run:
95102
shell: ${{ matrix.run_wrapper || 'bash --noprofile --norc -eo pipefail {0}' }}
96103
runs-on: ${{ matrix.runs_on }}
104+
continue-on-error: true
97105
strategy:
98106
matrix:
107+
bootstrap:
108+
- name: sdl2
109+
target: testapps-with-numpy
110+
- name: webview
111+
target: testapps-webview
99112
include:
100113
- runs_on: macos-latest
101114
- runs_on: apple-silicon-m1
@@ -127,21 +140,28 @@ jobs:
127140
run: |
128141
source ci/osx_ci.sh
129142
arm64_set_path_and_python_version 3.9.7
130-
make testapps-with-numpy
131-
- name: Rename artifact to include the build platform name
143+
make ${{ matrix.bootstrap.target }}
144+
- name: Rename apk artifact to include the build platform name
132145
run: |
133-
mv testapps/on_device_unit_tests/${{ env.APK_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
134-
- uses: actions/upload-artifact@v1
146+
mv testapps/on_device_unit_tests/${{ env.APK_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
147+
- name: Upload apk artifact
148+
uses: actions/upload-artifact@v1
135149
with:
136-
name: ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
137-
path: ${{ matrix.runs_on }}-${{ env.APK_ARTIFACT_FILENAME }}
150+
name: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
151+
path: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.APK_ARTIFACT_FILENAME }}
138152

139153
ubuntu_build_aab:
140154
name: Unit test aab [ ${{ matrix.runs_on }} ]
141155
needs: [flake8]
142156
runs-on: ${{ matrix.runs_on }}
157+
continue-on-error: true
143158
strategy:
144159
matrix:
160+
bootstrap:
161+
- name: sdl2
162+
target: testapps-with-numpy-aab
163+
- name: webview
164+
target: testapps-webview-aab
145165
include:
146166
- runs_on: ubuntu-latest
147167
steps:
@@ -162,24 +182,31 @@ jobs:
162182
- name: Build Android App Bundle Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
163183
run: |
164184
mkdir -p aabs
165-
make docker/run/make/with-artifact/aab/testapps-with-numpy-aab
185+
make docker/run/make/with-artifact/aab/${{ matrix.bootstrap.target }}
166186
- name: Rename artifact to include the build platform name
167187
run: |
168-
mv aabs/${{ env.AAB_ARTIFACT_FILENAME }} aabs/${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
169-
- uses: actions/upload-artifact@v1
188+
mv aabs/${{ env.AAB_ARTIFACT_FILENAME }} aabs/${{ matrix.runs_on }}-${{ matrix.bootstrap.name}}-${{ env.AAB_ARTIFACT_FILENAME }}
189+
- name: Upload apk artifact
190+
uses: actions/upload-artifact@v1
170191
with:
171-
name: ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
172-
path: aabs
192+
name: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name}}-${{ env.AAB_ARTIFACT_FILENAME }}
193+
path: aabs/${{ matrix.runs_on }}-${{ matrix.bootstrap.name}}-${{ env.AAB_ARTIFACT_FILENAME }}
173194

174195
macos_build_aab:
175-
name: Unit test aab [ ${{ matrix.runs_on }} ]
196+
name: Unit test aab [ ${{ matrix.runs_on }} | ${{ matrix.bootstrap.name }} ]
176197
needs: [flake8]
177198
defaults:
178199
run:
179200
shell: ${{ matrix.run_wrapper || 'bash --noprofile --norc -eo pipefail {0}' }}
180201
runs-on: ${{ matrix.runs_on }}
202+
continue-on-error: true
181203
strategy:
182204
matrix:
205+
bootstrap:
206+
- name: sdl2
207+
target: testapps-with-numpy-aab
208+
- name: webview
209+
target: testapps-webview-aab
183210
include:
184211
- runs_on: macos-latest
185212
- runs_on: apple-silicon-m1
@@ -207,18 +234,19 @@ jobs:
207234
source ci/osx_ci.sh
208235
arm64_set_path_and_python_version 3.9.7
209236
make --file ci/makefiles/osx.mk
210-
- name: Build multi-arch aab Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
237+
- name: Build multi-arch sdl2 aab Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
211238
run: |
212239
source ci/osx_ci.sh
213240
arm64_set_path_and_python_version 3.9.7
214-
make testapps-with-numpy-aab
215-
- name: Rename artifact to include the build platform name
241+
make ${{ matrix.bootstrap.target }}
242+
- name: Rename sdl2 artifact to include the build platform name
216243
run: |
217-
mv testapps/on_device_unit_tests/${{ env.AAB_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
218-
- uses: actions/upload-artifact@v1
244+
mv testapps/on_device_unit_tests/${{ env.AAB_ARTIFACT_FILENAME }} ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.AAB_ARTIFACT_FILENAME }}
245+
- name: Upload sdl2 apk artifact
246+
uses: actions/upload-artifact@v1
219247
with:
220-
name: ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
221-
path: ${{ matrix.runs_on }}-${{ env.AAB_ARTIFACT_FILENAME }}
248+
name: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.AAB_ARTIFACT_FILENAME }}
249+
path: ${{ matrix.runs_on }}-${{ matrix.bootstrap.name }}-${{ env.AAB_ARTIFACT_FILENAME }}
222250

223251
ubuntu_rebuild_updated_recipes:
224252
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)