ci: Speedup unit test dockerfile

Use docker cache, reduce the number of installed apt packages, add docker ignore
entry for build directory

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
This commit is contained in:
Bartosz Podrygajlo
2026-07-01 10:32:43 +02:00
parent c4125d1c74
commit cea29f9c3f
2 changed files with 5 additions and 3 deletions

View File

@@ -5,3 +5,4 @@ common/utils/T/T_IDs.h
common/utils/T/T_messages.txt.h
common/utils/T/genids
common/utils/T/genids.o
build/

View File

@@ -10,8 +10,7 @@
FROM ran-base:develop AS ran-tests
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
libgtest-dev \
libyaml-cpp-dev \
libzmq3-dev \
@@ -26,7 +25,9 @@ WORKDIR /oai-ran
COPY . .
WORKDIR /oai-ran/build
RUN cmake .. -GNinja \
RUN --mount=type=cache,target=/root/.cache/ccache/ \
--mount=type=cache,target=/root/.cache/cpm/ \
cmake .. -GNinja \
-DENABLE_TESTS=ON -DOAI_ZMQ=ON -DCMAKE_BUILD_TYPE=Debug \
-DSANITIZE_ADDRESS=True -DOAI_VRTSIM_TAPS_CLIENT=ON -DOAI_RU_FRONTHAUL=ON \
&& \