From 86415e3abe76e383e631ada3e86a398acebd2963 Mon Sep 17 00:00:00 2001 From: matham Date: Tue, 14 May 2019 17:21:08 -0400 Subject: [PATCH] Re-enable building osx wheels and app (#6305) * Don't build wheels on PR [build wheel osx] [build app osx] * Try sleeping for 10 secs to fix log truncation [build wheel osx] [build app osx] https://github.com/travis-ci/travis-ci/issues/6018 * Try sleeping to let the full log display [build wheel osx] [build app osx] * Missing colon [build wheel osx] [build app osx] * smpeg2 has been replaced with mpg123 [build wheel osx] * Get accurate kivy version [build app osx] * Typo [build wheel osx] [build app osx] * Re-enable building osx wheels and app * PyInstaller doesn't exist in python2 anymore [build wheel osx] * need newer setuptools [build wheel osx] * Use only one python2 version. --- .travis.yml | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0ee8c1e39..8f1ff1484 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,14 +52,14 @@ matrix: - docker - language: generic os: osx - env: PYVERS="3.5.4 3.6.5 3.7.0 2.7.10 2.7.15" PY=3 RUN=wheels USE_PANGOFT2=0 + env: PYVERS="3.5.4 3.6.5 3.7.0 2.7.15" PY=3 RUN=wheels USE_PANGOFT2=0 name: "OSX - wheel generation" - language: generic env: RUN=app PY=2 USE_PANGOFT2=0 os: osx name: "OSX - Python 2 Kivy.app generation" - language: generic - env: PYVERS="3.5.4 3.6.5 3.7.0" PY=3 RUN=app USE_PANGOFT2=0 + env: PY=3 RUN=app USE_PANGOFT2=0 os: osx name: "OSX - Python 3 Kivy.app generation" @@ -112,7 +112,7 @@ install: 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}" == "app" ] && ([ "${TRAVIS_EVENT_TYPE}" == "crony" ] || [ "${TRAVIS_TAG}" != "" ] || [[ "$TRAVIS_COMMIT_MESSAGE" =~ "[build app osx]" ]]); then + if [ "${RUN}" == "app" ] && ([ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS_TAG}" != "" ] || [[ "$TRAVIS_COMMIT_MESSAGE" =~ "[build app osx]" ]]); then curl -O -L http://www.sveinbjorn.org/files/software/platypus/platypus4.8.zip; unzip platypus4.8.zip; mkdir -p /usr/local/bin; @@ -166,7 +166,7 @@ script: 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 + if [ "${RUN}" == "wheels" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ] && ([ "${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); @@ -199,7 +199,7 @@ script: make; env KIVY_NO_ARGS=1 pytest -v kivy/tests; fi; - elif [ "${RUN}" == "app" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ] && ([ "${TRAVIS_EVENT_TYPE}" == "crony" ] || [ "${TRAVIS_TAG}" != "" ] || [[ "$TRAVIS_COMMIT_MESSAGE" =~ "[build app osx]" ]]); then + elif [ "${RUN}" == "app" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ] && ([ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS_TAG}" != "" ] || [[ "$TRAVIS_COMMIT_MESSAGE" =~ "[build app osx]" ]]); then 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; @@ -211,14 +211,14 @@ script: if [ "${PY}" == "3" ]; then yes | ./create-osx-bundle.sh python3 master > output.txt; - app_ver=$(Kivy.app/Contents/Resources/script -c 'import kivy; print(kivy.__version__)'); + app_ver=$(KIVY_NO_CONSOLELOG=1 Kivy.app/Contents/Resources/script -c 'import kivy; print(kivy.__version__)'); mv Kivy.app Kivy3.app; ./create-osx-dmg.sh Kivy3.app; mkdir app; mv Kivy3.dmg app/"Kivy-$app_ver-$git_tag-$app_date"-python3.6.5.dmg; else ./create-osx-bundle.sh python2 master > output.txt; - app_ver=$(Kivy.app/Contents/Resources/script -c 'import kivy; print(kivy.__version__)'); + app_ver=$(KIVY_NO_CONSOLELOG=1 Kivy.app/Contents/Resources/script -c 'import kivy; print(kivy.__version__)'); mv Kivy.app Kivy2.app; ./create-osx-dmg.sh Kivy2.app; mkdir app; @@ -226,7 +226,7 @@ script: fi; yes | rsync -avh -e "ssh -p 2458" --include="*/" --include="*.dmg" --exclude="*" "./app/" "root@$SERVER_IP:/web/downloads/ci/osx/app/"; popd; - elif [ "${TRAVIS_EVENT_TYPE}" == "crony" ] || [ "${TRAVIS_TAG}" != "" ] || [[ "$TRAVIS_COMMIT_MESSAGE" =~ "[build wheel]" ]] || [[ "$TRAVIS_COMMIT_MESSAGE" =~ "[build wheel osx]" ]]; then + elif [ "${RUN}" == "wheels" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ] && ([ "${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 @@ -240,8 +240,8 @@ script: python$pyver_short get-pip.py --user; python$pyver_short -m pip install git+http://github.com/tito/osxrelocator --user; - python$pyver_short -m pip install --upgrade --user pip; - python$pyver_short -m pip install --upgrade --user cython pytest wheel pillow mock docutils PyInstaller; + python$pyver_short -m pip install --upgrade --user pip setuptools wheel; + python$pyver_short -m pip install --upgrade --user cython pytest 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>output.txt; @@ -250,26 +250,26 @@ script: /Library/Frameworks/Python.framework/Versions/$pyver_short/bin/delocate-wheel dist/*.whl; zip_dir="$(basename dist/*.whl .whl)"; unzip dist/*.whl -d dist/$zip_dir; - rm dist/$zip_dir/kivy/.dylibs/libg* - rm dist/$zip_dir/kivy/.dylibs/GStreamer + echo "sleeping to let the full log display"; + sleep 10; + rm dist/$zip_dir/kivy/.dylibs/libg*; + rm dist/$zip_dir/kivy/.dylibs/GStreamer; cp /Library/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/FLAC.framework/Versions/A/FLAC dist/$zip_dir/kivy/.dylibs/; cp /Library/Frameworks/SDL2_ttf.framework/Versions/A/Frameworks/FreeType.framework/Versions/A/freetype dist/$zip_dir/kivy/.dylibs/; cp /Library/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/Ogg.framework/Versions/A/Ogg dist/$zip_dir/kivy/.dylibs/; cp /Library/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/Vorbis.framework/Versions/A/Vorbis dist/$zip_dir/kivy/.dylibs/; cp /Library/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/modplug.framework/Versions/A/modplug dist/$zip_dir/kivy/.dylibs/; - cp /Library/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/smpeg2.framework/Versions/A/smpeg2 dist/$zip_dir/kivy/.dylibs/; - cp /Library/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/smpeg2.framework/Versions/A/smpeg2 dist/$zip_dir/kivy/.dylibs/; + cp /Library/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/mpg123.framework/Versions/A/mpg123 dist/$zip_dir/kivy/.dylibs/; python$pyver_short -m osxrelocator.__init__ dist/$zip_dir/kivy/.dylibs @rpath/SDL2.framework/Versions/A/SDL2 @loader_path/SDL2>output.txt; python$pyver_short -m osxrelocator.__init__ dist/$zip_dir/kivy/.dylibs @rpath/FLAC.framework/Versions/A/FLAC @loader_path/FLAC>output.txt; python$pyver_short -m osxrelocator.__init__ dist/$zip_dir/kivy/.dylibs @rpath/modplug.framework/Versions/A/modplug @loader_path/modplug>output.txt; - python$pyver_short -m osxrelocator.__init__ dist/$zip_dir/kivy/.dylibs @rpath/smpeg2.framework/Versions/A/smpeg2 @loader_path/smpeg2>output.txt; + python$pyver_short -m osxrelocator.__init__ dist/$zip_dir/kivy/.dylibs @rpath/mpg123.framework/Versions/A/mpg123 @loader_path/mpg123>output.txt; python$pyver_short -m osxrelocator.__init__ dist/$zip_dir/kivy/.dylibs @rpath/FreeType.framework/Versions/A/FreeType @loader_path/FreeType>output.txt; python$pyver_short -m osxrelocator.__init__ dist/$zip_dir/kivy/.dylibs @rpath/webp.framework/Versions/A/webp @loader_path/webp>output.txt; python$pyver_short -m osxrelocator.__init__ dist/$zip_dir/kivy/.dylibs @rpath/Vorbis.framework/Versions/A/Vorbis @loader_path/Vorbis>output.txt; python$pyver_short -m osxrelocator.__init__ dist/$zip_dir/kivy/.dylibs @rpath/../../../../SDL2.framework/Versions/A/SDL2 @loader_path/SDL2>output.txt; python$pyver_short -m osxrelocator.__init__ dist/$zip_dir/kivy/.dylibs @rpath/Ogg.framework/Versions/A/Ogg @loader_path/Ogg>output.txt; - python$pyver_short -m osxrelocator.__init__ dist/$zip_dir/kivy/.dylibs @rpath/Ogg.framework/Versions/A/Ogg @loader_path/Ogg>output.txt; - rm dit/$zip_dir.whl; + rm dist/$zip_dir.whl; pushd dist; python$pyver_short -c "from delocate import delocating; delocating.dir2zip('$zip_dir', '$zip_dir.whl')"; rm -rf $zip_dir; @@ -312,3 +312,7 @@ after_success: fi; done; fi; + +after_failure: + - sleep 10; + - echo == End of test log ==