|  | 
|  | 1 | +# vim:syntax=dockerfile | 
|  | 2 | +#------------------------------------------------------------------------------ | 
|  | 3 | +# Dockerfile for building and testing Solidity Compiler on CI | 
|  | 4 | +# Target: Ubuntu 24.04 (Noble) | 
|  | 5 | +# URL: https://hub.docker.com/r/ethereum/solidity-buildpack-deps | 
|  | 6 | +# | 
|  | 7 | +# This file is part of solidity. | 
|  | 8 | +# | 
|  | 9 | +# solidity is free software: you can redistribute it and/or modify | 
|  | 10 | +# it under the terms of the GNU General Public License as published by | 
|  | 11 | +# the Free Software Foundation, either version 3 of the License, or | 
|  | 12 | +# (at your option) any later version. | 
|  | 13 | +# | 
|  | 14 | +# solidity is distributed in the hope that it will be useful, | 
|  | 15 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 16 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|  | 17 | +# GNU General Public License for more details. | 
|  | 18 | +# | 
|  | 19 | +# You should have received a copy of the GNU General Public License | 
|  | 20 | +# along with solidity.  If not, see <http://www.gnu.org/licenses/> | 
|  | 21 | +# | 
|  | 22 | +# (c) 2016-2025 solidity contributors. | 
|  | 23 | +#------------------------------------------------------------------------------ | 
|  | 24 | +FROM --platform=linux/arm64 buildpack-deps:noble AS base | 
|  | 25 | +LABEL version="1" | 
|  | 26 | + | 
|  | 27 | +ARG DEBIAN_FRONTEND=noninteractive | 
|  | 28 | + | 
|  | 29 | +# From Python3.11, pip requires a virtual environment, and will thus terminate when installing packages globally. | 
|  | 30 | +# Since we're building this image from scratch, it's perfectly fine to use the below flag. | 
|  | 31 | +ENV PIP_BREAK_SYSTEM_PACKAGES=1 | 
|  | 32 | + | 
|  | 33 | +RUN <<-EOF | 
|  | 34 | +    set -ex | 
|  | 35 | +	z3_version="4.13.3" | 
|  | 36 | +	dist=$(grep DISTRIB_CODENAME /etc/lsb-release | cut -d= -f2) | 
|  | 37 | +	echo "deb http://ppa.launchpad.net/ethereum/cpp-build-deps/ubuntu $dist main" >> /etc/apt/sources.list | 
|  | 38 | +	apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1c52189c923f6ca9 | 
|  | 39 | +	apt-get update | 
|  | 40 | +	apt-get install --quiet=2 --no-install-recommends \ | 
|  | 41 | +		build-essential \ | 
|  | 42 | +		cmake \ | 
|  | 43 | +		jq \ | 
|  | 44 | +		libboost-filesystem-dev \ | 
|  | 45 | +		libboost-program-options-dev \ | 
|  | 46 | +		libboost-system-dev \ | 
|  | 47 | +		libboost-test-dev \ | 
|  | 48 | +		libcln-dev \ | 
|  | 49 | +		locales-all \ | 
|  | 50 | +		lsof \ | 
|  | 51 | +		ninja-build \ | 
|  | 52 | +		python3-pip \ | 
|  | 53 | +		python3-sphinx \ | 
|  | 54 | +		software-properties-common \ | 
|  | 55 | +		sudo \ | 
|  | 56 | +		unzip \ | 
|  | 57 | +		zip | 
|  | 58 | +    pip3 install \ | 
|  | 59 | +        codecov \ | 
|  | 60 | +        colorama \ | 
|  | 61 | +        deepdiff \ | 
|  | 62 | +        parsec \ | 
|  | 63 | +        pygments-lexer-solidity \ | 
|  | 64 | +        pylint \ | 
|  | 65 | +        requests \ | 
|  | 66 | +        tabulate \ | 
|  | 67 | +        z3-solver=="${z3_version}" | 
|  | 68 | +EOF | 
|  | 69 | + | 
|  | 70 | +# Eldarica | 
|  | 71 | +RUN <<-EOF | 
|  | 72 | +    set -ex | 
|  | 73 | +    apt-get update | 
|  | 74 | +    apt-get install --quiet=2 openjdk-11-jre | 
|  | 75 | +    eldarica_version="2.1" | 
|  | 76 | +    wget "https://github.com/uuverifiers/eldarica/releases/download/v${eldarica_version}/eldarica-bin-${eldarica_version}.zip" -O /opt/eld_binaries.zip | 
|  | 77 | +    test "$(sha256sum /opt/eld_binaries.zip)" = "0ac43f45c0925383c9d2077f62bbb515fd792375f3b2b101b30c9e81dcd7785c  /opt/eld_binaries.zip" | 
|  | 78 | +    unzip /opt/eld_binaries.zip -d /opt | 
|  | 79 | +    rm -f /opt/eld_binaries.zip | 
|  | 80 | +EOF | 
|  | 81 | + | 
|  | 82 | +# CVC5 | 
|  | 83 | +RUN <<-EOF | 
|  | 84 | +    set -ex | 
|  | 85 | +	cvc5_version="1.2.0" | 
|  | 86 | +	cvc5_archive_name="cvc5-Linux-arm64-static" | 
|  | 87 | +	wget "https://github.com/cvc5/cvc5/releases/download/cvc5-${cvc5_version}/${cvc5_archive_name}.zip" -O /opt/cvc5.zip | 
|  | 88 | +	test "$(sha256sum /opt/cvc5.zip)" = "142ac177af1ce37922308f69fe519d06e6cb4d0a62a312f28c25001e94c2fb56  /opt/cvc5.zip" | 
|  | 89 | +	unzip -j /opt/cvc5.zip "${cvc5_archive_name}/bin/cvc5" -d /usr/bin | 
|  | 90 | +	rm -f /opt/cvc5.zip | 
|  | 91 | +EOF | 
|  | 92 | + | 
|  | 93 | +FROM base AS libraries | 
|  | 94 | + | 
|  | 95 | +# EVMONE (built from source, no arm release available) | 
|  | 96 | +RUN <<-EOF | 
|  | 97 | +    set -ex | 
|  | 98 | +    git clone --depth=1 --recurse-submodules --branch v0.16.0 https://github.com/ipsilon/evmone.git /tmp/evmone | 
|  | 99 | +    mkdir -p /tmp/evmone/build | 
|  | 100 | +    cd /tmp/evmone/build | 
|  | 101 | +    cmake .. | 
|  | 102 | +    make -j | 
|  | 103 | +    make install | 
|  | 104 | +EOF | 
|  | 105 | + | 
|  | 106 | +FROM base | 
|  | 107 | +COPY --from=libraries /usr/lib /usr/lib | 
|  | 108 | +COPY --from=libraries /usr/bin /usr/bin | 
|  | 109 | +COPY --from=libraries /usr/include /usr/include | 
|  | 110 | +COPY --from=libraries /opt/eldarica /opt/eldarica | 
|  | 111 | +ENV PATH="$PATH:/opt/eldarica" | 
0 commit comments