mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-06 00:00:47 -04:00
Not sure if 4 jobs is optimal, but according to the docs each build host has 1.5 virtual cores available (although "getconf _NPROCESSORS_ONLN" returns 32, which is probably the number of real cores underneath), so more jobs might not actually reduce the build time much more.
66 lines
1.5 KiB
Bash
Executable File
66 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
# Build script for Travis CI
|
|
|
|
if test -z $TRAVIS_BUILD_DIR; then
|
|
TRAVIS_BUILD_DIR=$PWD
|
|
fi
|
|
|
|
cd $TRAVIS_BUILD_DIR
|
|
|
|
TARGET=check
|
|
|
|
DEPS="libgmp-dev"
|
|
|
|
case "$TEST" in
|
|
default)
|
|
# should be the default, but lets make sure
|
|
CONFIG="--with-printf-hooks=glibc"
|
|
;;
|
|
openssl)
|
|
CONFIG="--disable-defaults --enable-tools --enable-openssl"
|
|
DEPS="libssl-dev"
|
|
;;
|
|
gcrypt)
|
|
CONFIG="--disable-defaults --enable-tools --enable-gcrypt --enable-pkcs1"
|
|
DEPS="libgcrypt11-dev"
|
|
;;
|
|
printf-builtin)
|
|
CONFIG="--with-printf-hooks=builtin"
|
|
;;
|
|
all)
|
|
CONFIG="--enable-all --disable-android-dns --disable-android-log
|
|
--disable-dumm --disable-kernel-pfroute --disable-keychain
|
|
--disable-lock-profiler --disable-maemo --disable-padlock
|
|
--disable-osx-attr --disable-tkm --disable-uci"
|
|
# not enabled on the build server
|
|
CONFIG="$CONFIG --disable-af-alg"
|
|
# TODO: enable? perhaps via coveralls.io (cpp-coveralls)?
|
|
CONFIG="$CONFIG --disable-coverage"
|
|
DEPS="$DEPS libcurl4-gnutls-dev libsoup2.4-dev libunbound-dev libldns-dev
|
|
libmysqlclient-dev libsqlite3-dev clearsilver-dev libfcgi-dev
|
|
libnm-glib-dev libnm-glib-vpn-dev libpcsclite-dev libpam0g-dev
|
|
binutils-dev libunwind7-dev"
|
|
;;
|
|
dist)
|
|
TARGET=distcheck
|
|
;;
|
|
*)
|
|
echo "$0: unknown test $TEST" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
if test "$1" = "deps"; then
|
|
sudo apt-get install -qq $DEPS
|
|
exit $?
|
|
fi
|
|
|
|
CONFIG="$CONFIG
|
|
--enable-silent-rules
|
|
--enable-test-vectors
|
|
--enable-monolithic=${MONOLITHIC-no}
|
|
--enable-leak-detective=${LEAK_DETECTIVE-no}"
|
|
|
|
echo "$ ./configure $CONFIG && make $TARGET"
|
|
./configure $CONFIG && make -j4 $TARGET
|