Skip to content

Commit 39c86fe

Browse files
committed
activating c++ test in CI
1 parent 9b7c4c9 commit 39c86fe

File tree

3 files changed

+32
-18
lines changed

3 files changed

+32
-18
lines changed

.appveyor.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ install:
2222
- conda config --set always_yes yes --set changeps1 no
2323
- conda update -q conda
2424
- conda info -a
25-
- conda install pytest -c conda-forge
26-
- conda install xtensor==0.8.0 pytest numpy pybind11==2.1.0 -c conda-forge
27-
- xcopy /S %APPVEYOR_BUILD_FOLDER%\include %MINICONDA%\include
25+
- conda install gtest cmake -c conda-forge
26+
- conda install xtensor==0.8.1 pytest numpy pybind11==2.1.0 -c conda-forge
27+
- cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%MINICONDA%\\Library -DBUILD_TESTS=ON .
28+
- nmake test_xtensor_python
29+
- nmake install
2830

2931
build_script:
3032
- py.test -s
33+
- cd test
34+
- .\test_xtensor_python

.travis.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@ env:
5252
- MINCONDA_VERSION="latest"
5353
- MINCONDA_LINUX="Linux-x86_64"
5454
- MINCONDA_OSX="MacOSX-x86_64"
55+
before_install:
56+
- |
57+
# Configure build variables
58+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
59+
if [[ "$COMPILER" == "gcc" ]]; then
60+
export CXX=g++-$GCC CC=gcc-$GCC;
61+
fi
62+
if [[ "$COMPILER" == "clang" ]]; then
63+
export CXX=clang++-$CLANG CC=clang-$CLANG;
64+
fi
65+
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
66+
export CXX=clang++ CC=clang PYTHONHOME=$HOME/miniconda;
67+
fi
68+
5569
install:
5670
# Define the version of miniconda to download
5771
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
@@ -67,21 +81,17 @@ install:
6781
- conda update -q conda
6882
# Useful for debugging any issues with conda
6983
- conda info -a
70-
- conda install xtensor==0.8.0 pytest numpy pybind11==2.1.0 -c conda-forge
71-
- cp -r $TRAVIS_BUILD_DIR/include/* $HOME/miniconda/include/
84+
- conda install xtensor==0.8.1 pytest numpy pybind11==2.1.0 -c conda-forge
85+
- cd test
86+
- conda env create -f ./test-environment.yml
87+
- source activate test-xtensor-python
88+
- cd ..
89+
- cmake -DBUILD_TESTS=ON -D CMAKE_INSTALL_PREFIX=$HOME/miniconda .
90+
- make -j2 test_xtensor_python
91+
- make install
7292

7393
script:
74-
- |
75-
# Configure build variables
76-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
77-
if [[ "$COMPILER" == "gcc" ]]; then
78-
export CXX=g++-$GCC CC=gcc-$GCC;
79-
fi
80-
if [[ "$COMPILER" == "clang" ]]; then
81-
export CXX=clang++-$CLANG CC=clang-$CLANG;
82-
fi
83-
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
84-
export CXX=clang++ CC=clang;
85-
fi
8694
- py.test -s
95+
- cd test
96+
- ./test_xtensor_python
8797

test/test-environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: test-xtensor
1+
name: test-xtensor-python
22
channels:
33
- conda-forge
44
- defaults

0 commit comments

Comments
 (0)