Skip to content

Add GitHub Actions CI - #1

Merged
giltho merged 4 commits into
mainfrom
add-ci
Jun 11, 2026
Merged

Add GitHub Actions CI#1
giltho merged 4 commits into
mainfrom
add-ci

Conversation

@giltho

@giltho giltho commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What

Adds a GitHub Actions workflow that runs the full test suite on every PR and push to main.

The workflow (.github/workflows/ci.yml) runs, on ubuntu-latest:

  1. dune build
  2. dune build @fmt — formatting check (ocamlformat 0.29.0, pinned in .ocamlformat)
  3. dune runtest — golden expect-tests
  4. dune build @stdlib @interp @gen — the acceptance gates (stdlib sweep, differential interpreter, opcode-gen drift)

It pins CPython 3.13.5 (the version the goldens were generated with) and exposes it via PYTECODE_PYTHON, plus ensures python3.13 is on PATH for the @gen rule.

Note

This branch also includes the prior commit "Rewrite Ast/Phir pretty-printers with Fmt" (working-tree changes that were not yet committed), so CI validates the actual current code. Happy to split it out if you'd prefer a CI-only PR.

giltho added 4 commits June 11, 2026 11:19
Signed-off-by: Sacha Ayoun <sachaayoun@gmail.com>
Replace the Buffer/Printf-based renderers with Format-based Fmt printers:
- Ast: const_repr -> recursive pp_const; render_generic -> pp_code_generic
  (no rstrip; the bytecode instruction column simply emits no trailing pad).
- Phir: instr_str/value_str/var_str -> pp_instr/pp_value/pp_var; pp_code
  delegates to Ast.pp_code_generic. instr_to_string is now derived.
- Add fmt as a dependency.
Build, format check, golden expect-tests, and the acceptance gates
(@stdlib, @interp, @gen) on every PR and push to main. Pins CPython 3.13.5
and ocamlformat 0.29.0 to match the goldens and .ocamlformat.
lib/opcode.ml(i) predate the .ocamlformat 0.29.0 pin and were never
re-promoted, so @fmt and @gen drift on a cold (uncached) build — which
CI exposed. Regenerated with `dune build @gen && dune promote`; the
change is purely formatting (doc-comment and array-literal wrapping).
@giltho
giltho merged commit 2b0d0a9 into main Jun 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant