4
mirror of git://git.acid.vegas/unrealircd.git synced 2024-11-30 20:06:37 +00:00
unrealircd/extras/build-tests/nix/build

85 lines
2.1 KiB
Plaintext
Raw Normal View History

2020-03-29 09:16:53 +00:00
#!/bin/bash
# Exit on any failure:
set -e
# Verbose:
set -x
if [ "$1" != "" ]; then
BUILDCONFIG="$*"
fi
if [[ "$OSTYPE" == "freebsd"* ]]; then
export MAKE="gmake -j4"
else
export MAKE="make -j4"
fi
2022-01-15 05:16:34 +00:00
export CPPFLAGS="-DFAKELAG_CONFIGURABLE -DNOREMOVETMP -DRAWCMDLOGGING"
2020-03-29 09:16:53 +00:00
# !! skipped for now: extras/build-tests/nix/select-config $BUILDCONFIG !!
# !! temporary use this:
cp extras/build-tests/nix/configs/default ./config.settings
# Debian 8 workaround:
if lsb_release -av 2>&1|egrep 'Debian.*jessie'; then
echo "Disabling ASan due to false positives on deb8"
echo 'EXTRAPARA="--enable-werror --disable-asan"' >>config.settings
fi
2022-01-15 05:16:34 +00:00
if uname -s|grep -i freebsd; then
echo "Disabling ASan on FreeBSD due to 100% CPU loop in OpenSSL initialization routine"
echo 'EXTRAPARA="--enable-werror --disable-asan"' >>config.settings
fi
# If SSLDIR is set the environment, this overrides config.settings
# Used for example in the openssl3 build tests.
if [ "$SSLDIR" != "" ]; then
echo 'SSLDIR="'"$SSLDIR"'"' >>config.settings
fi
2020-03-29 09:16:53 +00:00
# Read config.settings, this makes a couple of variables available to us.
. ./config.settings
if [ "$SSLDIR" != "" ]; then
# In case we build local openssl/libressl
export LD_LIBRARY_PATH="$SSLDIR/lib"
fi
./Config -quick || (tail -n 5000 config.log; exit 1)
$MAKE
2022-01-15 05:16:34 +00:00
yes ''|$MAKE pem
$MAKE || exit 1
$MAKE install || exit 1
2023-05-05 22:12:01 +00:00
./unrealircd module install third/dumpcmds || exit 1
2020-03-29 09:16:53 +00:00
set +x
echo ""
echo "***********************************************"
echo "UnrealIRCd build & install successful."
echo "***********************************************"
if [[ "$OSTYPE" == "darwin"* ]]; then
otool -L ~/unrealircd/bin/unrealircd
else
ldd ~/unrealircd/bin/unrealircd
fi
if [ "$BUILDCONFIG" = "local-curl" ]; then
# We broke the system significantly earlier that build tests
# won't work (eg: 'git' is uninstallable). Don't bother
# running the tests. I don't expect a 'local-curl' specific
# bug anyway.
exit 0
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
# 'rake' doesn't work. have to figure that one out..
echo "Not running test on OS X for now"
exit 0
fi
echo ""
echo ""
#echo "Now running UnrealIRCd test framework..."
#set -x
#extras/build-tests/nix/run-tests