Add Hera to buildpacks.

This commit is contained in:
Alexander Arlt 2020-07-22 06:03:54 -05:00
parent 4a478f0fb2
commit cbe9a2d240
4 changed files with 53 additions and 4 deletions

View File

@ -22,7 +22,7 @@
# (c) 2016-2019 solidity contributors.
#------------------------------------------------------------------------------
FROM gcr.io/oss-fuzz-base/base-clang as base
LABEL version="1"
LABEL version="2"
ARG DEBIAN_FRONTEND=noninteractive
@ -96,6 +96,18 @@ RUN set -ex; \
ninja install/strip; \
rm -rf /usr/src/evmone
# HERA
RUN set -ex; \
cd /usr/src; \
git clone --branch="v0.3.0" --recurse-submodules https://github.com/ewasm/hera.git; \
cd hera; \
mkdir build; \
cd build; \
cmake -G Ninja -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="/usr" ..; \
ninja; \
ninja install/strip; \
rm -rf /usr/src/hera
FROM base
COPY --from=libraries /usr/lib /usr/lib
COPY --from=libraries /usr/bin /usr/bin

View File

@ -22,7 +22,7 @@
# (c) 2016-2019 solidity contributors.
#------------------------------------------------------------------------------
FROM buildpack-deps:bionic AS base
LABEL version="1"
LABEL version="2"
ARG DEBIAN_FRONTEND=noninteractive
@ -88,6 +88,19 @@ RUN set -ex; \
tar xzpf $TGZFILE -C /usr; \
rm -f $TGZFILE;
# HERA
ARG HERA_HASH="622663cb3bc1fa07213c6e1fe8070c5c259096e75039a46d014b2a3448b5cf44"
ARG HERA_MAJOR="0"
ARG HERA_MINOR="3"
ARG HERA_MICRO="0"
RUN set -ex; \
HERA_VERSION="$HERA_MAJOR.$HERA_MINOR.$HERA_MICRO"; \
TGZFILE="hera-$HERA_VERSION-linux-x86_64.tar.gz"; \
wget https://github.com/ewasm/hera/releases/download/v$HERA_VERSION/$TGZFILE; \
sha256sum $TGZFILE; \
tar xzpf $TGZFILE -C /usr; \
rm -f $TGZFILE;
FROM base
COPY --from=libraries /usr/lib /usr/lib
COPY --from=libraries /usr/bin /usr/bin

View File

@ -22,7 +22,7 @@
# (c) 2016-2019 solidity contributors.
#------------------------------------------------------------------------------
FROM buildpack-deps:focal AS base
LABEL version="1"
LABEL version="2"
ARG DEBIAN_FRONTEND=noninteractive
@ -57,6 +57,18 @@ RUN set -ex; \
ninja install/strip; \
rm -rf /usr/src/evmone
# HERA
RUN set -ex; \
cd /usr/src; \
git clone --branch="v0.3.0" --recurse-submodules https://github.com/ewasm/hera.git; \
cd hera; \
mkdir build; \
cd build; \
cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="/usr" ..; \
ninja; \
ninja install/strip; \
rm -rf /usr/src/hera
FROM base
COPY --from=libraries /usr/lib /usr/lib
COPY --from=libraries /usr/bin /usr/bin

View File

@ -22,7 +22,7 @@
# (c) 2016-2019 solidity contributors.
#------------------------------------------------------------------------------
FROM buildpack-deps:focal AS base
LABEL version="1"
LABEL version="2"
ARG DEBIAN_FRONTEND=noninteractive
@ -59,6 +59,18 @@ RUN set -ex; \
ninja install/strip; \
rm -rf /usr/src/evmone
# HERA
RUN set -ex; \
cd /usr/src; \
git clone --branch="v0.3.0" --recurse-submodules https://github.com/ewasm/hera.git; \
cd hera; \
mkdir build; \
cd build; \
cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="/usr" ..; \
ninja; \
ninja install/strip; \
rm -rf /usr/src/hera
FROM base
COPY --from=libraries /usr/lib /usr/lib
COPY --from=libraries /usr/bin /usr/bin