cederom commented on code in PR #17849: URL: https://github.com/apache/nuttx/pull/17849#discussion_r2690916139
########## tools/ci/docker/linux/Dockerfile: ########## @@ -380,30 +371,90 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" TZ=Etc/UTC apt-get in zip \ && rm -rf /var/lib/apt/lists/* -# Set GCC-12 as Default compiler -RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 20 && \ - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 20 && \ - update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 && \ - update-alternatives --set cc /usr/bin/gcc && \ - update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 && \ - update-alternatives --set c++ /usr/bin/g++ +# Add LLVM repository for clang-21 (Targeting Noble) +# Note: Clang-21 is a snapshot, ensured repo is noble +RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc +RUN echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | tee /etc/apt/sources.list.d/llvm.list +RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ + clang-21 \ + clang++-21 \ + clang-tidy-21 \ + && rm -rf /var/lib/apt/lists/* + +# Set Clang-21 as Default clang compiler +RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-21 50 && \ + update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-21 50 && \ + update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-21 50 + +# Install GCC 15.2.0 from source +# Install build dependencies +RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ + libgmp-dev \ + libmpfr-dev \ + libmpc-dev \ + libisl-dev \ + zlib1g-dev \ + texinfo \ + && rm -rf /var/lib/apt/lists/* -# Configure out base setup for adding python packages +# Download, build and install GCC 15.2.0 +RUN mkdir -p /tmp/gcc-build && cd /tmp/gcc-build && \ + wget -q https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz && \ Review Comment: Ugh, do we really need to compile the compiler on each CI run? This will starve us from service quotas really quickly.. which we already hit several times. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
