forked from noxxi/p5-io-socket-ssl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (110 loc) · 3.78 KB
/
.travis.yml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
os: linux
dist: trusty
sudo: false
language: perl
perl:
- "5.34"
- "5.32"
- "5.30"
- "5.28"
- "5.26"
- "5.24"
- "5.22"
- "5.20"
- "5.18"
- "5.16"
- "5.14"
- "5.12"
- "5.10"
- "5.8"
env:
global:
- JOBS=3
- PERL_MM_USE_DEFAULT=1
- AUTOMATED_TESTING=1
- RELEASE_TESTING=0
- NET_SSLEAY=1.90
matrix:
- OPENSSL_VERSION=openssl-1.1.1k
- OPENSSL_VERSION=libressl-3.3.3
- OPENSSL_VERSION=openssl-1.1.1d
- OPENSSL_VERSION=openssl-1.1.0l
- OPENSSL_VERSION=openssl-1.0.2u
- OPENSSL_VERSION=openssl-1.0.1u
- OPENSSL_VERSION=openssl-1.0.0s
- OPENSSL_VERSION=openssl-0.9.8zh
- OPENSSL_VERSION=libressl-3.2.2
- OPENSSL_VERSION=libressl-3.1.2
- OPENSSL_VERSION=libressl-3.0.2
- OPENSSL_VERSION=libressl-2.9.2
matrix:
exclude:
- perl: "5.8"
env: OPENSSL_VERSION=openssl-1.1.0l
- perl: "5.8"
env: OPENSSL_VERSION=openssl-1.1.1d
cache:
directories:
- openssl_version_cache
- net_ssleay_cache
before_install:
- mkdir -p openssl_version_cache/src
- mkdir -p openssl_version_cache/build
- mkdir -p net_ssleay_cache/src
- mkdir -p net_ssleay_cache/build
install:
- |
if [ ! -f openssl_version_cache/src/$OPENSSL_VERSION.tar.gz ]; then
echo $OPENSSL_VERSION | grep -q libressl
if [ $? -eq 0 ]; then
url=https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/$OPENSSL_VERSION.tar.gz
else
url=https://www.openssl.org/source/$OPENSSL_VERSION.tar.gz
fi
wget -k -P openssl_version_cache/src $url
fi
- if [ ! -f net_ssleay_cache/src/$NET_SSLEAY.zip ]; then wget -k -P net_ssleay_cache/src https://github.com/noxxi/p5-net-ssleay/archive/$NET_SSLEAY.zip; fi
before_script:
- |
if [ ! -d openssl_version_cache/build/$OPENSSL_VERSION ]; then
if [ ! -d openssl_version_cache/src/$OPENSSL_VERSION ]; then
cd openssl_version_cache/src
tar xzf $OPENSSL_VERSION.tar.gz || exit 1
cd ../..
fi
if [ ! -d openssl_version_cache/src/$OPENSSL_VERSION ]; then
echo "ERROR Dir openssl_version_cache/src/$OPENSSL_VERSION does not exist" && exit 1
fi
cd openssl_version_cache/src/$OPENSSL_VERSION
echo $OPENSSL_VERSION | grep -q libressl
if [ $? -eq 0 ]; then
./configure --prefix=$PWD/../../build/$OPENSSL_VERSION
make install > build.log 2>&1 || (cat build.log && exit 1)
elif [ "$OPENSSL_VERSION" = "openssl-1.0.0s" ] || [ "$OPENSSL_VERSION" = "openssl-0.9.8zh" ]; then
./Configure linux-x86_64 --prefix=$PWD/../../build/$OPENSSL_VERSION --openssldir=$PWD/../../build/$OPENSSL_VERSION/ssl shared -Wa,--noexecstack > build.log 2>&1 || (cat build.log && exit 1)
make > build.log 2>&1 || (cat build.log && exit 1)
make install_sw > build.log 2>&1 || (cat build.log && exit 1)
make install_ssldirs > build.log 2>&1 || (cat build.log && exit 1)
else
./Configure linux-x86_64 --prefix=$PWD/../../build/$OPENSSL_VERSION --openssldir=$PWD/../../build/$OPENSSL_VERSION/ssl enable-shared -Wa,--noexecstack > build.log 2>&1 || (cat build.log && exit 1)
make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1)
make install_sw > build.log 2>&1 || (cat build.log && exit 1)
make install_ssldirs > build.log 2>&1 || (cat build.log && exit 1)
fi
cd ../../..
fi
- |
DIR=$PWD
cd net_ssleay_cache/build/
rm -rf p5-net-ssleay-$NET_SSLEAY
unzip ../src/$NET_SSLEAY.zip
cd p5-net-ssleay-$NET_SSLEAY
OPENSSL_PREFIX=$DIR/openssl_version_cache/build/$OPENSSL_VERSION LD_LIBRARY_PATH=$DIR/openssl_version_cache/build/$OPENSSL_VERSION/lib perl Makefile.PL
make test
cd $DIR
script:
- |
export PERL5OPT=-Mblib=$DIR/net_ssleay_cache/build/p5-net-ssleay-$NET_SSLEAY/blib
perl Makefile.PL
make
make TEST_VERBOSE=1 test