Files
cowc-bench/oldcpp.Dockerfile

31 lines
1.1 KiB
Docker

FROM ubuntu:24.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl git build-essential g++ python3 python3-pip time jq \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /work
# Fetch compiler source (raw)
RUN mkdir -p /src/oldcpp \
&& curl -fsSL "https://git.seppjm.com/mirrors/COW/raw/branch/master/source/cowcomp.cpp" \
-o /src/oldcpp/cowcomp.cpp
# Patch missing include for modern compilers (memset/strncmp)
RUN grep -q '<cstring>' /src/oldcpp/cowcomp.cpp || \
sed -i 's|#include <string>|#include <string>\n#include <cstring>|' /src/oldcpp/cowcomp.cpp
# Build compiler binary (cowcomp)
RUN g++ -O3 -std=c++17 /src/oldcpp/cowcomp.cpp -o /usr/local/bin/cowcomp
# Fetch apps repo
RUN git clone --depth=1 https://git.seppjm.com/seppdroid/COW-Apps.git /apps
# Install python deps for optional local debugging (not required for harness)
RUN python3 -m pip install --no-cache-dir --break-system-packages psutil >/dev/null 2>&1 || true
ENV COMPILER_KIND=oldcpp
ENV APPS_DIR=/apps
ENV OLDCPP_COMPILER=/usr/local/bin/cowcomp