[llvm] [Github] Add git to actions container image (PR #80341)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 13:21:23 PST 2024


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/80341

This patch adds git to the actions container image. This is not necessarily needed for actions/checkout (as it will fallback to downloading a tar archive), but is good to have for that in addition to any future operations that might need git. In addition, the LLVM CMake configuration throws some warnings when Git is not installed.

This patch also removes a slash from LLVM_SYSROOT. This is cosmetic as /opt/llvm//bin (which showed up on $PATH) is equivalent to /opt/llvm/bin, but the latter is canonical.

>From 71c02258d00df06bcfe55c14134d9fad11bd9c94 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <agrossman154 at yahoo.com>
Date: Thu, 1 Feb 2024 13:18:17 -0800
Subject: [PATCH] [Github] Add git to actions container image

This patch adds git to the actions container image. This is not
necessarily needed for actions/checkout (as it will fallback to
downloading a tar archive), but is good to have for that in addition to
any future operations that might need git. In addition, the LLVM CMake
configuration throws some warnings when Git is not installed.

This patch also removes a slash from LLVM_SYSROOT. This is cosmetic as
/opt/llvm//bin (which showed up on $PATH) is equivalent to
/opt/llvm/bin, but the latter is canonical.
---
 .github/workflows/containers/github-action-ci/Dockerfile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/containers/github-action-ci/Dockerfile b/.github/workflows/containers/github-action-ci/Dockerfile
index 2f86b9ba1ef44..66fa81d5a10ae 100644
--- a/.github/workflows/containers/github-action-ci/Dockerfile
+++ b/.github/workflows/containers/github-action-ci/Dockerfile
@@ -1,5 +1,5 @@
 FROM docker.io/library/ubuntu:22.04 as base
-ENV LLVM_SYSROOT=/opt/llvm/
+ENV LLVM_SYSROOT=/opt/llvm
 
 FROM base as toolchain
 ENV LLVM_VERSION=17.0.6
@@ -11,7 +11,8 @@ RUN apt-get update && \
     g++ \
     cmake \
     ninja-build \
-    python3
+    python3 \
+    git
 
 RUN wget https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-$LLVM_VERSION.tar.gz && tar -xf llvmorg-$LLVM_VERSION.tar.gz
 



More information about the llvm-commits mailing list