From e720720ccaea7d746346194c37e1d97aa7f24873 Mon Sep 17 00:00:00 2001 From: Eliasj42 <46754803+Eliasj42@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:07:00 -0700 Subject: [PATCH] Add required dependencies to set up Azure ccache in workflows (#7) Signed-off-by: Elias Joseph --- .../cpubuilder_ubuntu_jammy_ghr_x86_64.Dockerfile | 13 ++++++++++++- .../cpubuilder_ubuntu_jammy_x86_64.Dockerfile | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dockerfiles/cpubuilder_ubuntu_jammy_ghr_x86_64.Dockerfile b/dockerfiles/cpubuilder_ubuntu_jammy_ghr_x86_64.Dockerfile index 011e593..d8e27f3 100644 --- a/dockerfiles/cpubuilder_ubuntu_jammy_ghr_x86_64.Dockerfile +++ b/dockerfiles/cpubuilder_ubuntu_jammy_ghr_x86_64.Dockerfile @@ -12,7 +12,7 @@ RUN apt install -y python3.11-dev python3.11-venv python3-pip && \ RUN apt install -y \ clang-14 lld-14 \ gcc-9 g++-9 \ - ccache ninja-build libssl-dev libxml2-dev libcapstone-dev libtbb-dev \ + ninja-build libssl-dev libxml2-dev libcapstone-dev libtbb-dev \ libzstd-dev llvm-dev pkg-config # Recent compiler tools for build configurations like ASan/TSan. # * See https://apt.llvm.org/ for context on the apt commands. @@ -21,9 +21,20 @@ RUN echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${LLVM_VERSION} ma curl https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/llvm-snapshot.gpg && \ apt update && \ apt install -y clang-${LLVM_VERSION} lld-${LLVM_VERSION} +# Virtual file system adapter for Azure Blob storage, used for remote cache. +RUN curl -sSL -O https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb +RUN dpkg -i packages-microsoft-prod.deb +RUN rm packages-microsoft-prod.deb +RUN apt-get update && \ + apt-get install -y fuse3 blobfuse2 # Cleanup. RUN apt clean && rm -rf /var/lib/apt/lists/* +######## CCache ######## +WORKDIR /install-ccache +COPY build_tools/install_ccache.sh ./ +RUN ./install_ccache.sh "4.10.2" && rm -rf /install-ccache + ######## CMake ######## WORKDIR /install-cmake ENV CMAKE_VERSION="3.23.2" diff --git a/dockerfiles/cpubuilder_ubuntu_jammy_x86_64.Dockerfile b/dockerfiles/cpubuilder_ubuntu_jammy_x86_64.Dockerfile index 7b7e004..081f5b6 100644 --- a/dockerfiles/cpubuilder_ubuntu_jammy_x86_64.Dockerfile +++ b/dockerfiles/cpubuilder_ubuntu_jammy_x86_64.Dockerfile @@ -12,7 +12,7 @@ RUN apt install -y python3.11-dev python3.11-venv python3-pip && \ RUN apt install -y \ clang-14 lld-14 \ gcc-9 g++-9 \ - ccache ninja-build libssl-dev libxml2-dev libcapstone-dev libtbb-dev \ + ninja-build libssl-dev libxml2-dev libcapstone-dev libtbb-dev \ libzstd-dev llvm-dev pkg-config # Recent compiler tools for build configurations like ASan/TSan. # * See https://apt.llvm.org/ for context on the apt commands. @@ -21,9 +21,20 @@ RUN echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${LLVM_VERSION} ma curl https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/llvm-snapshot.gpg && \ apt update && \ apt install -y clang-${LLVM_VERSION} lld-${LLVM_VERSION} +# Virtual file system adapter for Azure Blob storage, used for remote cache. +RUN curl -sSL -O https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb +RUN dpkg -i packages-microsoft-prod.deb +RUN rm packages-microsoft-prod.deb +RUN apt-get update && \ + apt-get install -y fuse3 blobfuse2 # Cleanup. RUN apt clean && rm -rf /var/lib/apt/lists/* +######## CCache ######## +WORKDIR /install-ccache +COPY build_tools/install_ccache.sh ./ +RUN ./install_ccache.sh "4.10.2" && rm -rf /install-ccache + ######## CMake ######## WORKDIR /install-cmake ENV CMAKE_VERSION="3.23.2"