Skip to content

Commit 633b88a

Browse files
committed
add testing
1 parent be3f3c3 commit 633b88a

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.travis.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
language: cpp
2+
dist: precise
3+
env:
4+
matrix:
5+
fast_finish: true
6+
include:
7+
- os: linux
8+
addons:
9+
apt:
10+
sources:
11+
- ubuntu-toolchain-r-test
12+
packages:
13+
- g++-6
14+
env: COMPILER=gcc GCC=6
15+
env:
16+
global:
17+
- MINCONDA_VERSION="latest"
18+
- MINCONDA_LINUX="Linux-x86_64"
19+
- MINCONDA_OSX="MacOSX-x86_64"
20+
before_install:
21+
- |
22+
# Configure build variables
23+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
24+
if [[ "$COMPILER" == "gcc" ]]; then
25+
export CXX=g++-$GCC CC=gcc-$GCC;
26+
fi
27+
if [[ "$COMPILER" == "clang" ]]; then
28+
export CXX=clang++-$CLANG CC=clang-$CLANG;
29+
fi
30+
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
31+
export CXX=clang++ CC=clang;
32+
fi
33+
install:
34+
# Define the version of miniconda to download
35+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
36+
MINCONDA_OS=$MINCONDA_LINUX;
37+
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
38+
MINCONDA_OS=$MINCONDA_OSX;
39+
fi
40+
- wget "http://repo.continuum.io/miniconda/Miniconda3-$MINCONDA_VERSION-$MINCONDA_OS.sh" -O miniconda.sh;
41+
- bash miniconda.sh -b -p $HOME/miniconda
42+
- export PATH="$HOME/miniconda/bin:$PATH"
43+
- hash -r
44+
- conda config --set always_yes yes --set changeps1 no
45+
- conda update -q conda
46+
- conda install gtest cmake -c conda-forge
47+
- conda install xtensor==0.13.0 -c conda-forge
48+
- conda install zlib openimageio -c QuantStack -c conda-forge
49+
# Testing
50+
- mkdir build
51+
- cd build
52+
- cmake -DBUILD_TESTS=ON -DDOWNLOAD_GTEST=ON ..;
53+
- make -j2 test_xtensor_io
54+
- cd test
55+
script:
56+
- ./test_xtensor_io

0 commit comments

Comments
 (0)