Skip to content

Instantly share code, notes, and snippets.

@congdanhqx-zz
Created April 28, 2016 03:41
Show Gist options
  • Save congdanhqx-zz/2a59f0e4bd0fd66cf61d068f57013add to your computer and use it in GitHub Desktop.
Save congdanhqx-zz/2a59f0e4bd0fd66cf61d068f57013add to your computer and use it in GitHub Desktop.
Building Modern C++ with Travis CI
language: generic
cache:
apt: true
matrix:
include:
- os: linux
env: COMPILER_NAME=gcc CXX=g++-5 CC=gcc-5
addons:
apt:
packages:
- g++-5
sources: &sources
- ubuntu-toolchain-r-test
- llvm-toolchain-precise
- llvm-toolchain-precise-3.8
- llvm-toolchain-precise-3.7
- llvm-toolchain-precise-3.6
# - os: linux
# env: COMPILER_NAME=gcc CXX=g++-4.9 CC=gcc-4.9
# addons:
# apt:
# packages:
# - g++-4.9
# sources: *sources
- os: linux
env: COMPILER_NAME=clang CXX=clang++-3.8 CC=clang-3.8
addons:
apt:
packages:
- clang-3.8
- g++-5
sources: *sources
- os: linux
env: COMPILER_NAME=clang CXX=clang++-3.7 CC=clang-3.7
addons:
apt:
packages:
- clang-3.7
- g++-5
sources: *sources
- os: linux
env: COMPILER_NAME=clang CXX=clang++-3.6 CC=clang-3.6
addons:
apt:
packages:
- clang-3.6
- g++-5
sources: *sources
- os: linux
env: COMPILER_NAME=clang++ CXX=clang++-3.8 CC=clang-3.8 LIBCXXURL=http://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_380/final/ LIBCXXABIURL=http://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_380/final/
addons:
apt:
packages:
- clang-3.8
sources: *sources
- os: linux
env: COMPILER_NAME=clang++ CXX=clang++-3.7 CC=clang-3.7 LIBCXXURL=http://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_371/final/ LIBCXXABIURL=http://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_371/final/
addons:
apt:
packages:
- clang-3.7
sources: *sources
- os: linux
env: COMPILER_NAME=clang++ CXX=clang++-3.6 CC=clang-3.6 LIBCXXURL=http://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_362/final/ LIBCXXABIURL=http://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_362/final/
addons:
apt:
packages:
- clang-3.6
sources: *sources
install:
- if [ "$COMPILER_NAME" == "clang++" ]; then export CXXFLAGS="-stdlib=libc++" && export LDFLAGS="-stdlib=libc++"; fi
- if [ "$COMPILER_NAME" == "clang++" ]; then svn co --quiet $LIBCXXURL libcxx && pushd libcxx/lib && bash buildit && sudo cp ./libc++.so.1.0 /usr/lib/; fi
- if [ "$COMPILER_NAME" == "clang++" ]; then sudo mkdir /usr/include/c++/v1 && pushd .. && sudo cp -r include/* /usr/include/c++/v1/; fi
- if [ "$COMPILER_NAME" == "clang++" ]; then pushd /usr/lib && sudo ln -sf libc++.so.1.0 libc++.so; fi
- if [ "$COMPILER_NAME" == "clang++" ]; then sudo ln -sf libc++.so.1.0 libc++.so.1 && popd && popd && popd; fi
- if [ "$COMPILER_NAME" == "clang++" ]; then svn co --quiet $LIBCXXABIURL libcxxabi && pushd libcxxabi/lib && bash buildit && sudo cp ./libc++abi.so.1.0 /usr/lib/; fi
- if [ "$COMPILER_NAME" == "clang++" ]; then pushd .. && sudo cp -r include/* /usr/include/c++/v1; fi
- if [ "$COMPILER_NAME" == "clang++" ]; then pushd /usr/lib && sudo ln -sf libc++abi.so.1.0 libc++abi.so; fi
- if [ "$COMPILER_NAME" == "clang++" ]; then sudo ln -sf libc++abi.so.1.0 libc++abi.so.1 && popd && popd && popd; fi
script:
- make
- make test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment