Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce ubuntu2404 clang docker image #15370

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/buildpack-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/buildpack-deps_test_ubuntu2404.clang.sh
107 changes: 107 additions & 0 deletions scripts/docker/buildpack-deps/Dockerfile.ubuntu2404.clang
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>
#
# (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"