1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: OCaml Oracle Differential Testing
on:
push:
branches:
pull_request:
branches:
jobs:
oracle:
name: Test OCaml oracle against Rust implementation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install OCaml
uses: ocaml/setup-ocaml@e32b06a3e831ff2fbc6f08cf35be2085e3918014 # v3.6.1
with:
ocaml-compiler: 5.4
- name: Cache opam
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.opam
key: ${{ runner.os }}-opam-${{ hashFiles('**/oracle-ocaml/dune-project') }}
- name: Install OCaml dependencies
run: |
cd oracle-ocaml
opam install . --deps-only --with-test
- name: Build OCaml oracle library
# Library only: test/oracle_ocaml_tests.ml predates the current
# Replay API (replay_events lost its book argument) and uses a
# non-existent %v printf conversion — it has never compiled.
# Rewrite it before adding `dune build` / `dune runtest` back.
run: |
cd oracle-ocaml
opam exec -- dune build lib
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master @ 2026-05-21
with:
toolchain: stable
- name: Cache Rust
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Rust project
run: cargo build --release --features event-log
- name: Run differential tests
run: |
# Run golden corpus tests comparing OCaml oracle output against Rust implementation
# Golden corpus location: oracle-ocaml/test/corpus/
echo "Golden corpus testing - to be implemented with corpus creation"
# `dune runtest` is disabled until test/oracle_ocaml_tests.ml is
# rewritten against the current Replay API (see build step note).