forked from ilastik/volumina
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
63 lines (60 loc) · 2.4 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
language: generic
os:
- linux
- osx
env:
global:
- CONDA_ROOT=$HOME/miniconda
- ILASTIK_ROOT=$HOME/ilastik-meta
- TEST_ENV=test-env
- TEST_ENV_PREFIX=$CONDA_ROOT/envs/$TEST_ENV
cache:
directories:
- CONDA_ROOT
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export MINICONDA=https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export MINICONDA=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh; fi
- echo $CONDA_ROOT
- echo $TEST_ENV
- echo $TEST_ENV_PREFIX
- if [[ ! -d ${CONDA_ROOT} ]]; then
echo "Installing Miniconda...";
wget $MINICONDA -O miniconda.sh &&
bash miniconda.sh -b -p ${CONDA_ROOT};
else
echo "Using cached Miniconda install";
fi
- echo ". $CONDA_ROOT/etc/profile.d/conda.sh" >> ~/.bashrc
- source ~/.bashrc
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda install -c conda-forge conda-build
# Useful for debugging any issues with conda
# - conda info -a
- conda env remove -n ${TEST_ENV}
# install current master
- git clone http://github.com/ilastik/ilastik-meta ${ILASTIK_ROOT}
- cd ${ILASTIK_ROOT} && git submodule init && git submodule update --recursive && git submodule foreach "git checkout master"
- rm -rf ${ILASTIK_ROOT}/volumina
- ln -s ${TRAVIS_BUILD_DIR} ${ILASTIK_ROOT}/volumina
- conda activate base
- which python
- python --version
- >
cd ${ILASTIK_ROOT} &&
python ilastik/scripts/devenv.py
create -n ${TEST_ENV}
-c ilastik-forge conda-forge defaults
-p ilastik-dependencies-no-solvers black pytest-cov coveralls
script:
- conda activate ${TEST_ENV}
- echo `which python`
- echo `which pytest`
- cd "$TRAVIS_BUILD_DIR"
# added -s "-screen 0 1024x768x16", to make overview3d_test.py pass,
# failure was related to xvfb-run on travis running the screen per default on 8 bit.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then VOLUMINA_SHOW_3D_WIDGET=0 xvfb-run -s "-screen 0 1024x768x16" pytest --capture=no --cov=volumina; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pytest --capture=no --cov=volumina; fi
- cd $TRAVIS_BUILD_DIR && git diff --name-only --diff-filter=AM master.. | grep ".*\.py" | xargs black --check