Skip to content

Conversation

@Timmmm
Copy link
Contributor

@Timmmm Timmmm commented Sep 24, 2025

Support compilation on Windows by disabling the REPL because the linenoise library doesn't compile on Windows.

This also requires manually setting LEMLIB due to the way OPAM works (or doesn't) on Windows.

@github-actions
Copy link

github-actions bot commented Sep 24, 2025

Test Results

   16 files     36 suites   0s ⏱️
1 006 tests 1 001 ✅  3 💤 0 ❌ 2 🔥
4 857 runs  4 813 ✅ 42 💤 0 ❌ 2 🔥

For more details on these errors, see this check.

Results for commit 611ccd5.

♻️ This comment has been updated with latest results.

@Alasdair
Copy link
Collaborator

Could try setting SAIL_PLUGIN_DIR if dune_site is causing issues on Windows.

@Timmmm Timmmm force-pushed the user/timh/windows branch 2 times, most recently from 4ba8825 to a7dec10 Compare October 15, 2025 20:42
@Alasdair
Copy link
Collaborator

For some reason the conditional compilation does not seem to be working quite right. The interpreter is also disabled on Linux, which is why the tests are failing.

@Timmmm Timmmm force-pushed the user/timh/windows branch 2 times, most recently from 5feceab to 30c2822 Compare October 17, 2025 20:19
@Timmmm
Copy link
Contributor Author

Timmmm commented Oct 19, 2025

Ok with some more commits (not yet in this PR) I managed to make this work. Here's a release build (it's a zip within a zip because Github zips all artifacts).

Needs some more work on the make tarball flow though - apparently there's no sane way to write a cross-platform Makefile if you want to do stuff like rm -rf and cp, so I did... a thing to work around that which I'm not very happy with. I think I'll just move the entire release preparation flow into OCaml.

Also one minor issue that I think probably affects all platforms is that sail_manifest gets packaged, which doesn't really make sense. I couldn't figure out how to stop that but it doesn't matter too much I guess. (Also I renamed it to sail_maker because of other stuff I added to it.)

Mercifully Smart Screen apparently doesn't seem apply to programs run from the command line so we don't have to worry about signing or buying certificates. @edolnx FYI

@Alasdair
Copy link
Collaborator

I think at some point the sail_manifest tool was called sail_build_tool, as that was kind of the original idea. Because of how opam builds are sandboxed, building a small OCaml program was much more reliable than relying on shell scripts.

This also currently includes some incidental CI improvements that I made when trying to punch Github CI in the face until it worked:

* Use explicit `os` versions
* Use `runner.os ==` instead of `startswith(matrix.os`
* Use the `setup-z3` action to set up Z3
* Use the `setup-ocaml` action. This includes caching.

Also some of the tarball generation logic is moved from the Makefile into `sail_maker` (OCaml) because it's difficult to make portable Makefiles.
@Timmmm Timmmm marked this pull request as ready for review November 11, 2025 09:46
@Timmmm
Copy link
Contributor Author

Timmmm commented Nov 11, 2025

Ok this seems to work now. Quite a lot of changes to the Github CI flows, sorry! I can probably break it down into a couple of smaller PRs if necessary (but I'd rather be lazy and not!).

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.

2 participants