diff --git a/.travis.yml b/.travis.yml index fd4baeed4..09d77b6bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,17 +9,20 @@ addons: env: global: - - INSTALL_EDM_VERSION=1.5.2 + - INSTALL_EDM_VERSION=1.11.0 PYTHONUNBUFFERED="1" matrix: include: - - env: RUNTIME=2.7 TOOLKIT=wx - - env: RUNTIME=2.7 TOOLKIT=pyqt - - env: RUNTIME=2.7 TOOLKIT=null - - env: RUNTIME=2.7 TOOLKIT=pyside - - env: RUNTIME=3.5 TOOLKIT=pyqt - - env: RUNTIME=3.5 TOOLKIT=null + - env: RUNTIME=2.7 TOOLKITS="null pyqt pyside wx" + - os : osx + env: RUNTIME=2.7 TOOLKITS="null pyqt pyside wx" + - env: RUNTIME=3.5 TOOLKITS="null pyqt" + - os : osx + env: RUNTIME=3.5 TOOLKITS="null pyqt" + - env: RUNTIME=3.6 TOOLKITS="null pyqt" + - os : osx + env: RUNTIME=3.6 TOOLKITS="null pyqt" fast_finish: true branches: @@ -32,17 +35,23 @@ cache: - $HOME/.ccache before_install: - - ccache -s - mkdir -p "${HOME}/.cache/download" - - ci/install-edm.sh - - export PATH="${HOME}/edm/bin:/usr/lib/ccache:${PATH}" + - if [[ ${TRAVIS_OS_NAME} == "linux" ]] ; then + export DISPLAY=:99.0; + ccache -s; + sh -e /etc/init.d/xvfb start; + ./ci/install-edm-linux.sh; + export PATH="${HOME}/edm/bin:/usr/lib/ccache:${PATH}"; + else + ./ci/install-edm-osx.sh; + export PATH="${PATH}:/usr/local/bin"; + fi + - edm install -y wheel click coverage - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start install: - - edm run -- python ci/edmtool.py install --runtime=${RUNTIME} --toolkit=${TOOLKIT} + - for toolkit in ${TOOLKITS}; do edm run -- python ci/edmtool.py install --runtime=${RUNTIME} --toolkit=${toolkit} || exit; done script: - - edm run -- python ci/edmtool.py test --runtime=${RUNTIME} --toolkit=${TOOLKIT} + - for toolkit in ${TOOLKITS}; do edm run -- python ci/edmtool.py test --runtime=${RUNTIME} --toolkit=${toolkit} || exit; done after_success: - edm run -- coverage combine diff --git a/ci/edmtool.py b/ci/edmtool.py index 5f7ad6275..2d8007a6a 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -76,6 +76,7 @@ supported_combinations = { '2.7': {'pyqt', 'pyside', 'wx', 'null'}, '3.5': {'pyqt', 'null'}, + '3.6': {'pyqt', 'null'}, } dependencies = { @@ -86,7 +87,9 @@ "pandas", "pygments", "pyparsing", - "cython" + "cython", + # Needed to install enable from source + "swig", } extra_dependencies = { @@ -125,9 +128,10 @@ def install(runtime, toolkit, environment): "edm install -y -e {environment} {packages}", ("edm run -e {environment} -- pip install -r ci/requirements.txt" " --no-dependencies"), + # Note that enable dependencies will be installed implicitly using pip ("edm run -e {environment} -- " "pip install git+https://git@github.com/enthought/enable.git"), - "edm run -e {environment} -- python setup.py install", + "edm run -e {environment} -- pip install . --no-deps", ] click.echo("Creating environment '{environment}'".format(**parameters)) execute(commands, parameters) @@ -143,6 +147,12 @@ def test(runtime, toolkit, environment): """ parameters = get_parameters(runtime, toolkit, environment) environ = environment_vars.get(toolkit, {}).copy() + # FIXME : See discussion on https://github.com/enthought/chaco/pull/442 + # Note that we are overriding the existing definition of `ETS_TOOLKIT` + # in the `environment_vars` dictionary. + if sys.platform == 'darwin' and runtime == '2.7' and toolkit == 'wx': + environ['ETS_TOOLKIT'] = 'wx.image' + environ['PYTHONUNBUFFERED'] = "1" commands_nobackend = [ "edm run -e {environment} -- coverage run -m nose.core chaco -v " diff --git a/ci/install-edm.sh b/ci/install-edm-linux.sh similarity index 100% rename from ci/install-edm.sh rename to ci/install-edm-linux.sh diff --git a/ci/install-edm-osx.sh b/ci/install-edm-osx.sh new file mode 100755 index 000000000..b6d18b63e --- /dev/null +++ b/ci/install-edm-osx.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +install_edm() { + local EDM_MAJOR_MINOR="$(echo "$INSTALL_EDM_VERSION" | sed -E -e 's/([[:digit:]]+\.[[:digit:]]+)\..*/\1/')" + local EDM_PACKAGE="edm_${INSTALL_EDM_VERSION}.pkg" + local EDM_INSTALLER_PATH="${HOME}/.cache/download/${EDM_PACKAGE}" + + if [ ! -e "$EDM_INSTALLER_PATH" ]; then + curl -o "$EDM_INSTALLER_PATH" -L "https://package-data.enthought.com/edm/osx_x86_64/${EDM_MAJOR_MINOR}/${EDM_PACKAGE}" + fi + + sudo installer -pkg "$EDM_INSTALLER_PATH" -target / +} + +install_edm