Skip to content

Commit

Permalink
build: build linter also from the dependency image instead of buildin…
Browse files Browse the repository at this point in the history
…g an almost equal linter dependency image
  • Loading branch information
Taepper committed Nov 4, 2024
1 parent 4a6d699 commit 965561d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
6 changes: 6 additions & 0 deletions Dockerfile_dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ RUN apt update && apt dist-upgrade -y \

RUN pip install conan==2.8.1

RUN apt install -y software-properties-common wget gnupg lsb-release wget jq curl \
&& wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main' \
&& apt install -y clang-tidy-15

WORKDIR /src
COPY conanfile.py conanprofile.docker conanprofile.docker_arm ./
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
Expand All @@ -17,3 +22,4 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
fi

RUN conan install . --build=missing --profile ./conanprofile --profile:build ./conanprofile --output-folder=build/Release/generators
RUN conan install . --build=missing --profile ./conanprofile --profile:build ./conanprofile --output-folder=build/Debug/generators -s build_type=Debug
5 changes: 3 additions & 2 deletions Dockerfile_linter
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG DEPENDENCY_IMAGE=ghcr.io/genspectrum/lapis-silo-linter-dependencies:latest
ARG DEPENDENCY_IMAGE=ghcr.io/genspectrum/lapis-silo-dependencies:latest

FROM $DEPENDENCY_IMAGE AS linter
ARG THREADS=4
Expand All @@ -7,4 +7,5 @@ WORKDIR /src

COPY . ./

RUN python3 ./build_with_conan.py --parallel $THREADS --build_with_clang_tidy
RUN cmake -D BUILD_WITH_CLANG_TIDY=ON -D CMAKE_BUILD_TYPE=Debug -B build/Debug
RUN cmake --build build/Debug
23 changes: 0 additions & 23 deletions Dockerfile_linter_dependencies

This file was deleted.

0 comments on commit 965561d

Please sign in to comment.