-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis-install-compiler.sh
executable file
·59 lines (51 loc) · 1.47 KB
/
.travis-install-compiler.sh
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
50
51
52
53
54
55
56
57
58
59
#!/bin/sh
## This script is just to get the compiler we're interested in
## installed on Travis. You should not be using this.
case "${TRAVIS_OS_NAME}" in
"linux")
. /etc/lsb-release
sudo apt-get update -qq
sudo apt-get install -qq python-software-properties gcc-multilib libc6-dev-i386
sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AF4F7421
for CLANG_VERSION in 3.4 3.5 3.6 3.7; do
sudo apt-add-repository -y \
"deb http://llvm.org/apt/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-${CLANG_VERSION} main"
done
sudo apt-get update -qq
case "${COMPILER}" in
"gcc-"*)
sudo apt-get install -qq "${COMPILER}"
;;
"clang-"*)
sudo apt-get install -qq "${COMPILER}"
;;
"x86_64-w64-mingw32-gcc")
sudo apt-get install -qq mingw-w64
;;
"i686-w64-mingw32-gcc")
sudo apt-get install -qq mingw-w64
;;
"tcc")
sudo apt-get install -qq tcc
;;
esac
;;
"osx")
brew update
brew install \
ragel \
glib
case "${COMPILER}" in
"gcc-4.6")
which gcc-4.6 || brew install homebrew/versions/gcc46
;;
"gcc-4.8")
which gcc-4.8 || brew install homebrew/versions/gcc48
;;
"gcc-5")
which gcc-5 || brew install homebrew/versions/gcc5
;;
esac
;;
esac