1- sudo : required
2-
3- dist : xenial # needed for more recent python 3 and python3-venv
4-
51language : generic
62
73stages :
8- - lint
9- - test
4+ - unit tests
5+ - build testapps
106
117services :
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-
2415jobs :
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
0 commit comments