Skip to content

Commit 91caed6

Browse files
committed
an intentioanl change to trigger the benchmark CI pipline
1 parent 8f99ff2 commit 91caed6

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

Dockerfile-dev

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
FROM sysprog21/rv32emu-gcc as base_gcc
2+
FROM sysprog21/rv32emu-sail as base_sail
3+
4+
# for C++20
5+
FROM ubuntu:23.10 as final
6+
7+
# https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user#_creating-a-nonroot-user
8+
# add a non-root user
9+
ARG USERNAME=sysprog21
10+
ARG USER_UID=1001 # NOTICE: 1000 already exists for 23.04
11+
ARG USER_GID=$USER_UID
12+
13+
# Create the user
14+
RUN groupadd --gid $USER_GID $USERNAME && \
15+
useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \
16+
# Add sudo support
17+
apt-get update && \
18+
DEBIAN_FRONTEND=noninteractive apt-get install -y sudo && \
19+
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \
20+
chmod 0440 /etc/sudoers.d/$USERNAME && \
21+
rm -rf /var/lib/apt/lists/*
22+
23+
# Set the default user
24+
USER $USERNAME
25+
26+
# Install extra packages for the emulator to compile and execute with full capabilities correctly
27+
RUN sudo apt-get update && \
28+
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y \
29+
python3-pip git clang strace gdb valgrind \
30+
vim clang-tidy clang clang-tools libsdl2-dev libsdl2-mixer-dev && \
31+
sudo rm -rf /var/lib/apt/lists/*
32+
33+
# NOTICE the use of --break-system-packages
34+
RUN sudo python3 -m pip install git+https://github.com/riscv/riscof --break-system-packages
35+
36+
# copy in the source code
37+
WORKDIR /home/$USERNAME/rv32emu
38+
COPY --chown=$USERNAME:$USERNAME . .
39+
40+
# Copy the GNU Toolchain files
41+
ENV RISCV=/opt/riscv
42+
ENV PATH=$RISCV/bin:$PATH
43+
COPY --chown=$USERNAME:$USERNAME --from=base_gcc /opt/riscv/ /opt/riscv/
44+
45+
# replace the emulator (riscv_sim_RV32) with the arch that the container can execute
46+
RUN rm /home/$USERNAME/rv32emu/tests/arch-test-target/sail_cSim/riscv_sim_RV32
47+
COPY --chown=$USERNAME:$USERNAME --from=base_sail /home/root/riscv_sim_RV32 /home/$USERNAME/rv32emu/tests/arch-test-target/sail_cSim/riscv_sim_RV32
48+
49+
# Set the default directory
50+
WORKDIR /home/$USERNAME/rv32emu
51+
RUN make distclean
52+

Dockerfile-infer

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM sysprog21/infer:latest
2+
3+
RUN apt-get update && \
4+
mkdir -p /usr/share/man/man1 && \
5+
apt-get install --yes --no-install-recommends \
6+
git build-essential && \
7+
rm -rf /var/lib/apt/lists/*
8+
9+
# copy in the source code
10+
WORKDIR /home/root/rv32emu
11+
COPY . .
12+
13+
# make distclean && infer -- make ENABLE_SDL=0 ENABLE_LTO=0 ENABLE_JIT=1 ENABLE_EXT_F=0
14+

src/riscv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* rv32emu is freely redistributable under the MIT License. See the file
33
* "LICENSE" for information on usage and redistribution of this file.
44
*/
5+
/* An intentional change to trigger the benchmark pipeline */
56

67
#include <assert.h>
78
#include <stdio.h>

0 commit comments

Comments
 (0)