forked from kronosnet/ci-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci-setup-src
executable file
·69 lines (64 loc) · 2.03 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
68
69
#!/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
case "${NODE_NAME}" in
debian*|ubuntu*)
localbuild=""
usesitepackages=--system-site-packages
;;
rhel8*|centos-8*|opensuse-15*)
localbuild=--enable-local-build
usesitepackages=--system-site-packages
;;
*)
localbuild=--enable-local-build
usesitepackages=""
;;
esac
rm -rf .venv
python3 -m venv $usesitepackages .venv
. .venv/bin/activate
export PATH="$(pwd)/.venv"/bin/:$PATH
python3 -m pip install setuptools-scm setuptools-rust wheel
python3 -m pip install concurrencytest cryptography lxml pycurl six pyparsing
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