[ANN] Your opam-repository PRs are now tested on Windows

Hi everyone,

Following the merge of Windows support for the compiler in opam-repository and the release of opam 2.2.0~beta3, I’m happy to announce that a basic Windows CI using Github Actions is now in use in opam-repository, so all your new PRs are now being tested on Windows too.

This is a big milestone, however the upstream opam-repository hasn’t been tested with Windows before and thus many packages lacking the proper availability metadata will fail to build in the next month or so. If you see a package that is definitely not going to be available on Windows, please do report it in the opam-repository bug-tracker or even better open a PR if you have the time. When opening such PRs/issues, it would help the maintainers to copy/paste the failing log in the PR description.

Most such PRs should simply add the following line to the failing package(s):

available: os != "win32"

If you notice any issues in the Github Action itself or want to improve it, please feel free to open a PRs/issue for that too, the code is available in opam-repository/.github/workflows/windows.yml.

Happy hacking!

19 Likes

This is very exciting! A basic question though:

=== ERROR while compiling conf-gmp-powm-sec.3 ================================#
# context              2.2.0~beta3 | win32/x86_64 | ocaml.5.2.0 | file://D:/a/opam-repository/opam-repository
# path                 D:\opamroot\default\.opam-switch\build\conf-gmp-powm-sec.3
# command              D:\opamroot\.cygwin\root\bin\sh.exe -exc cc -c $CFLAGS -I/usr/local/include test.c
# exit-code            127
# env-file             D:\opamroot\log\conf-gmp-powm-sec-2324-747b27.env
# output-file          D:\opamroot\log\conf-gmp-powm-sec-2324-747b27.out
### output ###
# + cc -c -I/usr/local/include test.c
# /usr/bin/sh: line 1: cc: command not found

Is cc not available on Win32? I thought this had a Cygwin environment.

cc’s the wrong command to run for Windows - I’ve had a PR on my opam-repository fork about this one which I haven’t had a chance to take a look at yet (from @kkirstein), but will do hopefully tomorrow!

I’d like to nominate @dra27 for a GitHub Oscar for this golden comment: Does OPAM work on windows? · Issue #246 · ocaml/opam · GitHub

9 Likes