2019-04-26 09:57:49 +00:00
|
|
|
# vim:syntax=dockerfile
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# Dockerfile for building and testing Solidity Compiler on CI
|
|
|
|
# Target: Ubuntu 19.04 (Disco Dingo)
|
|
|
|
# URL: https://hub.docker.com/r/ethereum/solidity-buildpack-deps
|
|
|
|
#
|
|
|
|
# This file is part of solidity.
|
|
|
|
#
|
|
|
|
# solidity is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# solidity is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with solidity. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
#
|
|
|
|
# (c) 2016-2019 solidity contributors.
|
|
|
|
#------------------------------------------------------------------------------
|
2020-05-11 14:53:45 +00:00
|
|
|
FROM buildpack-deps:focal AS base
|
2021-05-10 11:25:39 +00:00
|
|
|
LABEL version="6"
|
2019-04-26 09:57:49 +00:00
|
|
|
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
RUN set -ex; \
|
2020-05-13 16:16:21 +00:00
|
|
|
dist=$(grep DISTRIB_CODENAME /etc/lsb-release | cut -d= -f2); \
|
|
|
|
echo "deb http://ppa.launchpad.net/ethereum/cpp-build-deps/ubuntu $dist main" >> /etc/apt/sources.list ; \
|
|
|
|
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1c52189c923f6ca9 ; \
|
2019-04-26 09:57:49 +00:00
|
|
|
apt-get update; \
|
|
|
|
apt-get install -qqy --no-install-recommends \
|
|
|
|
build-essential \
|
|
|
|
software-properties-common \
|
2020-05-11 14:53:45 +00:00
|
|
|
cmake ninja-build \
|
2019-10-16 00:31:41 +00:00
|
|
|
libboost-filesystem-dev libboost-test-dev libboost-system-dev \
|
2019-04-26 09:57:49 +00:00
|
|
|
libboost-program-options-dev \
|
2020-05-13 16:16:21 +00:00
|
|
|
libcvc4-dev libz3-static-dev \
|
2019-04-26 09:57:49 +00:00
|
|
|
; \
|
2020-05-11 14:53:45 +00:00
|
|
|
apt-get install -qy python3-pip python3-sphinx; \
|
|
|
|
pip3 install codecov; \
|
2019-04-26 09:57:49 +00:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2019-07-18 18:31:08 +00:00
|
|
|
FROM base AS libraries
|
|
|
|
|
2019-04-26 09:57:49 +00:00
|
|
|
# EVMONE
|
|
|
|
RUN set -ex; \
|
|
|
|
cd /usr/src; \
|
2021-05-10 11:25:39 +00:00
|
|
|
git clone --branch="v0.7.0" --recurse-submodules https://github.com/ethereum/evmone.git; \
|
2019-04-26 09:57:49 +00:00
|
|
|
cd evmone; \
|
|
|
|
mkdir build; \
|
|
|
|
cd build; \
|
2019-08-08 16:21:35 +00:00
|
|
|
cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="/usr" ..; \
|
2019-04-26 09:57:49 +00:00
|
|
|
ninja; \
|
|
|
|
ninja install/strip; \
|
|
|
|
rm -rf /usr/src/evmone
|
|
|
|
|
2020-07-22 11:03:54 +00:00
|
|
|
# HERA
|
|
|
|
RUN set -ex; \
|
|
|
|
cd /usr/src; \
|
2021-05-13 12:11:32 +00:00
|
|
|
git clone --branch="v0.3.2-evmc8" --depth 1 --recurse-submodules https://github.com/ewasm/hera.git; \
|
2020-07-22 11:03:54 +00:00
|
|
|
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
|
|
|
|
|
2019-07-18 18:31:08 +00:00
|
|
|
FROM base
|
|
|
|
COPY --from=libraries /usr/lib /usr/lib
|
|
|
|
COPY --from=libraries /usr/bin /usr/bin
|
|
|
|
COPY --from=libraries /usr/include /usr/include
|
2020-06-23 17:17:15 +00:00
|
|
|
|