aboutsummaryrefslogtreecommitdiffstats
path: root/.travis
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2018-05-21 19:07:53 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2018-05-21 07:07:53 -0400
commit8ac485d881884764574c60a3c54c7f94308f222e (patch)
tree54bd4362e429e4c5acc6234c32043ea383532c95 /.travis
parent488c04830c9dbc876d1a344ea51015ad6a19dd1c (diff)
downloadcryptography-8ac485d881884764574c60a3c54c7f94308f222e.tar.gz
cryptography-8ac485d881884764574c60a3c54c7f94308f222e.tar.bz2
cryptography-8ac485d881884764574c60a3c54c7f94308f222e.zip
build and test libre on travis (#4256)
* build and test libre on travis * remove libressl jenkinsfile data
Diffstat (limited to '.travis')
-rwxr-xr-x.travis/install.sh25
-rwxr-xr-x.travis/run.sh3
2 files changed, 22 insertions, 6 deletions
diff --git a/.travis/install.sh b/.travis/install.sh
index 6698b5c9..2858d25d 100755
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -3,6 +3,14 @@
set -e
set -x
+shlib_sed() {
+ # modify the shlib version to a unique one to make sure the dynamic
+ # linker doesn't load the system one.
+ sed -i "s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=100/" Makefile
+ sed -i "s/^SHLIB_MINOR=.*/SHLIB_MINOR=0.0/" Makefile
+ sed -i "s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=100.0.0/" Makefile
+}
+
# download, compile, and install if it's not already present via travis
# cache
if [ -n "${OPENSSL}" ]; then
@@ -12,15 +20,20 @@ if [ -n "${OPENSSL}" ]; then
tar zxf "openssl-${OPENSSL}.tar.gz"
cd "openssl-${OPENSSL}"
./config shared no-asm no-ssl2 no-ssl3 -fPIC --prefix="$HOME/$OPENSSL_DIR"
- # modify the shlib version to a unique one to make sure the dynamic
- # linker doesn't load the system one. This isn't required for 1.1.0 at the
- # moment since our Travis builders have a diff shlib version, but it doesn't hurt
- sed -i "s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=100/" Makefile
- sed -i "s/^SHLIB_MINOR=.*/SHLIB_MINOR=0.0/" Makefile
- sed -i "s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=100.0.0/" Makefile
+ shlib_sed
make depend
make install
fi
+elif [ -n "${LIBRESSL}" ]; then
+ LIBRESSL_DIR="ossl-1/${LIBRESSL}"
+ if [[ ! -f "$HOME/$LIBRESSL_DIR/bin/openssl" ]]; then
+ curl -O "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRESSL}.tar.gz"
+ tar zxf "libressl-${LIBRESSL}.tar.gz"
+ cd "libressl-${LIBRESSL}"
+ ./config -Wl -Wl,-Bsymbolic-functions -fPIC shared --prefix="$HOME/$LIBRESSL_DIR"
+ shlib_sed
+ make -j"$(nproc)" install
+ fi
fi
pip install virtualenv
diff --git a/.travis/run.sh b/.travis/run.sh
index ed237253..19f8c483 100755
--- a/.travis/run.sh
+++ b/.travis/run.sh
@@ -8,6 +8,9 @@ if [[ "${TOXENV}" == "pypy" ]]; then
PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi
+if [ -n "${LIBRESSL}" ]; then
+ OPENSSL=$LIBRESSL
+fi
if [ -n "${OPENSSL}" ]; then
OPENSSL_DIR="ossl-1/${OPENSSL}"