-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
50 lines (42 loc) · 1.31 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
language: cpp
os:
- linux
- osx
compiler:
- gcc
- clang
before_install:
# For the GCC update below...
- if [ $TRAVIS_OS_NAME == linux ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update -qq; fi
install:
# Update the GCC version if on Linux (needed for C++11 support)
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install -qq g++-5 && export CXX="g++-5" && export CC="gcc-5"; fi
# Update/install Bison and Flex on Linux:
- if [ $TRAVIS_OS_NAME == linux ]; then
sudo apt-get update -qq;
sudo apt-get install -qq flex;
wget --no-check-certificate http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz;
mkdir $HOME/bison;
tar -xf bison-3.0.4.tar.gz;
cd bison-3.0.4;
./configure --prefix=$HOME/bison;
make -j 4 install;
cd $PWD/..;
export PATH=$HOME/bison/bin:$PATH;
fi
# Bison/Flex update on OSX using Brew:
# (need the unlink hack for OSX, see: http://stackoverflow.com/a/29053701/1198654)
- if [ $TRAVIS_OS_NAME == osx ]; then
brew update;
brew install flex;
brew install bison;
brew unlink flex;
brew unlink bison;
brew link flex --force;
brew link bison --force;
fi
script:
- $CXX --version
- flex -V
- bison -V
- make