Skip to content

Commit 3dcfbd3

Browse files
committed
update build to use separate script for osx and linux.
1 parent e844338 commit 3dcfbd3

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

.travis.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@ compiler:
1414
- gcc
1515

1616
before_install:
17-
# We need this line to have g++4.8 available in apt
18-
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
19-
- sudo apt-get update -qq
17+
- tools/travis_before_install.sh
2018

2119
install:
22-
- sudo apt-get install -qq gcc-4.8 g++-4.8
23-
# We want to compile with g++ 4.8 when rather than the default g++
24-
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
20+
- tool/travis_install.sh
2521
- tools/make_deps.sh
2622

2723
script:

tools/travis_before_install.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
if [[ $(uname -s) = "Darwin" ]]; then
4+
fi
5+
6+
if [[ $(uname -s) = "Linux" ]]; then
7+
# We need this to have g++4.8 available in apt
8+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
9+
sudo apt-get update -qq
10+
fi
11+

tools/travis_install.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
if [[ $(uname -s) = "Darwin" ]]; then
4+
fi
5+
6+
if [[ $(uname -s) = "Linux" ]]; then
7+
sudo apt-get install -qq gcc-4.8 g++-4.8
8+
# We want to compile with g++ 4.8 when rather than the default g++
9+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
10+
fi
11+

0 commit comments

Comments
 (0)