From 83dc14463183562a36c50059763a938d18c997a3 Mon Sep 17 00:00:00 2001 From: Inso <insomniak.fr@gmail.com> Date: Fri, 18 Dec 2015 18:57:37 +0100 Subject: [PATCH] Try to build on travis for osx --- .travis.yml | 59 ++++--------------------------------- ci/travis/before_install.sh | 33 +++++++++++++++++++++ ci/travis/build.sh | 0 3 files changed, 38 insertions(+), 54 deletions(-) create mode 100644 ci/travis/before_install.sh create mode 100644 ci/travis/build.sh diff --git a/.travis.yml b/.travis.yml index b4202e6d..23661dc0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,73 +1,24 @@ +os: + - osx sudo: false language: python python: # We don't actually use the Travis Python, but this keeps it organized. - "3.4" -addons: - apt: - packages: - - libxcb1 - - libxcb1-dev - - libx11-xcb1 - - libx11-xcb-dev - - libxcb-keysyms1 - - libxcb-keysyms1-dev - - libxcb-image0 - - libxcb-image0-dev - - libxcb-shm0 - - libxcb-shm0-dev - - libxcb-icccm4 - - libxcb-icccm4-dev - - libxcb-sync0 - - libxcb-sync0-dev - - libxcb-xfixes0-dev - - libxrender-dev - - libxcb-shape0-dev - - libxcb-randr0-dev - - libxcb-render-util0 - - libxcb-render-util0-dev - - libxcb-glx0-dev - - libgl1-mesa-dri - - libegl1-mesa - - libpcre3-dev - before_install: # Update - pwd - # Install and configure conda - - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - - bash miniconda.sh -b -p $HOME/miniconda - - export PATH="$HOME/miniconda/bin:$PATH" - - hash -r - - conda config --set always_yes yes --set changeps1 no - - conda config --add channels inso/channel/sakia - - conda config --add channels pyzo - - conda update -q conda - # Useful for debugging any issues with conda - - conda info -a + # Install and configure pyenv + - ci/travis/before_install.sh install: - - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION cx_freeze pyqt5 libpng=1.5.13 libsodium=1.0.3 - - source activate test-environment - - ldd $HOME/miniconda/envs/test-environment/lib/qt5/plugins/platforms/*.so - - pip install coveralls + - pip install coveralls cx_Freeze - pip install -r requirements.txt - python gen_resources.py - python gen_translations.py - python setup.py build -before_script: - # screen must be 24bpp otherwise pyqt5 crashes - # see: https://github.com/pytest-dev/pytest-qt/issues/35 - - export XVFBARGS="-screen 0 1280x1024x24" - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start - - sleep 3 - script: - - export QT_QPA_PLATFORM_PLUGIN_PATH=$HOME/miniconda/envs/test-environment/lib/qt5/plugins/platforms; - - export QT_PLUGIN_PATH=$HOME/miniconda/envs/test-environment/lib/qt5/plugins - - export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb - coverage run --source=sakia.core,sakia.gui,sakia.models run_tests.py after_success: diff --git a/ci/travis/before_install.sh b/ci/travis/before_install.sh new file mode 100644 index 00000000..c9f57df3 --- /dev/null +++ b/ci/travis/before_install.sh @@ -0,0 +1,33 @@ +brew install wget +brew install libsodium +## Ensure your brew QT version is up to date. (brew install qt -> qt 4.8) +brew install qt5 +brew link --force qt5 + + +env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install $TRAVIS_PYTHON_VERSION + +pyenv shell 3.5.0 +pyenv virtualenv sakia-env + +cd $HOME + +wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.17/sip-4.17.tar.gz +tar xzf sip-4.17.tar.gz +cd sip-4.17/ +pyenv activate sakia-env +python configure.py +make && make install +pyenv rehash + +cd $HOME + +wget http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.5.1/PyQt-gpl-5.5.1.tar.gz +tar xzf PyQt-gpl-5.5.1.tar.gz +cd PyQt-gpl-5.5.1/ +pyenv activate sakia-env +python configure.py --verbose +make && make install +pyenv rehash + +cd $HOME/sakia \ No newline at end of file diff --git a/ci/travis/build.sh b/ci/travis/build.sh new file mode 100644 index 00000000..e69de29b -- GitLab