diff --git a/Dockerfile b/Dockerfile index bd514e1e12..15d7754191 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,16 +8,21 @@ RUN apt-get update && apt-get install -y software-properties-common wget && add- RUN wget https://apt.kitware.com/kitware-archive.sh && chmod +x kitware-archive.sh &&./kitware-archive.sh FROM base as builder +ARG TARGETPLATFORM RUN apt-get update && apt-get install -y build-essential cmake libicu-dev tzdata pkg-config uuid-runtime uuid-dev git libjemalloc-dev ninja-build libzstd-dev libssl-dev libboost1.81-dev libboost-program-options1.81-dev libboost-iostreams1.81-dev libboost-url1.81-dev - COPY . /app/ WORKDIR /app/ ENV DEBIAN_FRONTEND=noninteractive WORKDIR /app/build/ -RUN cmake -DCMAKE_BUILD_TYPE=Release -DLOGLEVEL=INFO -DUSE_PARALLEL=true -D_NO_TIMING_TESTS=ON -GNinja .. && ninja -RUN ctest --rerun-failed --output-on-failure +RUN cmake -DCMAKE_BUILD_TYPE=Release -DLOGLEVEL=INFO -DUSE_PARALLEL=true -D_NO_TIMING_TESTS=ON -GNinja .. +# When cross-compiling the container for ARM64, then compiling and running all tests runs into a timeout on GitHub actions, +# so we disable tests for this platform. +# TODO(joka921) re-enable these tests as soon as we can use a native ARM64 platform to compile the docker container. +RUN if [ $TARGETPLATFORM = "linux/arm64" ] ; then echo "target is ARM64, don't build tests to avoid timeout"; fi +RUN if [ $TARGETPLATFORM = "linux/arm64" ] ; then cmake --build . --target IndexBuilderMain ServerMain; else cmake --build . ; fi +RUN if [ $TARGETPLATFORM = "linux/arm64" ] ; then echo "Skipping tests for ARM64" ; else ctest --rerun-failed --output-on-failure ; fi FROM base as runtime WORKDIR /app