-
Notifications
You must be signed in to change notification settings - Fork 11
/
ci-setup-src
executable file
·67 lines (60 loc) · 1.81 KB
/
ci-setup-src
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
#!/bin/sh
set -e
if [ -f ./autogen.sh ]; then
echo "./autogen.sh"
./autogen.sh
fi
if [ -f ./configure ]; then
# workaround bug in pacemaker test suite
case "${project}" in
pacemaker)
echo "./configure $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH"
./configure $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH
;;
pcs)
sleeptimer=$(( $$ % 240 ))
echo "Random sleep: $sleeptimer"
sleep $sleeptimer
rm -rf .venv
python3 -m venv --system-site-packages .venv
. .venv/bin/activate
export PATH="$(pwd)/.venv"/bin/:$PATH
case "${NODE_NAME}" in
debian*|ubuntu*)
localbuild=""
;;
rhel-8*)
python3 -m pip install concurrencytest
localbuild=--enable-local-build
;;
*)
localbuild=--enable-local-build
;;
esac
echo "./configure --enable-destructive-tests --enable-parallel-tests $localbuild $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH"
./configure --enable-destructive-tests --enable-parallel-tests $localbuild $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH
;;
*)
installpath=/srv/${project}/origin/${target}
case "${project}" in
kronosnet|corosync)
if [ -n "$RUSTBINDINGS" ] && [ "$RUSTBINDINGS" = yes ]; then
extraopts="--enable-rust-bindings"
fi
;;
sbd)
installpath=${installpath}-pacemaker-${pacemakerver}/
;;
booth)
installpath=${installpath}-pacemaker-${pacemakerver}/
extraopts="--with-ocfdir=$installpath/lib/ocf"
;;
*)
installpath=${installpath}/
;;
esac
echo "./configure --prefix=$installpath --exec-prefix=$installpath $extraopts $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH"
./configure --prefix=$installpath --exec-prefix=$installpath $extraopts $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH
;;
esac
fi