From 5942f366f94e5d884eeaa98c9ad50cda8ce3e5ed Mon Sep 17 00:00:00 2001 From: Ivan-lis Date: Fri, 18 Oct 2024 07:40:17 +0000 Subject: [PATCH] Added latest LLVM with to dev container --- .devcontainer/Dockerfile | 23 +++++++++++++++++++---- .devcontainer/post_create_config.sh | 2 +- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 50b253e..858746c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,14 +3,29 @@ # Url: https://hub.docker.com/layers/library/archlinux/latest/images/sha256-a10e51dd0694d6c4142754e9d06cbce7baf91ace8031a30df37064d1091ab414?context=explore FROM archlinux@sha256:a10e51dd0694d6c4142754e9d06cbce7baf91ace8031a30df37064d1091ab414 -# Update the package database and install clang +# Update the package database # 1. system tools # 2. build/test tools # 3. libraries RUN pacman -Syyu --noconfirm \ - && pacman -Syyu --noconfirm git less vim sudo base-devel python-pip \ - && pacman -Syyu --noconfirm clang cmake make ninja meson shellcheck \ - && pacman -Syyu --noconfirm gtk4 gtkmm-4.0 boost spdlog fmt libxml++-5.0 + && pacman -S --noconfirm git less vim sudo python-pip wget which pkgconf \ + && pacman -S --noconfirm cmake make gcc ninja meson shellcheck \ + && pacman -S --noconfirm gtk4 gtkmm-4.0 boost spdlog fmt libxml++-5.0 + +# Add cached layer with the latest LLVM-19.1.0 +RUN mkdir -p /home/artifacts +ADD https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-Linux-X64.tar.xz /home/artifacts/ + +# Create the LLVM directory and extract only binaries into it +RUN mkdir -p /home/LLVM-19.1.0 +RUN tar -xJf /home/artifacts/LLVM-19.1.0-Linux-X64.tar.xz -C /home/LLVM-19.1.0 --strip-components=1 LLVM-19.1.0-Linux-X64/bin/clang-19 LLVM-19.1.0-Linux-X64/bin/clang LLVM-19.1.0-Linux-X64/bin/clang++ LLVM-19.1.0-Linux-X64/bin/clang-scan-deps LLVM-19.1.0-Linux-X64/bin/clang-format LLVM-19.1.0-Linux-X64/bin/clang-tidy LLVM-19.1.0-Linux-X64/include/ LLVM-19.1.0-Linux-X64/lib/ LLVM-19.1.0-Linux-X64/libexec/ LLVM-19.1.0-Linux-X64/local/ LLVM-19.1.0-Linux-X64/share/ + +# Add /home/LLVM-19.1.0/bin to the PATH environment variable +ENV PATH="/home/LLVM-19.1.0/bin:${PATH}" + +# Add extra tools +RUN mkdir -p /home/tools +ADD https://raw.githubusercontent.com/llvm/llvm-project/refs/heads/main/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py /home/tools/ # Create a non-root user 'dev' RUN useradd -ms /bin/bash dev \ diff --git a/.devcontainer/post_create_config.sh b/.devcontainer/post_create_config.sh index 65b424d..c0607f0 100755 --- a/.devcontainer/post_create_config.sh +++ b/.devcontainer/post_create_config.sh @@ -1,4 +1,4 @@ -sleep 1 +sleep 5 # Check that ejabberd server started successfully red='\e[1;31m'