From 3ea2ad9754f24f1b5975daff49647c667e7a292a Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Tue, 20 Oct 2026 16:38:55 +0000 Subject: [PATCH] Upgrade dev env --- .devcontainer/Dockerfile | 18 ++++++++++-------- .vscode/c_cpp_properties.json | 4 ++-- tests/CMakeLists.txt | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ddae9d9..28f0b3e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Use the official Ubuntu base image -FROM ubuntu:22.04 +FROM ubuntu:26.04 # Avoid interactive package installation ENV DEBIAN_FRONTEND=noninteractive @@ -18,6 +18,7 @@ RUN apt update && apt install -y \ python3 \ python3-pip \ gdb \ + lcov \ lldb \ clang \ llvm \ @@ -25,19 +26,20 @@ RUN apt update && apt install -y \ software-properties-common \ doxygen \ graphviz \ - && rm -rf /var/lib/apt/lists/* + sudo \ + && apt-get clean && rm -rf /var/lib/apt/lists/* # Create a non-root user ARG USERNAME=vscode ARG USER_UID=1000 ARG USER_GID=$USER_UID -RUN groupadd -g $USER_GID $USERNAME || true \ - && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME -s /bin/bash \ - && apt update \ - && apt install -y sudo \ - && echo $USERNAME ALL=\(ALL\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ - && chmod 0440 /etc/sudoers.d/$USERNAME +RUN usermod --login ${USERNAME} --home /home/${USERNAME} --move-home $(getent passwd ${USER_UID} | cut -d: -f1) \ + && usermod --gid ${USER_GID} ${USERNAME} \ + && passwd -d ${USERNAME} \ + && printf '%s ALL=(ALL) NOPASSWD:ALL\n' "${USERNAME}" > "/etc/sudoers.d/${USERNAME}" \ + && chmod 0440 "/etc/sudoers.d/${USERNAME}" \ + && visudo -cf "/etc/sudoers.d/${USERNAME}" # History RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \ diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 8254c4e..eecbd9f 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -6,7 +6,7 @@ "${workspaceFolder}/**" ], "defines": [], - "compilerPath": "/usr/bin/gcc-9", + "compilerPath": "/usr/bin/gcc-15", "cStandard": "c17", "intelliSenseMode": "linux-clang-x64", "configurationProvider": "ms-vscode.cmake-tools" @@ -17,7 +17,7 @@ "${workspaceFolder}/**" ], "defines": [], - "compilerPath": "/usr/bin/clang-10", + "compilerPath": "/usr/bin/clang-21", "cStandard": "c17", "intelliSenseMode": "linux-clang-x64", "configurationProvider": "ms-vscode.cmake-tools" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7c2e049..a3451ff 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,7 +12,7 @@ endif() include(FetchContent) if (NOT googletest_POPULATED) - FetchContent_Declare(googletest URL https://github.com/google/googletest/archive/refs/tags/v1.15.2.zip) + FetchContent_Declare(googletest URL https://github.com/google/googletest/archive/refs/tags/v1.18.0.zip) FetchContent_MakeAvailable(googletest) endif () @@ -67,7 +67,7 @@ package_add_test(zip_test zip_test.cpp zip_iterator_test.cpp zip_integration_tes # Benchmark if (ENABLE_BENCHMARKS) if (NOT benchmark_POPULATED) - FetchContent_Declare(benchmark URL https://github.com/google/benchmark/archive/refs/tags/v1.8.5.zip) + FetchContent_Declare(benchmark URL https://github.com/google/benchmark/archive/refs/tags/v1.10.0.zip) FetchContent_MakeAvailable(benchmark) endif ()