2014-10-10 06:52:33 +02:00
|
|
|
language: cpp
|
2014-10-12 04:16:54 +02:00
|
|
|
|
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
|
|
|
|
compiler:
|
2014-12-11 16:29:29 +01:00
|
|
|
- gcc
|
|
|
|
#- clang
|
2014-10-12 04:16:54 +02:00
|
|
|
|
2014-10-12 05:36:39 +02:00
|
|
|
before_install:
|
2014-10-12 06:08:07 +02:00
|
|
|
# use http://lint.travis-ci.org/ to validate changes
|
2014-10-12 06:18:17 +02:00
|
|
|
# sudo add-apt-repository -y ppa:h-rayflood/llvm;
|
|
|
|
# sudo apt-get install --allow-unauthenticated -qq clang-3.4
|
2014-10-12 06:16:15 +02:00
|
|
|
|
2014-10-12 05:36:39 +02:00
|
|
|
if [ ${TRAVIS_OS_NAME} = 'linux' ];
|
|
|
|
then
|
2014-10-12 06:41:29 +02:00
|
|
|
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
|
|
|
|
sudo apt-get update -qq;
|
|
|
|
sudo apt-get install python-software-properties;
|
|
|
|
sudo apt-get update;
|
|
|
|
sudo apt-get install gcc-4.8 g++-4.8;
|
|
|
|
sudo apt-get install cmake;
|
2014-10-12 05:36:39 +02:00
|
|
|
fi
|
2014-10-12 09:02:26 +02:00
|
|
|
|
2014-10-12 06:08:07 +02:00
|
|
|
install:
|
2014-10-12 06:41:29 +02:00
|
|
|
# gcc 4.8
|
|
|
|
- if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10; fi
|
2014-10-12 08:46:23 +02:00
|
|
|
- if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10; fi
|
2014-10-12 06:41:29 +02:00
|
|
|
|
2014-10-12 06:08:07 +02:00
|
|
|
# clang 3.4
|
|
|
|
- if [ "$CXX" == "clang++" ]; then sudo apt-get install --allow-unauthenticated -qq clang-3.4; fi
|
2014-10-12 08:58:35 +02:00
|
|
|
- if [ "$CXX" == "clang++" ]; then sudo apt-get install libc++1 libc++abi-dev || true; fi
|
2014-10-12 08:43:29 +02:00
|
|
|
|
2014-10-12 06:08:07 +02:00
|
|
|
- if [ "$CXX" == "clang++" ]; then export CXXFLAGS="-std=c++0x -stdlib=libc++"; fi
|
|
|
|
- if [ "$CXX" == "clang++" ]; then svn co --quiet http://llvm.org/svn/llvm-project/libcxx/trunk libcxx; fi
|
|
|
|
|
|
|
|
- if [ "$CXX" == "clang++" ]; then cd libcxx/lib && bash buildit; fi
|
|
|
|
- if [ "$CXX" == "clang++" ]; then sudo cp ./libc++.so.1.0 /usr/lib/; fi
|
|
|
|
- if [ "$CXX" == "clang++" ]; then sudo mkdir /usr/include/c++/v1; fi
|
|
|
|
- if [ "$CXX" == "clang++" ]; then cd .. && sudo cp -r include/* /usr/include/c++/v1/; fi
|
|
|
|
- if [ "$CXX" == "clang++" ]; then cd /usr/lib && sudo ln -sf libc++.so.1.0 libc++.so; fi
|
|
|
|
- if [ "$CXX" == "clang++" ]; then sudo ln -sf libc++.so.1.0 libc++.so.1 && cd $cwd; fi
|
2014-10-12 07:06:26 +02:00
|
|
|
# - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew update; fi
|
2014-10-12 07:09:26 +02:00
|
|
|
- echo $PWD
|
2014-10-12 07:49:22 +02:00
|
|
|
- echo $CXX
|
2014-10-12 07:17:57 +02:00
|
|
|
- if [ "$CXX" == "clang++" ]; then cd build/KjellKod/g3log || true; fi
|
|
|
|
- echo $PWD
|
2014-10-12 07:00:18 +02:00
|
|
|
|
|
|
|
script: "./scripts/buildAndRunTests.sh"
|
2014-10-12 06:41:29 +02:00
|
|
|
|