Skip to content

Commit

Permalink
ci: docker file must be in main
Browse files Browse the repository at this point in the history
  • Loading branch information
priyasiddharth committed Dec 1, 2024
1 parent 9ef8b10 commit 6bf4f78
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docker/buildpack-deps-seaurchin.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# seaurchin-llvm build image. Contains all the necessary dependencies
# to build seaurchin-llvm.
# Used by the CI to start the build
#

ARG BASE_IMAGE=jammy-scm
# Base image with usual build dependencies
FROM buildpack-deps:$BASE_IMAGE

# Install dependencies
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -yqq software-properties-common && \
apt-get update && \
apt-get upgrade -yqq && \
apt-get install -yqq cmake cmake-data unzip \
zlib1g-dev \
ninja-build libgraphviz-dev \
libboost1.74-dev \
python3-pip \
less vim \
gcc-multilib \
sudo \
graphviz libgraphviz-dev python3-pygraphviz \
lcov gcovr rsync lld && \
pip3 install lit OutputCheck && \
pip3 install networkx && \
pip3 install cmake --upgrade && \
mkdir seaurchin-llvm
RUN wget -qO- https://apt.llvm.org/llvm.sh | bash -s -- 18

WORKDIR /seaurchin-llvm
34 changes: 34 additions & 0 deletions docker/seaurchin-llvm-builder.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Seaurchin llvm builder image that builds binary seaurchin-llvm library
# Primarily used by the CI
# Arguments:
# - BASE-IMAGE: jammy-llvm18
# - BUILD_TYPE: ASSERTIONS_ON, FORCE_ENABLE_STATS
ARG BASE_IMAGE=jammy-llvm18
#FROM seaurchin/buildpack-deps-seaurchin:$BASE_IMAGE
FROM buildpack-seaurchin-local:latest

# Assume that docker-build is ran in the top-level SeaHorn directory
COPY . /seaurchin-llvm
# Re-create the build directory that might have been present in the source tree
RUN rm -rf /seaurchin-llvm/build-rela \
/seaurchin-llvm/build-rel \
/seaurchin-llvm/debug \
/seaurchin-llvm/release && \
mkdir /seaurchin-llvm/build-rel
WORKDIR /seaurchin-llvm/build-rel

ARG BUILD_TYPE=ASSERTIONS_ON

# Build configuration
RUN cmake ../llvm -GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-GNinja \
-DCMAKE_CXX_COMPILER=clang++-18 \
-DCMAKE_C_COMPILER=clang-18 \
-DLLVM_TARGETS_TO_BUILD="X86" \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_USE_LINKER=lld \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
RUN ninja

WORKDIR /seaurchin-llvm

0 comments on commit 6bf4f78

Please sign in to comment.