fix(ci): repair OCaml and cross-impl interop jobs#2
Open
saroupille wants to merge 3 commits intotrilitech:mainfrom
Open
fix(ci): repair OCaml and cross-impl interop jobs#2saroupille wants to merge 3 commits intotrilitech:mainfrom
saroupille wants to merge 3 commits intotrilitech:mainfrom
Conversation
- ocaml_unit_tests.sh: dune is installed via opam but the shell step did not have the opam environment activated; prefix with opam exec -- - cross_impl_interop: the test calls dune at runtime but was in the Rust-only job which has no OCaml; move it to the ocaml job (which already has OCaml) and add a Rust toolchain step there - Remove cross_impl_interop from the rust-and-cairo job Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The ML-KEM native C library (vendor/mlkem-native) is not committed to git and must be compiled before dune can link the OCaml executables. Add a `make lib` step and set LIBRARY_PATH for the cross_impl_interop cargo test which runs dune at runtime outside the shell script. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken and why
Two independent failures, both pre-existing before this PR.
1. `ocaml` job — `dune: not found`
`opam install dune` installs dune into the opam switch's bin directory, not into the system `$PATH`. When GitHub Actions then runs `./scripts/ocaml_unit_tests.sh` as a plain shell step, the opam environment is not activated and the shell cannot find `dune`.
Fix: prefix both OCaml shell steps with `opam exec --`, which runs the command inside the active opam switch where `dune` is available.
2. `rust-and-cairo` job — `cross_impl_interop` calls `dune` at runtime
`test_ocaml_wallet_scenario_applies_on_rust_ledger` is a Rust test that, at runtime, spawns `dune exec test/gen_interop_scenario.exe` to generate an OCaml-produced interop scenario. The `rust-and-cairo` job only installs Rust — it has no OCaml or dune — so this call fails with No such file or directory.
The test belongs in the `ocaml` job, which already has a full OCaml + dune environment. Moving it there (and adding a Rust toolchain step) is the correct structural fix rather than duplicating the entire OCaml setup in the Rust job.
3. `libmlkem768` not built before linking
The OCaml library links against `vendor/mlkem-native/test/build/libmlkem768.a`, a compiled C library that is not committed to git. Without it the linker fails with cannot find -lmlkem768. `scripts/ocaml_unit_tests.sh` sets `LIBRARY_PATH` to point at the build directory, but nothing in CI actually built the library first.
Fix: add `make -C ocaml/vendor/mlkem-native lib` before the OCaml build steps. Also set `LIBRARY_PATH` explicitly for the `cross_impl_interop` cargo step, which calls `dune` directly without going through the shell script.
Changes
`.github/workflows/unit-tests.yml` only — no production code touched.
Test plan
🤖 Generated with Claude Code