Files
mechanical-compiler/tools/reference-toolchain/Dockerfile
T
civicus-build c7e32d8e07 Seed repository: rev-8.0.0 reference, frozen oracle, toolchain, test harness
Reference implementation of the strap-beam generators at revision 8.0.0, kept
so the acceptance oracle can be regenerated. Not a live target; the running
application has no OpenSCAD dependency.

The oracle holds 123 frozen cases, 113 accepted and 10 rejected, produced by
OpenSCAD 2021.01 with BOSL2 at 92d697c2. The ten rejections are part of the
contract: a port that accepts them is wrong.

tests/test_oracle.py specifies the port API and was written before the port,
so the interface follows from what must be verified rather than what is
convenient to implement. Proven by adversarial stub: a build() that rejects
everything passes all 10 rejection tests and fails all 226 acceptance tests.
2026-08-18 07:30:17 -05:00

32 lines
1.1 KiB
Docker

# Pinned reference toolchain for the rev-8.0.0 acceptance oracle.
#
# This image exists for one purpose: regenerating and verifying
# fixtures/strap-beam-8.0.0/. The running application has no OpenSCAD
# dependency at all -- see docs/ENVIRONMENT.md section 8.2. Confining OpenSCAD
# here is why the host's package version cannot drift into the oracle.
#
# Do not add anything to this image. Its value is that it contains nothing else.
FROM debian:12-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
openscad \
python3 \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# BOSL2 at the exact commit the oracle was frozen against.
ARG BOSL2_COMMIT=92d697c2856de2fed93a33e858068589cefc2898
RUN git clone https://github.com/BelfrySCAD/BOSL2.git /BOSL2 \
&& git -C /BOSL2 checkout "${BOSL2_COMMIT}" \
&& rm -rf /BOSL2/.git
# The generators use `include <BOSL2/std.scad>`; OpenSCAD resolves that against
# OPENSCADPATH after trying the including file's own directory.
ENV OPENSCADPATH=/
WORKDIR /repo
CMD ["openscad", "--version"]