Skip to content

Commit b3482af

Browse files
author
Robert Pfeiffer
committed
Merge remote-tracking branch 'kivy/develop' into develop
2 parents b693e80 + f5dbf21 commit b3482af

File tree

222 files changed

+3788
-3976
lines changed

Some content is hidden

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

222 files changed

+3788
-3976
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: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Unit tests & build apps
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/[email protected]
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/[email protected]
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: Unit test apk
46+
needs: [flake8]
47+
runs-on: ubuntu-latest
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
build-arch: ['arm64-v8a', 'armeabi-v7a', 'x86_64', 'x86']
52+
steps:
53+
- name: Checkout python-for-android
54+
uses: actions/checkout@v2
55+
- name: Pull docker image
56+
run: |
57+
make docker/pull
58+
- name: Build apk Python 3 ${{ matrix.build-arch }}
59+
run: |
60+
mkdir -p apks
61+
make docker/run/make/with-artifact/testapps-with-numpy/${{ matrix.build-arch }}
62+
- uses: actions/upload-artifact@v1
63+
with:
64+
name: bdist_test_app_unittests__${{ matrix.build-arch }}-debug-1.1.apk
65+
path: apks
66+
67+
rebuild_updated_recipes:
68+
name: Test updated recipes
69+
needs: [flake8]
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Checkout python-for-android (current branch)
73+
uses: actions/checkout@v2
74+
- name: Checkout python-for-android (develop branch)
75+
uses: actions/checkout@v2
76+
with:
77+
ref: 'develop'
78+
- name: Pull docker image
79+
run: |
80+
make docker/pull
81+
- name: Rebuild updated recipes
82+
run: |
83+
make docker/run/make/rebuild_updated_recipes

.travis.yml

Lines changed: 15 additions & 56 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
@@ -18,8 +14,8 @@ before_install:
1814

1915
jobs:
2016
include:
21-
- &linting
22-
stage: lint
17+
- &unittests
18+
stage: unit tests
2319
language: python
2420
python: 3.7
2521
before_script:
@@ -36,66 +32,29 @@ jobs:
3632
- pip3.7 install pyOpenSSL
3733
- pip3.7 install coveralls
3834
script:
39-
# 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
4036
- tox -- tests/ --ignore tests/test_pythonpackage.py
41-
# (we ignore test_pythonpackage.py since these run way too long!!
42-
# test_pythonpackage_basic.py will still be run.)
4337
name: "Tox Pep8"
4438
env: TOXENV=pep8
45-
- <<: *linting
46-
name: "Tox Python 2"
47-
env: TOXENV=py27
48-
- <<: *linting
39+
- <<: *unittests
4940
name: "Tox Python 3 & Coverage"
5041
env: TOXENV=py3
5142
after_success:
5243
- coveralls
53-
54-
- &testing
55-
stage: test
56-
before_script:
57-
# build docker image
58-
- docker build --tag=p4a --file Dockerfile.py3 .
59-
# Run a background process to make sure that travis will not kill our tests in
60-
# case that the travis log doesn't produce any output for more than 10 minutes
61-
- while sleep 540; do echo "==== Still running (travis, don't kill me) ===="; done &
62-
script:
63-
- >
64-
docker run
65-
-e CI
66-
-e TRAVIS_JOB_ID
67-
-e TRAVIS_BRANCH
68-
-e ANDROID_SDK_HOME="/home/user/.android/android-sdk"
69-
-e ANDROID_NDK_HOME="/home/user/.android/android-ndk"
70-
p4a /bin/sh -c "$COMMAND"
71-
after_script:
72-
# kill the background process started before run docker
73-
- kill %1
74-
name: Python 3 arm64-v8a
75-
# overrides requirements to skip `peewee` pure python module, see:
76-
# https://github.com/kivy/python-for-android/issues/1263#issuecomment-390421054
77-
env:
78-
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
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-with-numpy/arm64-v8a
49+
- <<: *testapps
8050
name: Python 3 armeabi-v7a
8151
os: osx
8252
osx_image: xcode11 # since xcode1.3, python3 is the default interpreter
8353
before_script:
8454
# installs java 1.8, android's SDK/NDK and p4a
8555
- make -f ci/makefiles/osx.mk
8656
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
87-
# Run a background process (like we do with linux tests)
88-
- while sleep 540; do echo "==== Still running (travis, don't kill me) ===="; done &
89-
script:
90-
- >
91-
cd testapps && python3 setup_testapp_python3_sqlite_openssl.py apk
92-
--sdk-dir $HOME/.android/android-sdk
93-
--ndk-dir $HOME/.android/android-ndk
94-
--requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools
95-
--arch=armeabi-v7a
96-
- <<: *testing
97-
name: Python 2 armeabi-v7a (with numpy)
98-
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'
99-
- <<: *testing
57+
script: make testapps/armeabi-v7a PYTHON_WITH_VERSION=python3
58+
- <<: *testapps
10059
name: Rebuild updated recipes
101-
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 & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)