Skip to content

Commit 58184df

Browse files
[Github] Update libc container
Add git/cmake which are needed by the workflow. Add some comments pulled from the libc workflow. Also use a user rather than running as root to prevent file permissions tests from failing.
1 parent c417046 commit 58184df

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/containers/libc/Dockerfile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
FROM docker.io/library/ubuntu:24.04
22

3+
# MPFR is required by some of the mathlib tests.
34
RUN apt-get update && \
45
apt-get install -y \
6+
git \
57
libmpfr-dev \
68
libgmp-dev \
79
libmpc-dev \
@@ -12,6 +14,7 @@ RUN apt-get update && \
1214
lsb-release \
1315
software-properties-common \
1416
gnupg \
17+
cmake \
1518
linux-libc-dev && \
1619
apt-get clean && \
1720
rm -rf /var/lib/apt/lists/*
@@ -20,5 +23,20 @@ RUN wget https://apt.llvm.org/llvm.sh && \
2023
chmod +x llvm.sh && \
2124
sudo ./llvm.sh 21 && \
2225
rm llvm.sh
23-
26+
27+
# Debian has a multilib setup, so we need to symlink the asm directory.
28+
# For more information, see https://wiki.debian.org/Multiarch/LibraryPathOverview
2429
RUN ln -sf /usr/include/$(uname -p)-linux-gnu/asm /usr/include/asm
30+
31+
# Create a new user to avoid test failures related to a lack of expected
32+
# permissions issues in some tests. Set the user id to 1001 as that is the
33+
# user id that Github Actions uses to perform the checkout action.
34+
RUN useradd gha -u 1001 -m -s /bin/bash
35+
36+
# Also add the user to passwordless sudoers so that we can install software
37+
# later on without having to rebuild the container.
38+
RUN adduser gha sudo
39+
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
40+
41+
USER gha
42+
WORKDIR /home/gha

0 commit comments

Comments
 (0)