8000 [gh-actions] Add new testapp and upload artifacts... (#2033) · pakal/python-for-android@2610330 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2610330

Browse files
authored
[gh-actions] Add new testapp and upload artifacts... (kivy#2033)
* [gh-actions] Add testapp for `armeabi-v7a` and create artifacts * [gh-actions] Pin actions/checkout to v1
1 parent e57deb4 commit 2610330

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

.github/workflows/push.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout python-for-android
12-
uses: actions/checkout@master
12+
uses: actions/checkout@v1
1313
- name: Set up Python 3.7
1414
uses: actions/setup-python@v1.1.0
1515
with:
@@ -30,7 +30,7 @@ jobs:
3030
os: [ubuntu-latest, macOs-latest]
3131
steps:
3232
- name: Checkout python-for-android
33-
uses: actions/checkout@master
33+
uses: actions/checkout@v1
3434
- name: Set up Python ${{ matrix.python-version }}
3535
uses: actions/setup-python@v1.1.0
3636
with:
@@ -45,23 +45,31 @@ jobs:
4545
name: Build testapp
4646
needs: [flake8]
4747
runs-on: ubuntu-latest
48+
strategy:
49+
matrix:
50+
build-arch: ['arm64-v8a', 'armeabi-v7a']
4851
steps:
4952
- name: Checkout python-for-android
50-
uses: actions/checkout@master
53+
uses: actions/checkout@v1
5154
- name: Pull docker image
5255
run: |
5356
make docker/pull
54-
- name: Build apk for Python 3 arm64-v8a
57+
- name: Build apk for Python 3 ${{ matrix.build-arch }}
5558
run: |
56-
make docker/run/make/testapps/python3/arm64-v8a
59+
mkdir -p apks
60+
make docker/run/make/with-artifact/testapps/python3/${{ matrix.build-arch }}
61+
- uses: actions/upload-artifact@v1
62+
with:
63+
name: bdisttest_python3_sqlite_openssl_googlendk__${{ matrix.build-arch }}-debug-1.1.apk
64+
path: apks
5765

5866
rebuild_updated_recipes:
5967
name: Test updated recipes
6068
needs: [flake8]
6169
runs-on: ubuntu-latest
6270
steps:
6371
- name: Checkout python-for-android
64-
uses: actions/checkout@master
72+
uses: actions/checkout@v1
6573
- name: Pull docker image
6674
run: |
6775
make docker/pull

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,16 @@ docker/run/command: docker/build
7676
docker/run/make/%: docker/build
7777
docker run --rm --env-file=.env $(DOCKER_IMAGE) make $*
7878

79+
docker/run/make/with-artifact/%: docker/build
80+
ifeq (,$(findstring python3,$($*)))
81+
$(eval $@_APP_NAME := bdisttest_python3_sqlite_openssl_googlendk)
82+
else
83+
$(eval $@_APP_NAME := bdisttest_python2_sqlite_openssl)
84+
endif
85+
$(eval $@_APP_ARCH := $(shell basename $*))
86+
docker run --name p4a-latest --env-file=.env $(DOCKER_IMAGE) make $*
87+
docker cp p4a-latest:/home/user/app/testapps/$($@_APP_NAME)__$($@_APP_ARCH)-debug-1.1-.apk ./apks
88+
docker rm -fv p4a-latest
89+
7990
docker/run/shell: docker/build
8091
docker run --rm --env-file=.env -it $(DOCKER_IMAGE)

0 commit comments

Comments
 (0)
0