forked from codership/galera
-
Notifications
You must be signed in to change notification settings - Fork 33
/
.travis.yml
45 lines (39 loc) · 1021 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
43
44
45
dist: bionic
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:
- check
- cmake
- debhelper
- libasio-dev
- libboost-dev
- libboost-program-options-dev
- libssl-dev
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