summaryrefslogtreecommitdiff
path: root/docker/compile-and-check/base/compile_and_check.sh
blob: 59e16cbf36e2a9b7e6fd87c891db2b9bf11d0255 (plain)
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
#!/bin/bash

set -eu
set -x

start_debug_shell () {
  if test "${SANDCASTLE_DEBUG_SHELL:-no}" = yes; then
    bash --init-file <(echo \
      "echo 'Taler build failed, press enter to get the debug shell..'; read || exit $?"
    ) -i
  fi
}
trap start_debug_shell ERR

source ~/util.sh

echo -n Exporting the tags environment..
set -a
. tags.sh
set +a
echo DONE
echo Exported tags:
{ env | grep TAG_; } || echo NONE

export LD_LIBRARY_PATH=$HOME/local

num_processors=$(getconf _NPROCESSORS_ONLN)
JFLAG="-j$num_processors"
PREFIX=$HOME/local

git clone --depth=1 git://git.gnunet.org/libmicrohttpd --branch ${TAG_LIBMHD:-master}
git clone --depth=1 git://git.gnunet.org/gnunet --branch ${TAG_GNUNET:-master}
git clone --depth=1 git://git.taler.net/exchange --branch ${TAG_EXCHANGE:-master}
git clone --depth=1 git://git.taler.net/merchant --branch ${TAG_MERCHANT:-master}
git clone --depth=1 git://git.taler.net/libeufin --branch ${TAG_LIBEUFIN:-master}
git clone --depth=1 git://git.taler.net/taler-merchant-demos --branch ${TAG_MERCHANT_DEMOS:-master}
git clone --depth=1 git://git.taler.net/wallet-core --branch ${TAG_WALLET:-master}
git clone --depth=1 git://git.taler.net/sync --branch ${TAG_SYNC:-master}

cd ~/libmicrohttpd
./bootstrap
./configure --disable-doc --prefix=$PREFIX
make $JFLAG install

cd ~/gnunet
./bootstrap
./configure --enable-logging=verbose --disable-documentation --prefix=$PREFIX --with-microhttpd=$PREFIX
make $JFLAG install

cd ~/exchange
./bootstrap
./configure CFLAGS="-ggdb -O0" --enable-logging=verbose --disable-doc --prefix=$PREFIX --with-gnunet=$PREFIX
make $JFLAG install

cd ~/merchant
./bootstrap
./configure CFLAGS="-ggdb -O0" --enable-logging=verbose --disable-doc --prefix=$PREFIX --with-gnunet=$PREFIX --with-exchange=$PREFIX
make $JFLAG install

cd ~/libeufin
./bootstrap
./configure --prefix=$PREFIX
make install

cd ~/taler-merchant-demos
./bootstrap
./configure --destination=local
make install

cd ~/sync
./bootstrap
./configure CFLAGS="-ggdb -O0" --enable-logging=verbose --disable-doc --prefix=$PREFIX --with-gnunet=$PREFIX --with-exchange=$PREFIX
make $JFLAG install

cd ~/wallet-core
./bootstrap
cd ~/wallet-core/packages/taler-wallet-cli
./configure --prefix=$HOME/local
make install
cd ~/wallet-core/packages/taler-harness
./configure --prefix=$HOME/local
make install

db_start
createdb talercheck

cd ~/exchange
make check

cd ~/merchant
make check

cd ~
taler-harness run-integrationtests