Skip to content

Commit

Permalink
Parameterize builds with OPENSSL_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoemorais-aws committed Mar 18, 2022
1 parent 17d084e commit a1659ad
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
19 changes: 10 additions & 9 deletions .github/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
compileMode="default"
stMode=false
sharedLibs=false
OPENSSL_VERSION=1.1.1n

# Check if first argument is compile mode
compileModeArgument=$(echo "$1" | cut -c3-14)
Expand Down Expand Up @@ -111,10 +112,10 @@ case $compileMode in
apt-get install --assume-yes g++-arm-linux-gnueabihf
apt-get install --assume-yes gcc-arm-linux-gnueabihf
apt-get install --assume-yes gdb-multiarch
wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz
tar -xvzf openssl-1.1.1n.tar.gz
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
tar -xvzf openssl-${OPENSSL_VERSION}.tar.gz
export INSTALL_DIR=/usr/lib/arm-linux-gnueabihf
cd openssl-1.1.1n
cd openssl-${OPENSSL_VERSION}
./Configure linux-generic32 shared \
--prefix=$INSTALL_DIR --openssldir=$INSTALL_DIR/openssl \
--cross-compile-prefix=/usr/bin/arm-linux-gnueabihf-
Expand Down Expand Up @@ -149,10 +150,10 @@ case $compileMode in
apt-get install --assume-yes g++-mips-linux-gnu
apt-get install --assume-yes gcc-mips-linux-gnu
apt-get install --assume-yes gdb-multiarch
wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz
tar -xvzf openssl-1.1.1n.tar.gz
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
tar -xvzf openssl-${OPENSSL_VERSION}.tar.gz
export INSTALL_DIR=/usr/lib/mips-linux-gnu
cd openssl-1.1.1n
cd openssl-${OPENSSL_VERSION}
./Configure linux-mips32 shared \
--prefix=$INSTALL_DIR --openssldir=$INSTALL_DIR/openssl \
--cross-compile-prefix=/usr/bin/mips-linux-gnu-
Expand Down Expand Up @@ -182,10 +183,10 @@ case $compileMode in
apt-get install --assume-yes g++-aarch64-linux-gnu
apt-get install --assume-yes gcc-aarch64-linux-gnu
apt-get install --assume-yes gdb-multiarch
wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz
tar -xvzf openssl-1.1.1n.tar.gz
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
tar -xvzf openssl-${OPENSSL_VERSION}.tar.gz
export INSTALL_DIR=/usr/lib/aarch64-linux-gnu
cd openssl-1.1.1n
cd openssl-${OPENSSL_VERSION}
./Configure linux-aarch64 shared \
--prefix=$INSTALL_DIR --openssldir=$INSTALL_DIR/openssl \
--cross-compile-prefix=/usr/bin/aarch64-linux-gnu-
Expand Down
8 changes: 5 additions & 3 deletions .github/docker-images/amazonlinux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM amazonlinux:latest

ARG OPENSSL_VERSION=1.1.1n

###############################################################################
# Install prereqs
###############################################################################
Expand Down Expand Up @@ -31,9 +33,9 @@ RUN curl -sSL https://github.com/Kitware/CMake/releases/download/v3.10.0/cmake-3
# Install OpenSSL 1.1.1
###############################################################################
WORKDIR /tmp
RUN wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz \
&& tar -zxvf openssl-1.1.1n.tar.gz \
&& cd openssl-1.1.1n \
RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
&& tar -zxvf openssl-${OPENSSL_VERSION}.tar.gz \
&& cd openssl-${OPENSSL_VERSION} \
&& ./config \
&& make \
&& sudo make install
Expand Down
8 changes: 5 additions & 3 deletions .github/docker-images/ubi8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM registry.redhat.io/ubi8/ubi

ARG OPENSSL_VERSION=1.1.1n

###############################################################################
# Install prereqs
###############################################################################
Expand Down Expand Up @@ -32,9 +34,9 @@ RUN curl -sSL https://github.com/Kitware/CMake/releases/download/v3.10.0/cmake-3
# Install OpenSSL 1.1.1
###############################################################################
WORKDIR /tmp
RUN wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz \
&& tar -zxvf openssl-1.1.1n.tar.gz \
&& cd openssl-1.1.1n \
RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
&& tar -zxvf openssl-${OPENSSL_VERSION}.tar.gz \
&& cd openssl-${OPENSSL_VERSION} \
&& ./config \
&& make \
&& sudo make install
Expand Down
8 changes: 5 additions & 3 deletions .github/docker-images/ubuntu-16-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM ubuntu:16.04

ENV DEBIAN_FRONTEND=noninteractive

ARG OPENSSL_VERSION=1.1.1n

###############################################################################
# Install prereqs
###############################################################################
Expand All @@ -17,9 +19,9 @@ RUN apt-get update -qq \
# Install OpenSSL 1.1.1
###############################################################################
WORKDIR /tmp
RUN wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz \
&& tar -zxvf openssl-1.1.1n.tar.gz \
&& cd openssl-1.1.1n \
RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
&& tar -zxvf openssl-${OPENSSL_VERSION}.tar.gz \
&& cd openssl-${OPENSSL_VERSION} \
&& ./config \
&& make \
&& make install \
Expand Down

0 comments on commit a1659ad

Please sign in to comment.