diff --git a/.github/workflows/buildpack-deps.yml b/.github/workflows/buildpack-deps.yml index 5f66487e0798..1b9555ddc22d 100644 --- a/.github/workflows/buildpack-deps.yml +++ b/.github/workflows/buildpack-deps.yml @@ -10,6 +10,7 @@ on: - 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2204.clang' - 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2204' - 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2404' + - 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2404.clang' jobs: buildpack-deps: @@ -24,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - image_variant: [emscripten, ubuntu.clang.ossfuzz, ubuntu2004, ubuntu2204.clang, ubuntu2204, ubuntu2404] + image_variant: [emscripten, ubuntu.clang.ossfuzz, ubuntu2004, ubuntu2204.clang, ubuntu2204, ubuntu2404, ubuntu2404.clang] steps: - uses: actions/checkout@v4 diff --git a/scripts/ci/buildpack-deps_test_ubuntu2404.clang.sh b/scripts/ci/buildpack-deps_test_ubuntu2404.clang.sh new file mode 120000 index 000000000000..c07a74de4fb4 --- /dev/null +++ b/scripts/ci/buildpack-deps_test_ubuntu2404.clang.sh @@ -0,0 +1 @@ +build.sh \ No newline at end of file diff --git a/scripts/docker/buildpack-deps/Dockerfile.ubuntu2404.clang b/scripts/docker/buildpack-deps/Dockerfile.ubuntu2404.clang new file mode 100644 index 000000000000..c6b1fd970731 --- /dev/null +++ b/scripts/docker/buildpack-deps/Dockerfile.ubuntu2404.clang @@ -0,0 +1,107 @@ +# vim:syntax=dockerfile +#------------------------------------------------------------------------------ +# Dockerfile for building and testing Solidity Compiler on CI +# Target: Ubuntu 19.04 (Disco Dingo) Clang variant +# 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 +# +# (c) 2016-2024 solidity contributors. +#------------------------------------------------------------------------------ +FROM buildpack-deps:noble AS base +LABEL version="1" + +ARG DEBIAN_FRONTEND=noninteractive + +# From Python3.11, pip requires a virtual environment, and will thus terminate when installing packages globally. +# Since we're building this image from scratch, it's perfectly fine to use the below flag. +ENV PIP_BREAK_SYSTEM_PACKAGES 1 + +RUN set -ex; \ + 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 ; \ + apt-get update; \ + apt-get install -qqy --no-install-recommends \ + build-essential \ + clang \ + cmake \ + jq \ + lsof \ + libboost-filesystem-dev \ + libboost-program-options-dev \ + libboost-system-dev \ + libboost-test-dev \ + libcln-dev \ + libz3-static-dev \ + ninja-build \ + python3-pip \ + software-properties-common \ + sudo \ + z3-static; \ + pip3 install \ + codecov \ + colorama \ + deepdiff \ + parsec \ + pygments-lexer-solidity \ + pylint \ + requests \ + tabulate \ + z3-solver; + +# Eldarica +RUN set -ex; \ + apt-get update; \ + apt-get install -qy \ + openjdk-11-jre \ + unzip; \ + eldarica_version="2.1"; \ + wget "https://github.com/uuverifiers/eldarica/releases/download/v${eldarica_version}/eldarica-bin-${eldarica_version}.zip" -O /opt/eld_binaries.zip; \ + test "$(sha256sum /opt/eld_binaries.zip)" = "0ac43f45c0925383c9d2077f62bbb515fd792375f3b2b101b30c9e81dcd7785c /opt/eld_binaries.zip"; \ + unzip /opt/eld_binaries.zip -d /opt; \ + rm -f /opt/eld_binaries.zip; + +# CVC5 +RUN set -ex; \ + cvc5_version="1.1.2"; \ + wget "https://github.com/cvc5/cvc5/releases/download/cvc5-${cvc5_version}/cvc5-Linux-static.zip" -O /opt/cvc5.zip; \ + test "$(sha256sum /opt/cvc5.zip)" = "cf291aef67da8eaa8d425a51f67f3f72f36db8b1040655dc799b64e3d69e6086 /opt/cvc5.zip"; \ + unzip /opt/cvc5.zip -x "cvc5-Linux-static/lib/cmake/*" -d /opt; \ + mv /opt/cvc5-Linux-static/bin/* /usr/bin; \ + mv /opt/cvc5-Linux-static/lib/* /usr/lib; \ + mv /opt/cvc5-Linux-static/include/* /usr/include; \ + rm -rf /opt/cvc5-Linux-static /opt/cvc5.zip; + +FROM base AS libraries + +ENV CC clang +ENV CXX clang++ + +# EVMONE +RUN set -ex; \ + wget -O /usr/src/evmone.tar.gz https://github.com/ethereum/evmone/releases/download/v0.12.0/evmone-0.12.0-linux-x86_64.tar.gz; \ + test "$(sha256sum /usr/src/evmone.tar.gz)" = "1c7b5eba0c8c3b3b2a7a05101e2d01a13a2f84b323989a29be66285dba4136ce /usr/src/evmone.tar.gz"; \ + cd /usr; \ + tar -xf /usr/src/evmone.tar.gz; \ + rm -rf /usr/src/evmone.tar.gz + +FROM base +COPY --from=libraries /usr/lib /usr/lib +COPY --from=libraries /usr/bin /usr/bin +COPY --from=libraries /usr/include /usr/include +COPY --from=libraries /opt/eldarica /opt/eldarica +ENV PATH="$PATH:/opt/eldarica"