8 Commits

Author SHA1 Message Date
6417d15e60 Merge branch 'ocaml-vm'
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
2026-03-25 01:21:00 +00:00
99e2009c2b Fix sx_docs Dockerfile: install dune + set PATH for OCaml build
The opam base image has dune in the switch but not on PATH.
RUN eval $(opam env) doesn't persist across layers. Install dune
explicitly and set PATH so dune is available in build steps.

Also fix run-tests.sh to respect QUICK env var from caller
(was being overwritten to false).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 01:20:48 +00:00
73810d249d Merge branch 'ocaml-vm'
All checks were successful
Test, Build, and Deploy / test-build-deploy (push) Successful in 5m58s
2026-03-25 00:59:50 +00:00
1ae5906ff6 Skip Playwright in deploy (needs running server) 2026-03-25 00:49:50 +00:00
2bc1aee888 Merge branch 'ocaml-vm'
All checks were successful
Test, Build, and Deploy / test-build-deploy (push) Successful in 2m25s
2026-03-25 00:36:57 +00:00
4dfaf09e04 Add lib/ to CI test Dockerfile
Missed during spec/lib split — CI image copied spec/ and web/
but not lib/ (compiler, freeze, vm, etc.).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 00:36:57 +00:00
7ac026eccb Merge branch 'ocaml-vm'
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 14s
2026-03-25 00:35:06 +00:00
b174a57c9c Fix spec/freeze.sx → lib/freeze.sx in CI test scripts
Missed during spec/lib split — the OCaml bridge test loaded
freeze.sx from the old spec/ path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 00:35:06 +00:00
5 changed files with 11 additions and 8 deletions

View File

@@ -43,8 +43,9 @@ COPY --chown=opam:opam hosts/ocaml/dune-project ./hosts/ocaml/
COPY --chown=opam:opam hosts/ocaml/lib/ ./hosts/ocaml/lib/
COPY --chown=opam:opam hosts/ocaml/bin/ ./hosts/ocaml/bin/
# Copy spec, web, shared (needed by bootstrappers + tests)
# Copy spec, lib, web, shared (needed by bootstrappers + tests)
COPY --chown=opam:opam spec/ ./spec/
COPY --chown=opam:opam lib/ ./lib/
COPY --chown=opam:opam web/ ./web/
COPY --chown=opam:opam shared/sx/ ./shared/sx/
COPY --chown=opam:opam shared/__init__.py ./shared/__init__.py

View File

@@ -49,7 +49,7 @@ run_suite "OCaml bridge — custom special forms + web-forms" \
python3 -c "
from shared.sx.ocaml_sync import OcamlSync
bridge = OcamlSync()
for f in ['spec/parser.sx', 'spec/render.sx', 'web/adapter-html.sx', 'web/adapter-sx.sx', 'web/web-forms.sx', 'spec/freeze.sx']:
for f in ['spec/parser.sx', 'spec/render.sx', 'web/adapter-html.sx', 'web/adapter-sx.sx', 'web/web-forms.sx', 'lib/freeze.sx']:
bridge.load(f)
ok = 0; fail = 0
def check(name, expr, expected=None):

View File

@@ -53,8 +53,8 @@ fi
echo "Building: ${BUILD[*]}"
echo ""
# --- Run all tests before deploying ---
if ! ./run-tests.sh; then
# --- Run unit tests before deploying (skip Playwright — needs running server) ---
if ! QUICK=true ./run-tests.sh; then
exit 1
fi

View File

@@ -11,8 +11,8 @@ set -euo pipefail
cd "$(dirname "$0")"
QUICK=false
SX_ONLY=false
QUICK="${QUICK:-false}"
SX_ONLY="${SX_ONLY:-false}"
for arg in "$@"; do
case "$arg" in
--quick) QUICK=true ;;
@@ -73,7 +73,7 @@ run_suite "OCaml bridge — custom special forms + web-forms" \
from shared.sx.ocaml_sync import OcamlSync
bridge = OcamlSync()
# Load exactly what the server does (no evaluator.sx!)
for f in ['spec/parser.sx', 'spec/render.sx', 'web/adapter-html.sx', 'web/adapter-sx.sx', 'web/web-forms.sx', 'spec/freeze.sx']:
for f in ['spec/parser.sx', 'spec/render.sx', 'web/adapter-html.sx', 'web/adapter-sx.sx', 'web/web-forms.sx', 'lib/freeze.sx']:
bridge.load(f)
ok = 0; fail = 0
def check(name, expr, expected=None):

View File

@@ -3,12 +3,14 @@
# --- Stage 1: Build OCaml SX kernel ---
FROM ocaml/opam:debian-12-ocaml-5.2 AS ocaml-build
USER opam
RUN opam install dune -y
ENV PATH="/home/opam/.opam/5.2/bin:${PATH}"
WORKDIR /home/opam/sx
COPY --chown=opam:opam hosts/ocaml/dune-project ./
COPY --chown=opam:opam hosts/ocaml/lib/ ./lib/
COPY --chown=opam:opam hosts/ocaml/bin/dune hosts/ocaml/bin/run_tests.ml \
hosts/ocaml/bin/debug_set.ml hosts/ocaml/bin/sx_server.ml ./bin/
RUN eval $(opam env) && dune build bin/sx_server.exe
RUN dune build bin/sx_server.exe
# --- Stage 2: Python app ---
FROM python:3.11-slim AS base