savonet / ocaml-ssl

OCaml SSL bindings.
http://liquidsoap.info/ocaml-ssl/
Other
57 stars 48 forks source link

Run CI on Windows #156

Closed aantron closed 2 weeks ago

aantron commented 3 months ago

Right now, it's not clear how to install this package ssl on a GitHub Actions Windows runner. This should be addressed and maintained in this repo for all downstream users. At the moment, it's not clear which version of SSL is even being linked against by the environment created by setup-ocaml in GHA. For example, windows-latest at the moment appears to be windows-2022, with software list here, which includes OpenSSL 1.1.1w. Yet trying to build ssl on it fails with the issue in https://github.com/savonet/ocaml-ssl/issues/155, so I suspect some other SSL from the setup-ocaml (Cygwin?) environment is at play. We encountered this in various forms during https://github.com/aantron/dream/pull/337, but it really should be solved upstream, perhaps by having this repo's GHA .yml file be an example.

If the CI build for this PR fails on Windows, what would it take to get it to work?

Long-term, this repo probably doesn't need a full (OS x OCaml) build matrix, but just to include: one row for testing on Windows on a certain OCaml version.

aantron commented 3 months ago

@anmonteiro Could you take over this? The Windows build on 4.05 failed, but I don't think that's important -- we'd basically like to see the 4.14 and 5.x builds working in some way, 4.05 might have too much bitrot and it would be fine from Dream's point of view to just include: those in the matrix.

The actual 4.14 and 5.x builds were canceled, presumably by 4.05, but I also see a nix_build failure, which, I think, is outside the scope of this PR.

aantron commented 3 months ago

I've also opened https://github.com/ocaml/setup-ocaml/issues/856 so that the setup-ocaml maintainers might comment on the environment this is all running in.

anmonteiro commented 3 months ago

I can try but I’m not sure how far I’ll get, since I don’t have access to a windows machine (or enough interest to spend significant time on it)

anmonteiro commented 3 months ago

@aantron you can now see the windows failure in CI:

[ERROR] depext is not a known command or plugin (package opam-depext.1.2.3 does not have the 'plugin' flag set).

I have no idea what this means or how to solve it since I don't use opam

anmonteiro commented 2 months ago

The failure now seems to reproduce what you reported. It would be interesting to understand how to get a newer libssl on windows.

aantron commented 2 months ago

Great, thank you! I left a comment about that in setup-ocaml. I'd wait for a response to that, and once that's clarified, we can merge this PR in this repo so that it also keeps checking that ssl is still installable in GHA, which should help everybody downstream.

aantron commented 2 months ago

Overextending. I would suggest merging this PR in this repo :) Thanks again!

anmonteiro commented 2 months ago

I'd be happy to merge this PR once we can get the build to be green

anmonteiro commented 3 weeks ago

This seems to progress further after https://github.com/ocaml/setup-ocaml/pull/892 but the github actions run seems to fail even though the test run is successful?

aantron commented 3 weeks ago

The log output doesn't seem to describe the failure. How about temporarily removing the @runtest on with-test and/or other additional flags to try to narrow down which part of the build is causing this?