forked from codership/galera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (37 loc) · 976 Bytes
/
.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
language: cpp
sudo: false
cache:
- apt
- ccache
compiler:
- gcc
- clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
# https://github.com/travis-ci/travis-ci/issues/3668
# for alternatives in container builds
packages:
- libboost-program-options-dev
- libssl-dev
- check
- scons
- gcc-5
- g++-5
script:
- if [ ${CC} != "clang" ]; then
MEM=$(head -n 1 /proc/meminfo); RAM=(${MEM// / });
MAX_JOBS=$(( ${RAM[1]} / 393216 )); echo Max jobs\:\ $MAX_JOBS;
CORES=$(grep -c ^processor /proc/cpuinfo);
[ $CORES -lt $MAX_JOBS ] && MAX_JOBS=$CORES; echo Real jobs\:\ $MAX_JOBS;
${CC} --version; ${CXX} --version;
./scripts/build.sh -j $MAX_JOBS;
export CC=`which gcc-5`;
export CXX=`which g++-5`;
${CC} --version; ${CXX} --version;
./scripts/build.sh -j $MAX_JOBS;
else
${CC} --version ; ${CXX} --version;
./scripts/build.sh;
fi