This repository has been archived by the owner on Apr 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
132 lines (118 loc) · 4.39 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
sudo: false
language: cpp
cache: ccache
matrix:
include:
# Ubuntu, g++-8
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libboost1.55-all-dev
- g++-8
- gcc-8
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- LABEL="linux"
- _DEPLOYABLE="true"
- STRIP="strip"
# Ubuntu, g++-7
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libboost1.55-all-dev
- g++-7
- gcc-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- LABEL="linux-g++-7"
- STRIP="strip"
# Ubuntu, clang-6
- os: linux
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
packages:
- libboost1.55-all-dev
- clang-6.0
- libstdc++-7-dev
env:
- MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
- LABEL="linux-clang-6"
- STRIP="strip"
## OSX, g++-8
- os: osx
osx_image: xcode10
compiler: gcc
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- LABEL="osx-g++-8"
- STRIP="strip"
# OSX, g++-7
- os: osx
osx_image: xcode10
compiler: gcc
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- LABEL="osx-g++-7"
- STRIP="strip"
# OSX, clang
- os: osx
osx_image: xcode10
compiler: clang
env:
- MATRIX_EVAL="CC=/usr/local/opt/llvm/bin/clang && CXX=/usr/local/opt/llvm/bin/clang++"
- LABEL="osx"
- _DEPLOYABLE="true"
- STRIP="strip"
# Arm (aarch64) cross compile
- os: linux
env:
- MATRIX_EVAL="CC=aarch64-linux-gnu-gcc && CXX=aarch64-linux-gnu-g++"
- LABEL="aarch64"
- _DEPLOYABLE="true"
- STRIP="aarch64-linux-gnu-strip"
before_install:
- eval $MATRIX_EVAL
install:
# Need to uninstall oclint to get newer gcc installed https://github.com/travis-ci/travis-ci/issues/8826
- if [[ "${LABEL:0:3}" == "osx" ]]; then brew cask uninstall --force oclint || true ; fi
# Need a newer version of llvm to link against to get std::filesystem / std::experimental::filesystem
- if [[ "${LABEL:0:3}" == "osx" ]]; then brew install llvm || brew upgrade llvm ; fi
# Neeed to install ccache
- if [[ "${LABEL:0:3}" == "osx" ]]; then brew install ccache ; fi
- if [[ "${LABEL:0:3}" == "osx" ]]; then export PATH="/usr/local/opt/ccache/libexec:$PATH" ; fi
# Install the correct gcc version
- if [[ "$LABEL" == "osx-g++-8" ]]; then brew install gcc@8 ; fi
- if [[ "$LABEL" == "osx-g++-7" ]]; then brew install gcc@7 ; fi
- if [[ "$LABEL" == "aarch64" ]]; then export BASEDIR=`pwd` ; fi
- if [[ "$LABEL" == "aarch64" ]]; then cd $HOME ; fi
- if [[ "$LABEL" == "aarch64" ]]; then wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu.tar.xz ; fi
- if [[ "$LABEL" == "aarch64" ]]; then wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz ; fi
- if [[ "$LABEL" == "aarch64" ]]; then mkdir toolchain && cd toolchain ; fi
- if [[ "$LABEL" == "aarch64" ]]; then tar xfv ../gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu.tar.xz >/dev/null ; fi
- if [[ "$LABEL" == "aarch64" ]]; then cd gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu ; fi
- if [[ "$LABEL" == "aarch64" ]]; then tar zxvf ../../boost_1_55_0.tar.gz >/dev/null ; fi
- if [[ "$LABEL" == "aarch64" ]]; then cd boost_1_55_0 ; fi
- if [[ "$LABEL" == "aarch64" ]]; then ./bootstrap.sh ; fi
- if [[ "$LABEL" == "aarch64" ]]; then curl https://raw.githubusercontent.com/plenteum/plenteum/master/scripts/fix_boost_aarch64.sh | sh ; fi
- if [[ "$LABEL" == "aarch64" ]]; then ./b2 toolset=gcc-aarch64 --with-system --with-filesystem --with-thread --with-date_time --with-chrono --with-regex --with-serialization --with-program_options >/dev/null; fi
- if [[ "$LABEL" == "aarch64" ]]; then export CUSTOM_BOOST_ROOT="-DBOOST_ROOT=`pwd`" ; fi
- if [[ "$LABEL" == "aarch64" ]]; then export CUSTOM_TOOLCHAIN="-DCMAKE_TOOLCHAIN_FILE=../scripts/cross-aarch64.cmake" ; fi
- if [[ "$LABEL" == "aarch64" ]]; then export STRIP="$HOME/toolchain/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu/bin/aarch64-linux-gnu-strip" ; fi
- if [[ "$LABEL" == "aarch64" ]]; then cd $BASEDIR ; fi
script:
- eval $MATRIX_EVAL
- mkdir build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DSTATIC=true .. ${CUSTOM_TOOLCHAIN} ${CUSTOM_BOOST_ROOT}
- make -j2