travis: Add Botan build

We build Botan directly from the master branch until 2.8.0 is released.
This commit is contained in:
Tobias Brunner 2018-08-08 11:35:46 +02:00
parent c064a5288e
commit 9ee23d5efa
2 changed files with 30 additions and 0 deletions

View File

@ -38,6 +38,8 @@ env:
- TEST=default
- TEST=default MONOLITHIC=yes
- TEST=default LEAK_DETECTIVE=yes
- TEST=botan
- TEST=botan LEAK_DETECTIVE=yes
- TEST=openssl
- TEST=openssl LEAK_DETECTIVE=yes
- TEST=gcrypt

View File

@ -26,6 +26,32 @@ gcrypt)
CONFIG="--disable-defaults --enable-pki --enable-gcrypt --enable-pkcs1"
DEPS="libgcrypt11-dev"
;;
botan)
CONFIG="--disable-defaults --enable-pki --enable-botan"
# we can't use the old package that comes with Ubuntu so we build from
# the current master until 2.8.0 is released and then probably switch to
# that unless we need newer features (at least 2.7.0 plus PKCS#1 patch is
# currently required)
DEPS=""
if test "$1" = "deps"; then
# if the leak detective is enabled we have to disable threading support
# (used for std::async) as that causes invalid frees somehow, the
# locking allocator causes a static leak via the first function that
# references it (e.g. crypter or hasher), so we disable that too
if test "$LEAK_DETECTIVE" = "yes"; then
BOTAN_CONFIG="--without-os-features=threads
--disable-modules=locking_allocator"
fi
# disable some larger modules we don't need for the tests
BOTAN_CONFIG="$BOTAN_CONFIG --disable-modules=pkcs11,tls,x509,xmss"
git clone --depth 1 https://github.com/randombit/botan.git botan &&
cd botan &&
python ./configure.py $BOTAN_CONFIG &&
make -j4 libs >/dev/null &&
sudo make install >/dev/null &&
sudo ldconfig || exit $?
fi
;;
printf-builtin)
CONFIG="--with-printf-hooks=builtin"
;;
@ -43,6 +69,8 @@ all|coverage|sonarcloud)
CONFIG="$CONFIG --disable-nm"
# not enabled on the build server
CONFIG="$CONFIG --disable-af-alg"
# separate test case with external dependency
CONFIG="$CONFIG --disable-botan"
if test "$TEST" != "coverage"; then
CONFIG="$CONFIG --disable-coverage"
else