2022-01-13 18:03:34 +00:00
|
|
|
# rebuild in #33610
|
2021-09-06 11:33:39 +00:00
|
|
|
# docker build --network=host -t clickhouse/codebrowser .
|
|
|
|
# docker run --volume=path_to_repo:/repo_folder --volume=path_to_result:/test_output clickhouse/codebrowser
|
2021-12-24 15:10:06 +00:00
|
|
|
ARG FROM_TAG=latest
|
|
|
|
FROM clickhouse/binary-builder:$FROM_TAG
|
2020-01-22 16:11:34 +00:00
|
|
|
|
2021-11-25 16:30:39 +00:00
|
|
|
# ARG for quick switch to a given ubuntu mirror
|
|
|
|
ARG apt_archive="http://archive.ubuntu.com"
|
|
|
|
RUN sed -i "s|http://archive.ubuntu.com|$apt_archive|g" /etc/apt/sources.list
|
2021-08-23 08:22:39 +00:00
|
|
|
|
2022-09-06 12:12:05 +00:00
|
|
|
RUN apt-get update && apt-get --yes --allow-unauthenticated install libclang-${LLVM_VERSION}-dev libmlir-${LLVM_VERSION}-dev
|
|
|
|
|
|
|
|
ARG TARGETARCH
|
|
|
|
RUN arch=${TARGETARCH:-amd64} \
|
|
|
|
&& case $arch in \
|
|
|
|
amd64) rarch=x86_64 ;; \
|
|
|
|
arm64) rarch=aarch64 ;; \
|
|
|
|
*) exit 1 ;; \
|
2023-05-09 08:30:02 +00:00
|
|
|
esac
|
2020-01-22 16:11:34 +00:00
|
|
|
|
|
|
|
# repo versions doesn't work correctly with C++17
|
2020-01-24 08:07:20 +00:00
|
|
|
# also we push reports to s3, so we add index.html to subfolder urls
|
2023-05-10 14:26:50 +00:00
|
|
|
# https://github.com/ClickHouse/woboq_codebrowser/commit/37e15eaf377b920acb0b48dbe82471be9203f76b
|
|
|
|
RUN git clone --branch=master --depth=1 https://github.com/ClickHouse/woboq_codebrowser /woboq_codebrowser \
|
2023-05-09 10:34:25 +00:00
|
|
|
&& cd /woboq_codebrowser \
|
2023-05-09 08:31:55 +00:00
|
|
|
&& cmake . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang\+\+-${LLVM_VERSION} -DCMAKE_C_COMPILER=clang-${LLVM_VERSION} -DCLANG_BUILTIN_HEADERS_DIR=/usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/include \
|
2023-05-09 10:34:25 +00:00
|
|
|
&& ninja
|
2020-01-22 16:11:34 +00:00
|
|
|
|
2023-05-09 17:38:19 +00:00
|
|
|
COPY build.sh /
|
|
|
|
CMD ["bash", "-c", "/build.sh 2>&1"]
|