Skip to content

Commit e3c95b6

Browse files
committed
Github actions test apps (apk + aab)
1 parent 1a8dfa0 commit e3c95b6

File tree

2 files changed

+39
-10
lines changed

2 files changed

+39
-10
lines changed

.github/workflows/push.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ jobs:
4545
name: Unit test apk
4646
needs: [flake8]
4747
runs-on: ubuntu-latest
48-
strategy:
49-
fail-fast: false
50-
matrix:
51-
build-arch: ['arm64-v8a', 'armeabi-v7a', 'x86_64', 'x86']
5248
steps:
5349
- name: Checkout python-for-android
5450
uses: actions/checkout@v2
@@ -64,15 +60,43 @@ jobs:
6460
- name: Pull docker image
6561
run: |
6662
make docker/pull
67-
- name: Build apk Python 3 ${{ matrix.build-arch }}
63+
- name: Build multi-arch apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
6864
run: |
6965
mkdir -p apks
70-
make docker/run/make/with-artifact/testapps-with-numpy/${{ matrix.build-arch }}
66+
make docker/run/make/with-artifact/testapps-with-numpy
7167
- uses: actions/upload-artifact@v1
7268
with:
73-
name: bdist_test_app_unittests__${{ matrix.build-arch }}-debug-1.1.apk
69+
name: bdist_unit_tests_app-debug-1.1-.apk
7470
path: apks
7571

72+
build:
73+
name: Unit test aab
74+
needs: [flake8]
75+
runs-on: ubuntu-latest
76+
steps:
77+
- name: Checkout python-for-android
78+
uses: actions/checkout@v2
79+
# helps with GitHub runner getting out of space
80+
- name: Free disk space
81+
run: |
82+
df -h
83+
sudo swapoff -a
84+
sudo rm -f /swapfile
85+
sudo apt -y clean
86+
docker rmi $(docker image ls -aq)
87+
df -h
88+
- name: Pull docker image
89+
run: |
90+
make docker/pull
91+
- name: Build Android App Bundle Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
92+
run: |
93+
mkdir -p aabs
94+
make docker/run/make/with-artifact/testapps-with-numpy-aab
95+
- uses: actions/upload-artifact@v1
96+
with:
97+
name: bdist_unit_tests_app-release-1.1-.aab
98+
path: aabs
99+
76100
rebuild_updated_recipes:
77101
name: Test updated recipes
78102
needs: [flake8]

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,17 @@ rebuild_updated_recipes: virtualenv
3434
ANDROID_SDK_HOME=$(ANDROID_SDK_HOME) ANDROID_NDK_HOME=$(ANDROID_NDK_HOME) \
3535
$(PYTHON) ci/rebuild_updated_recipes.py
3636

37-
testapps-with-numpy/%: virtualenv
38-
$(eval $@_APP_ARCH := $(shell basename $*))
37+
testapps-with-numpy: virtualenv
3938
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
4039
python setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
4140
--requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,urllib3,chardet,idna,sqlite3,setuptools,numpy \
42-
--arch=$($@_APP_ARCH)
41+
--arch=armeabi-v7a --arch=arm64-v8a --arch=x86_64 --arch=x86
42+
43+
testapps-with-numpy-aab: virtualenv
44+
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
45+
python setup.py aab --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
46+
--requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,urllib3,chardet,idna,sqlite3,setuptools,numpy \
47+
--arch=armeabi-v7a --arch=arm64-v8a --arch=x86_64 --arch=x86 --release
4348

4449
testapps/%: virtualenv
4550
$(eval $@_APP_ARCH := $(shell basename $*))

0 commit comments

Comments
 (0)