Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9cfbc0
commit 7e63a96
Showing
4 changed files
with
140 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
language: c | ||
language: cpp | ||
|
||
os: | ||
- linux | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
|
||
# Exit if fail | ||
set -e | ||
|
||
if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then | ||
|
||
# Repository for clang | ||
sudo add-apt-repository -y ppa:h-rayflood/llvm | ||
sudo add-apt-repository -y ppa:h-rayflood/llvm-upper | ||
sudo add-apt-repository -y ppa:h-rayflood/gcc-upper | ||
|
||
# Update packages | ||
sudo apt-get update -qq | ||
|
||
# Install clang | ||
sudo apt-get -qq --allow-unauthenticated install clang-${CLANG_VERSION} clang++-${CLANG_VERSION} | ||
|
||
# Install libc++ for clang | ||
CWD=$(pwd) | ||
export CXXFLAGS="-std=c++0x -stdlib=libc++" | ||
svn co --quiet http://llvm.org/svn/llvm-project/libcxx/trunk libcxx | ||
cd libcxx/lib && bash buildit | ||
sudo cp ./libc++.so.1.0 /usr/lib/ | ||
sudo mkdir /usr/include/c++/v1 | ||
cd .. && sudo cp -r include/* /usr/include/c++/v1/ | ||
cd /usr/lib && sudo ln -sf libc++.so.1.0 libc++.so | ||
sudo ln -sf libc++.so.1.0 libc++.so.1 && cd $CWD | ||
|
||
# Update alternatives for clang | ||
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} 50 | ||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CLANG_VERSION} 50 | ||
|
||
elif [ "$TRAVIS_OS_NAME" = osx ]; then | ||
|
||
# Make sure xcode is setup | ||
xcode-select --install | ||
|
||
# Update brew | ||
brew update || echo "suppress failures in order to ignore warnings" | ||
brew doctor || echo "suppress failures in order to ignore warnings" | ||
brew list clang || echo "suppress failures in order to ignore warnings" | ||
sudo brew uninstall --force clang || "suppress failures in order to ignore warnings" | ||
brew search clang || echo "suppress failures in order to ignore warnings" | ||
|
||
# Install clang | ||
brew install clang || echo "suppress failures in order to ignore warnings" | ||
brew upgrade clang || echo "suppress failures in order to ignore warnings" | ||
fi | ||
|
||
# Export clang | ||
export CXX="clang++-${CLANG_VERSION}" | ||
export CC="clang-${CLANG_VERSION}" | ||
|
||
# Debug information | ||
clang --version | ||
clang++ --version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
|
||
# Exit if fail | ||
set -e | ||
|
||
if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then | ||
|
||
# Download cmake | ||
wget http://www.cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.sh | ||
chmod a+x cmake-3.2.3-Linux-x86_64.sh | ||
|
||
# Install | ||
sudo ./cmake-3.2.3-Linux-x86_64.sh --skip-license --prefix=/usr/local | ||
export PATH=/usr/local/bin:$PATH | ||
|
||
elif [ "$TRAVIS_OS_NAME" = osx ]; then | ||
|
||
# Make sure xcode is setup | ||
xcode-select --install | ||
|
||
# Update brew | ||
brew update || echo "suppress failures in order to ignore warnings" | ||
brew doctor || echo "suppress failures in order to ignore warnings" | ||
brew list cmake || echo "suppress failures in order to ignore warnings" | ||
sudo brew uninstall --force cmake || "suppress failures in order to ignore warnings" | ||
brew search cmake || echo "suppress failures in order to ignore warnings" | ||
|
||
# Install cmake | ||
brew install cmake || echo "suppress failures in order to ignore warnings" | ||
brew upgrade cmake || echo "suppress failures in order to ignore warnings" | ||
fi | ||
|
||
# Debug information | ||
cmake --version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
# Exit if fail | ||
set -e | ||
|
||
if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then | ||
|
||
# Repository for gcc | ||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | ||
|
||
# Update packages | ||
sudo apt-get update -qq | ||
|
||
# Install gcc | ||
sudo apt-get -qq --allow-unauthenticated install gcc-${LIBSTDC_VERSION} g++-${LIBSTDC_VERSION} | ||
|
||
# Update alternatives for gcc | ||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${LIBSTDC_VERSION} 50 | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${LIBSTDC_VERSION} 50 | ||
|
||
elif [ "$TRAVIS_OS_NAME" = osx ]; then | ||
|
||
# Make sure xcode is setup | ||
xcode-select --install | ||
|
||
# Update brew | ||
brew update || echo "suppress failures in order to ignore warnings" | ||
brew doctor || echo "suppress failures in order to ignore warnings" | ||
brew list gcc || echo "suppress failures in order to ignore warnings" | ||
sudo brew uninstall --force gcc || "suppress failures in order to ignore warnings" | ||
brew search gcc || echo "suppress failures in order to ignore warnings" | ||
|
||
# Install gcc | ||
brew install homebrew/versions/gcc${LIBSTDC_VERSION} || echo "suppress failures in order to ignore warnings" | ||
brew upgrade homebrew/versions/gcc${LIBSTDC_VERSION} || echo "suppress failures in order to ignore warnings" | ||
|
||
fi | ||
|
||
# Export gcc | ||
export CXX="g++-${LIBSTDC_VERSION}" | ||
export CC="gcc-${LIBSTDC_VERSION}" | ||
|
||
# Debug information | ||
gcc --version | ||
g++ --version | ||
|