-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
89 lines (81 loc) · 2.36 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
sudo: false
language: cpp
matrix:
include:
- os: linux
compiler:
- gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libgl1-mesa-dev
- libglu1-mesa-dev
- mesa-common-dev
- libx11-dev
- libxcursor-dev
- libxrandr-dev
- libxi-dev
- uuid-dev
- os: osx
compiler:
- clang
osx_image: xcode9
install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/Deps"
- mkdir ${DEPS_DIR}
# Download libUUID
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install ossp-uuid
fi
# Download CMake
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.tar.gz"
cd ${DEPS_DIR}
mkdir cmake
travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
else
brew install cmake || brew upgrade cmake
fi
# Download GCC 7.1
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
GCC_URL="http://data.banshee3d.com/gcc-7.1-trusty.zip"
cd ${DEPS_DIR}
mkdir gcc
cd gcc
wget --no-check-certificate --quiet - ${GCC_URL}
unzip -q gcc-7.1-trusty.zip
export PATH=${DEPS_DIR}/gcc/bin:$PATH
export LD_LIBRARY_PATH=${DEPS_DIR}/gcc/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${DEPS_DIR}/gcc/lib64:$LD_LIBRARY_PATH
fi
# Download binutils 2.28
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
BINUTILS_URL="http://data.banshee3d.com/binutils-2.28-trusty.zip"
cd ${DEPS_DIR}
mkdir binutils
cd binutils
wget --no-check-certificate --quiet - ${BINUTILS_URL}
unzip -q binutils-2.28-trusty.zip
export PATH=${DEPS_DIR}/binutils/bin:${PATH}
export LD_LIBRARY_PATH=${DEPS_DIR}/binutils/lib:$LD_LIBRARY_PATH
fi
- cd ${TRAVIS_BUILD_DIR}
script:
- INSTALL_DIR="${TRAVIS_BUILD_DIR}/Install"
- mkdir ${INSTALL_DIR}
- mkdir Build && cd Build
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
CC=gcc CXX=g++ cmake -D CMAKE_C_COMPILER=gcc -D CMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX:STRING=${INSTALL_DIR} ..
else
cmake -DCMAKE_INSTALL_PREFIX:STRING=${INSTALL_DIR} ..
fi
- make