Skip to content

Commit a99e977

Browse files
committed
Have OpenSSL v1.0.2 available to unit tests
1 parent 8928846 commit a99e977

3 files changed

Lines changed: 24 additions & 8 deletions

File tree

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ language: java
55
env:
66
global:
77
- PROTOBUF_VERSION=3.0.0-beta-1
8+
- OPENSSL_VERSION=1.0.2d
89
- LDFLAGS=-L/tmp/protobuf-${PROTOBUF_VERSION}/lib
910
- CXXFLAGS=-I/tmp/protobuf-${PROTOBUF_VERSION}/include
10-
- LD_LIBRARY_PATH=/tmp/protobuf-${PROTOBUF_VERSION}/lib
11+
- LD_LIBRARY_PATH=/tmp/protobuf-${PROTOBUF_VERSION}/lib:/tmp/openssl-${OPENSSL_VERSION}/lib
1112

1213
before_install:
1314
- buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf-${PROTOBUF_VERSION}
@@ -32,6 +33,7 @@ notifications:
3233
cache:
3334
directories:
3435
- /tmp/protobuf-${PROTOBUF_VERSION}
36+
- /tmp/openssl-${OPENSSL_VERSION}
3537
- $HOME/.m2/repository/io/netty
3638
- $HOME/.gradle/caches/modules-2
3739
- $HOME/.gradle/wrapper

buildscripts/make_dependencies.bat

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
REM installer http://www.7-zip.org/a/7z1507-x64.exe
22
REM 7za is in http://www.7-zip.org/a/7z1507-extra.7z
33

4-
REM Prerequisite: 7za.exe in current directory or PATH
4+
REM Prerequisite:
5+
REM 7za.exe in current directory or PATH
6+
REM Install http://slproweb.com/download/Win64OpenSSL_Light-1_0_2d.exe
57

68
set PROTOBUF_VER=3.0.0-beta-1
79
set CMAKE_NAME=cmake-3.3.2-win32-x86
810

911
if not exist "protobuf-%PROTOBUF_VER%\cmake\Release\" (
1012
call :installProto
1113
)
12-
set PROTOCDIR=%cd%\protobuf-%PROTOBUF_VER%\cmake\Release\
14+
15+
echo Compile gRPC-Java with something like:
16+
echo -PtargetArch=x86_32 -PvcProtobufLibs=%cd%\protobuf-%PROTOBUF_VER%\cmake\build\Release -PvcProtobufInclude=%cd%\protobuf-%PROTOBUF_VER%\cmake\build\include
1317
goto :eof
1418

1519

@@ -38,6 +42,3 @@ powershell -command "& { iwr https://cmake.org/files/v3.3/%CMAKE_NAME%.zip -OutF
3842
7za X cmake.zip
3943
del cmake.zip
4044
goto :eof
41-
42-
REM Compile gRPC-Java with something like:
43-
REM -PtargetArch=x86_32 -PvcProtobufLibs=%cd%\protobuf-3.0.0-beta-1\cmake\build\Release -PvcProtobufInclude=%cd%\protobuf-3.0.0-beta-1\cmake\build\include

buildscripts/make_dependencies.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
#
3-
# Build protoc & netty
3+
# Build protoc & openssl
44
set -ev
55

66
DOWNLOAD_DIR=/tmp/source
@@ -17,7 +17,20 @@ else
1717
./autogen.sh
1818
# install here so we don't need sudo
1919
./configure --prefix=${INSTALL_DIR}
20-
make -j2
20+
make -j$(nproc)
21+
make install
22+
popd
23+
fi
24+
25+
INSTALL_DIR=/tmp/openssl-${OPENSSL_VERSION}
26+
27+
if [ -f ${INSTALL_DIR}/lib/libssl.so ]; then
28+
echo "Not building openssl. Already built"
29+
else
30+
wget -O - https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz | tar xz -C $DOWNLOAD_DIR
31+
pushd $DOWNLOAD_DIR/openssl-${OPENSSL_VERSION}
32+
./Configure linux-x86_64 shared no-ssl2 no-comp --prefix=${INSTALL_DIR}
33+
make -j$(nproc)
2134
make install
2235
popd
2336
fi

0 commit comments

Comments
 (0)