kivy/.travis.yml

229 lines
9.5 KiB
YAML
Raw Normal View History

env:
global:
- KIVY_USE_SETUPTOOLS=1
- KIVY_SPLIT_EXAMPLES=1
- SERVER_IP=159.203.106.198
matrix:
fast_finish: true
include:
- language: python
python: 2.7
env: RUN=unit
os: linux
dist: trusty
- language: python
python: 3.5
2016-02-27 13:55:54 +00:00
env: RUN=unit COVERALLS=true
os: linux
dist: trusty
- language: python
python: 3.5
env: RUN=pep8
os: linux
dist: trusty
- language: python
python: 3.5
env: RUN=docs
os: linux
dist: trusty
- language: python
sudo: required
env: RUN=wheels DOCKER_IMAGE=markrwilliams/manylinux2:x86_64
services:
- docker
- language: generic
2016-02-27 13:55:54 +00:00
env: RUN=unit PY=2
os: osx
2015-12-28 11:57:03 +00:00
- language: generic
2016-02-27 13:55:54 +00:00
env: RUN=unit PY=3
2015-12-28 11:57:03 +00:00
os: osx
- language: generic
os: osx
env: PYVERS="3.5.4 3.6.5" PY=3 RUN=wheels
2012-10-18 15:47:49 +00:00
before_install:
# https://github.com/travis-ci/travis-ci/issues/6307
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
brew install gpg2;
brew uninstall gpg;
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3;
rvm get stable;
fi
2012-10-18 15:47:49 +00:00
install:
- if [ "${TRAVIS_OS_NAME}" == "linux" ] && [ "${RUN}" != "wheels" ]; then
2016-12-12 04:07:32 +00:00
if [ "${RUN}" != "pep8" ]; then
yes | sudo add-apt-repository ppa:zoogie/sdl2-snapshots;
yes | sudo add-apt-repository ppa:gstreamer-developers/ppa;
sudo apt-get update;
sudo apt-get -y install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev;
sudo apt-get -y install libgstreamer1.0-dev gstreamer1.0-alsa gstreamer1.0-plugins-base;
sudo apt-get -y install python-dev libsmpeg-dev libswscale-dev libavformat-dev libavcodec-dev libjpeg-dev libtiff4-dev libX11-dev libmtdev-dev;
sudo apt-get -y install python-setuptools build-essential libgl1-mesa-dev libgles2-mesa-dev;
sudo apt-get -y install xvfb pulseaudio;
2017-05-15 10:31:53 +00:00
pip install --upgrade cython pillow nose coveralls docutils;
2016-12-12 04:07:32 +00:00
fi;
if [ "${RUN}" == "docs" ]; then
pip install --upgrade sphinxcontrib-blockdiag sphinxcontrib-seqdiag sphinxcontrib-actdiag sphinxcontrib-nwdiag;
fi;
fi;
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
2016-12-15 08:34:22 +00:00
curl -O -L https://github.com/aria2/aria2/releases/download/release-1.29.0/aria2-1.29.0-osx-darwin.dmg;
hdiutil attach aria2-1.29.0-osx-darwin.dmg;
sudo installer -package "/Volumes/aria2 1.29.0 Intel/aria2.pkg" -target /;
curl -O -L https://www.libsdl.org/release/SDL2-2.0.5.dmg;
2016-01-06 01:48:03 +00:00
curl -O -L https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.dmg;
curl -O -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.dmg;
curl -O -L https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.dmg;
/usr/local/aria2/bin/aria2c -x 10 https://gstreamer.freedesktop.org/data/pkg/osx/1.10.2/gstreamer-1.0-1.10.2-x86_64.pkg;
/usr/local/aria2/bin/aria2c -x 10 https://gstreamer.freedesktop.org/data/pkg/osx/1.10.2/gstreamer-1.0-devel-1.10.2-x86_64.pkg;
2016-12-15 08:19:47 +00:00
hdiutil attach SDL2-2.0.5.dmg;
sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/;
2016-01-09 21:56:58 +00:00
hdiutil attach SDL2_image-2.0.1.dmg;
sudo cp -a /Volumes/SDL2_image/SDL2_image.framework /Library/Frameworks/;
hdiutil attach SDL2_ttf-2.0.14.dmg;
sudo cp -a /Volumes/SDL2_ttf/SDL2_ttf.framework /Library/Frameworks/;
2016-01-09 21:56:58 +00:00
hdiutil attach SDL2_mixer-2.0.1.dmg;
sudo cp -a /Volumes/SDL2_mixer/SDL2_mixer.framework /Library/Frameworks/;
sudo installer -package gstreamer-1.0-1.10.2-x86_64.pkg -target /;
sudo installer -package gstreamer-1.0-devel-1.10.2-x86_64.pkg -target /;
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py;
if [ "${RUN}" != "wheels" ]; then
if [ "${PY}" == "3" ]; then
curl -O -L https://www.python.org/ftp/python/3.5.2/python-3.5.2-macosx10.6.pkg;
sudo installer -package python-3.5.2-macosx10.6.pkg -target /;
python3 get-pip.py --user;
python3 -m pip install --upgrade --user cython pillow nose mock docutils;
else
python get-pip.py --user;
python -m pip install --upgrade --user cython pillow nose mock docutils;
fi;
fi;
fi;
before_script:
- if [ "${TRAVIS_OS_NAME}" == "linux" ] && [ "${RUN}" != "pep8" ] && [ "${RUN}" != "wheels" ]; then
export DISPLAY=:99.0;
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1280x720x24 -ac +extension GLX;
export PYTHONPATH=$PYTHONPATH:$(pwd);
fi;
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
export CC=clang;
export CXX=clang;
export FFLAGS=-ff2c;
export KIVY_GL_BACKEND=mock;
fi;
2012-10-18 15:47:49 +00:00
script:
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
2016-12-15 07:52:27 +00:00
set -ex;
2016-12-12 04:07:32 +00:00
if [ "${RUN}" == "unit" ]; then
make;
make test;
fi;
if [ "${COVERALLS}" == "true" ] && [ "${TRAVIS_BRANCH}" == "master" ]; then
travis_retry coveralls;
2016-12-12 04:07:32 +00:00
fi;
if [ "${RUN}" == "pep8" ]; then
make style;
fi;
if [ "${RUN}" == "docs" ]; then
make html;
fi;
if [ "${RUN}" == "wheels" ] && ([ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS_TAG}" != "" ] || [[ "$TRAVIS_COMMIT_MESSAGE" =~ "[build wheel]" ]] || [[ "$TRAVIS_COMMIT_MESSAGE" =~ "[build wheel linux]" ]]); then
mkdir wheelhouse;
wheel_date=$(python -c "from datetime import datetime; print(datetime.utcnow().strftime('%Y%m%d'))");
git_tag=$(git rev-parse --short HEAD);
wheel_name="dev0.$wheel_date.$git_tag";
chmod +x .ci/build-wheels-linux.sh;
docker run --rm -v `pwd`:/io $DOCKER_IMAGE "/io/.ci/build-wheels-linux.sh";
2018-06-17 19:50:20 +00:00
ls wheelhouse/;
for name in wheelhouse/*manylinux*.whl; do
new_name="${name/dev0/$wheel_name}";
2018-06-17 19:50:20 +00:00
if [ ! -f "$new_name" ]; then
cp -n $name $new_name;
fi;
done;
ls wheelhouse/;
openssl aes-256-cbc -K $encrypted_675f1a0c317c_key -iv $encrypted_675f1a0c317c_iv -in ./kivy/tools/travis/id_rsa.enc -out ~/.ssh/id_rsa -d;
chmod 600 ~/.ssh/id_rsa;
echo -e "Host $SERVER_IP\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config;
rsync -avh -e "ssh -p 2458" --include="*/" --include="*manylinux*.whl" --exclude="*" "wheelhouse/" "root@$SERVER_IP:/web/downloads/ci/linux/kivy/";
fi;
fi;
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
2016-12-15 07:52:27 +00:00
set -ex;
if [ "${RUN}" != "wheels" ]; then
if [ "${PY}" == "3" ]; then
python3 setup.py build_ext --inplace;
python3 -m nose.core kivy/tests;
else
make;
make test;
fi;
elif [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS_TAG}" != "" ] || [[ "$TRAVIS_COMMIT_MESSAGE" =~ "[build wheel]" ]] || [[ "$TRAVIS_COMMIT_MESSAGE" =~ "[build wheel osx]" ]]; then
mkdir ../wheelhouse;
for pyver in $PYVERS; do
git reset --hard;
git clean -d -x -f;
pyver_short=${pyver:0:3};
curl -O -L https://www.python.org/ftp/python/$pyver/python-$pyver-macosx10.6.pkg;
sudo installer -package python-$pyver-macosx10.6.pkg -target /;
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py;
python$pyver_short get-pip.py --user;
python$pyver_short -m pip install --upgrade --user pip;
python$pyver_short -m pip install --upgrade --user cython nose wheel pillow mock docutils;
python$pyver_short -m pip install --upgrade delocate;
USE_SDL2=1 USE_GSTREAMER=1 python$pyver_short setup.py build_ext --inplace;
USE_SDL2=1 USE_GSTREAMER=1 python$pyver_short setup.py bdist_wheel;
/Library/Frameworks/Python.framework/Versions/$pyver_short/bin/delocate-wheel dist/*.whl;
/Library/Frameworks/Python.framework/Versions/$pyver_short/bin/delocate-addplat --rm-orig -x 10_9 -x 10_10 dist/*.whl;
cp dist/*.whl ../wheelhouse/;
done;
wheel_date=$(python -c "from datetime import datetime; print(datetime.utcnow().strftime('%Y%m%d'))");
git_tag=$(git rev-parse --short HEAD);
wheel_name="dev0.$wheel_date.$git_tag";
2018-06-17 19:50:20 +00:00
ls wheelhouse/;
for name in ../wheelhouse/*.whl; do
new_name="${name/dev0/$wheel_name}";
2018-06-17 19:50:20 +00:00
if [ ! -f "$new_name" ]; then
cp -n "$name" "$new_name";
fi;
done;
ls ../wheelhouse/;
openssl aes-256-cbc -K $encrypted_675f1a0c317c_key -iv $encrypted_675f1a0c317c_iv -in ./kivy/tools/travis/id_rsa.enc -out ~/.ssh/id_rsa -d;
chmod 600 ~/.ssh/id_rsa;
echo -e "Host $SERVER_IP\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config;
rsync -avh -e "ssh -p 2458" --include="*/" --include="*.whl" --exclude="*" "../wheelhouse/" "root@$SERVER_IP:/web/downloads/ci/osx/kivy/";
fi;
fi;
2015-11-20 17:57:34 +00:00
after_success:
- if [ "${TRAVIS_OS_NAME}" == "linux" ] && [ "${RUN}" == "docs" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ] && [ "${TRAVIS_BRANCH}" == "master" ]; then
2015-11-20 17:57:34 +00:00
openssl aes-256-cbc -K $encrypted_675f1a0c317c_key -iv $encrypted_675f1a0c317c_iv -in ./kivy/tools/travis/id_rsa.enc -out ~/.ssh/id_rsa -d;
chmod 600 ~/.ssh/id_rsa;
echo -e "Host $SERVER_IP\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config;
rsync --delete --force -r -e "ssh -p 2457" ./doc/build/html/ root@$SERVER_IP:/web/docs/;
2015-11-20 17:57:34 +00:00
fi;
notifications:
2015-07-05 15:41:37 +00:00
webhooks:
urls:
2016-11-03 18:32:31 +00:00
- https://kivy.org:5000/travisevent
2015-07-05 15:41:37 +00:00
on_success: always
2015-06-23 00:14:58 +00:00
on_failure: always
2015-07-05 16:16:23 +00:00
on_start: always