Skip to content

Commit acbf02a

Browse files
authored
Merge branch 'develop' into make_debug_release_debuggable
2 parents 34a9837 + 9279048 commit acbf02a

File tree

240 files changed

+4684
-3179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+4684
-3179
lines changed

.env

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# used by coveralls.io, refs:
2+
# https://coveralls-python.readthedocs.io/en/latest/usage/tox.html#travisci
3+
CI
4+
TRAVIS
5+
TRAVIS_BRANCH
6+
TRAVIS_JOB_ID
7+
TRAVIS_PULL_REQUEST

.github/workflows/push.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Unit tests & Build Testapp
2+
3+
on: ['push', 'pull_request']
4+
5+
jobs:
6+
7+
flake8:
8+
name: Flake8 tests
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout python-for-android
12+
uses: actions/checkout@v2
13+
- name: Set up Python 3.7
14+
uses: actions/setup-python@v1.1.0
15+
with:
16+
python-version: 3.7
17+
- name: Run flake8
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install tox>=2.0
21+
tox -e pep8
22+
23+
test:
24+
name: Pytest [Python ${{ matrix.python-version }} | ${{ matrix.os }}]
25+
needs: flake8
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
matrix:
29+
python-version: [3.6, 3.7]
30+
os: [ubuntu-latest, macOs-latest]
31+
steps:
32+
- name: Checkout python-for-android
33+
uses: actions/checkout@v2
34+
- name: Set up Python ${{ matrix.python-version }}
35+
uses: actions/setup-python@v1.1.0
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
- name: Tox tests
39+
run: |
40+
python -m pip install --upgrade pip
41+
pip install tox>=2.0
42+
make test
43+
44+
build:
45+
name: Build testapp
46+
needs: [flake8]
47+
runs-on: ubuntu-latest
48+
strategy:
49+
matrix:
50+
build-arch: ['arm64-v8a', 'armeabi-v7a']
51+
steps:
52+
- name: Checkout python-for-android
53+
uses: actions/checkout@v2
54+
- name: Pull docker image
55+
run: |
56+
make docker/pull
57+
- name: Build apk for Python 3 ${{ matrix.build-arch }}
58+
run: |
59+
mkdir -p apks
60+
make docker/run/make/with-artifact/testapps/${{ 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
65+
66+
rebuild_updated_recipes:
67+
name: Test updated recipes
68+
needs: [flake8]
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Checkout python-for-android (current branch)
72+
uses: actions/checkout@v2
73+
- name: Checkout python-for-android (develop branch)
74+
uses: actions/checkout@v2
75+
with:
76+
ref: 'develop'
77+
- name: Pull docker image
78+
run: |
79+
make docker/pull
80+
- name: Rebuild updated recipes
81+
run: |
82+
make docker/run/make/rebuild_updated_recipes

.travis.yml

Lines changed: 21 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
sudo: required
2-
3-
dist: xenial # needed for more recent python 3 and python3-venv
4-
51
language: generic
62

73
stages:
8-
- lint
9-
- test
4+
- unit tests
5+
- build testapps
106

117
services:
128
- docker
@@ -16,15 +12,10 @@ before_install:
1612
- git remote set-branches --add origin develop
1713
- git fetch
1814

19-
env:
20-
global:
21-
- ANDROID_SDK_HOME=/opt/android/android-sdk
22-
- ANDROID_NDK_HOME=/opt/android/android-ndk
23-
2415
jobs:
2516
include:
26-
- &linting
27-
stage: lint
17+
- &unittests
18+
stage: unit tests
2819
language: python
2920
python: 3.7
3021
before_script:
@@ -41,44 +32,29 @@ jobs:
4132
- pip3.7 install pyOpenSSL
4233
- pip3.7 install coveralls
4334
script:
44-
# we want to fail fast on tox errors without having to `docker build` first
35+
# ignores test_pythonpackage.py since it runs for too long
4536
- tox -- tests/ --ignore tests/test_pythonpackage.py
46-
# (we ignore test_pythonpackage.py since these run way too long!!
47-
# test_pythonpackage_basic.py will still be run.)
4837
name: "Tox Pep8"
4938
env: TOXENV=pep8
50-
- <<: *linting
51-
name: "Tox Python 2"
52-
env: TOXENV=py27
53-
- <<: *linting
39+
- <<: *unittests
5440
name: "Tox Python 3 & Coverage"
5541
env: TOXENV=py3
5642
after_success:
5743
- coveralls
58-
59-
- &testing
60-
stage: test
61-
before_script:
62-
# build docker image
63-
- docker build --tag=p4a --file Dockerfile.py3 .
64-
# Run a background process to make sure that travis will not kill our tests in
65-
# case that the travis log doesn't produce any output for more than 10 minutes
66-
- while sleep 540; do echo "==== Still running (travis, don't kill me) ===="; done &
67-
script:
68-
- docker run -e CI -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" p4a /bin/sh -c "$COMMAND"
69-
after_script:
70-
# kill the background process started before run docker
71-
- kill %1
44+
- &testapps
45+
name: Python 3 arm64-v8a (with numpy)
46+
stage: build testapps
47+
before_script: make docker/pull
48+
script: make docker/run/make/testapps/arm64-v8a
49+
- <<: *testapps
7250
name: Python 3 armeabi-v7a
73-
# overrides requirements to skip `peewee` pure python module, see:
74-
# https://github.com/kivy/python-for-android/issues/1263#issuecomment-390421054
75-
env: COMMAND='. venv/bin/activate && cd testapps/ && python setup_testapp_python3_sqlite_openssl.py apk --sdk-dir $ANDROID_SDK_HOME --ndk-dir $ANDROID_NDK_HOME --requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools' --arch=armeabi-v7a
76-
- <<: *testing
77-
name: Python 3 arm64-v8a
78-
env: COMMAND='. venv/bin/activate && cd testapps/ && python setup_testapp_python3_sqlite_openssl.py apk --sdk-dir $ANDROID_SDK_HOME --ndk-dir $ANDROID_NDK_HOME --requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools' --arch=arm64-v8a
79-
- <<: *testing
80-
name: Python 2 basic
81-
env: COMMAND='. venv/bin/activate && cd testapps/ && python setup_testapp_python2_sqlite_openssl.py apk --sdk-dir $ANDROID_SDK_HOME --ndk-dir $ANDROID_NDK_HOME --requirements sdl2,pyjnius,kivy,python2,openssl,requests,sqlite3,setuptools,numpy'
82-
- <<: *testing
51+
os: osx
52+
osx_image: xcode11 # since xcode1.3, python3 is the default interpreter
53+
before_script:
54+
# installs java 1.8, android's SDK/NDK and p4a
55+
- make -f ci/makefiles/osx.mk
56+
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
57+
script: make testapps/armeabi-v7a PYTHON_WITH_VERSION=python3
58+
- <<: *testapps
8359
name: Rebuild updated recipes
84-
env: COMMAND='. venv/bin/activate && ./ci/rebuild_updated_recipes.py'
60+
script: travis_wait 30 make docker/run/make/rebuild_updated_recipes

Dockerfile.py2

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)