Skip to content

Commit 38d000f

Browse files
committed
CI: perform test build with Anaconda compiler
1 parent 5d6ecd2 commit 38d000f

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.travis.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ before_install:
4444
- MYMCREPO=https://repo.continuum.io/miniconda
4545
- case ${TRAVIS_OS_NAME} in
4646
linux)
47-
MYMCBUNDLE=Miniconda3-latest-Linux-x86_64.sh ;;
47+
MYMCBUNDLE=Miniconda3-latest-Linux-x86_64.sh;
48+
MYCXXCOMPILER=gxx_linux-64
49+
;;
4850
osx)
49-
MYMCBUNDLE=Miniconda3-latest-MacOSX-x86_64.sh ;;
51+
MYMCBUNDLE=Miniconda3-latest-MacOSX-x86_64.sh;
52+
MYCXXCOMPILER=clangxx_osx-64
53+
;;
5054
*)
5155
echo "Unsupported operating system." >&2;
5256
exit 2 ;;
@@ -61,7 +65,7 @@ before_install:
6165
- $NOMC || source ~/mc/bin/activate root
6266
- $NOMC || conda update --yes conda
6367
- $NOMC || conda install --yes conda-build jinja2
64-
- $NOMC || conda create --name=testenv --yes python=${MYPYTHON_VERSION}
68+
- $NOMC || conda create --name=testenv --yes $MYCXXCOMPILER
6569
- $NOMC || conda config --add channels diffpy
6670

6771
- $NOAPT || test "${TRAVIS_OS_NAME}" = "linux" || exit $?
@@ -107,17 +111,16 @@ install:
107111
exit 1;
108112
fi
109113

110-
- $NOMC || export LIBRARY_PATH="${MYLIB}"
111-
- $NOMC || export CPATH="${MYINCLUDE}"
112-
- $NOMC || MYLINKFLAGS="-Wl,-rpath,${MYLIB}"
114+
- $NOMC || MYCXXFLAGS="-I${MYINCLUDE} ${CXXFLAGS}"
115+
- $NOMC || MYLINKFLAGS="-L${MYLIB} ${LDFLAGS} -Wl,-rpath,${MYLIB}"
113116

114117

115118
before_script:
116119
- cd "${TRAVIS_BUILD_DIR}/examples"
117120

118121

119122
script:
120-
- $CXX -o testlib testlib.cpp -lObjCryst $MYLINKFLAGS
123+
- $CXX -o testlib $MYCXXFLAGS testlib.cpp -lObjCryst $MYLINKFLAGS
121124
- ./testlib
122125

123126

0 commit comments

Comments
 (0)