forked from stellar/stellar-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis-build.sh
executable file
·47 lines (39 loc) · 1.02 KB
/
travis-build.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
#!/bin/bash
# This is just a slightly more-debuggable script that does our travis build
set -ev
echo $TRAVIS_PULL_REQUEST
# Short-circuit transient 'auto-initialization' builds
git fetch origin master
MASTER=$(git describe --always FETCH_HEAD)
HEAD=$(git describe --always HEAD)
echo $MASTER
echo $HEAD
if [ $HEAD == $MASTER ]
then
echo "HEAD SHA1 equals master; probably just establishing merge, exiting build early"
exit 0
fi
# Try to ensure we're using the real g++ and clang++ versions we want
mkdir bin
ln -s `which gcc-4.9` bin/gcc
ln -s `which g++-4.9` bin/g++
ln -s `which clang-3.5` bin/clang
ln -s `which clang++-3.5` bin/clang++
export PATH=`pwd`/bin:$PATH
hash -r
clang -v
g++ -v
llvm-symbolizer --version || true
# Create postgres databases
psql -c "create user test with password 'test';" -U postgres
psql -c "create database test;" -U postgres
for i in $(seq 0 8)
do
psql -c "create database test$i;" -U postgres
done
ccache -s
./autogen.sh
./configure --enable-asan --enable-ccache
make
ccache -s
make check