Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
14 changes: 12 additions & 2 deletions ci/edmtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
supported_combinations = {
'2.7': {'pyqt', 'pyside', 'wx', 'null'},
'3.5': {'pyqt', 'null'},
'3.6': {'pyqt', 'null'},
}

dependencies = {
Expand All @@ -86,7 +87,9 @@
"pandas",
"pygments",
"pyparsing",
"cython"
"cython",
# Needed to install enable from source
"swig",
}

extra_dependencies = {
Expand Down Expand Up @@ -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)
Expand All @@ -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 "
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions ci/install-edm-osx.sh
Original file line number Diff line number Diff line change
@@ -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