Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI workflows on Windows #179

Merged
merged 3 commits into from
Nov 16, 2022
Merged

Add CI workflows on Windows #179

merged 3 commits into from
Nov 16, 2022

Conversation

shym
Copy link
Collaborator

@shym shym commented Nov 10, 2022

This is a lot more complex than it should be because:

  • even with a override opam repository providing packages for the OCaml 5 compiler with build instructions compatible with Windows, setup-ocaml fails
  • many different attempts to build the compiler in a simpler way failed without many clues to help (probably because of issues with the PATH, which sh is found, or not, to call configure, etc. etc.)
  • ocaml-config.3 (upstream opam package) fails to install claiming the hashes in the opam package are invalid (?), so the override opam repository distribute that same package without the hashes
  • ocamlfind.1.9.5 as provided by the default opam repository doesn’t build with OCaml 5 since the Windows patch uses deprecated functions

@jmid
Copy link
Collaborator

jmid commented Nov 11, 2022

This is great - thanks! 😃 🙏

Looking at the CI logs I spotted a couple of things:

  • There's a warning(?) up front that may have to do with us relying to heavily on Unix or Sys operations which may not be available under Windows:

    Error: Some modules don't have an implementation.
    You need to add the following field to this stanza:
    
      (modules_without_implementation sys)
    File "ocaml/otherlibs/unix/dune", line 15, characters 0-960:
    15 | (library
    16 |  (name unix)
    17 |  (wrapped false)
    
    ....
    31 |    shutdown signals sleep socket socketaddr socketpair sockopt stat strofaddr
    32 |    symlink termios time times truncate umask unixsupport unlink utimes wait
    33 |    write))
    
    Error: Some modules don't have an implementation.
    You need to add the following field to this stanza:
    
      (modules_without_implementation unix)
    File "ocaml/manual/src/html_processing/src/dune", line 3, characters 10-16:
    3 |  (modules common)
                  ^^^^^^
    Error: Module Common doesn't exist.
    
  • There's a failure in src/domain/domain_spawntree.ml

    random seed: 341386161
    generated error fail pass / total     time test name
    
    [ ]    0    0    0    0 /  100     0.0s domain_spawntree - with Atomic
    [ ...]
    [ ]   55    0    0   55 /  100  1531.1s domain_spawntree - with Atomic (shrinking:    0.0003)
    [✗]   56    0    1   55 /  100  1572.1s domain_spawntree - with Atomic
    

    I wonder whether this is caused by Domain.spawn failing with a different error under Windows:
    https://github.com/jmid/multicoretests/blob/6cb3fa55b3117a3f2e974f2d0610b88283268cfb/src/domain/domain_spawntree.ml#L85-L93
    Or perhaps the max_domains should be different under Windows? https://github.com/jmid/multicoretests/blob/6cb3fa55b3117a3f2e974f2d0610b88283268cfb/src/domain/domain_spawntree.ml#L3

@dra27
Copy link

dra27 commented Nov 14, 2022

I think the first error can be eliminated if you add (data_only_dirs ocaml) to a new dune file in the root of this repo - the problem is that the OCaml repo contains dune files which are being scanned when the testsuite is run.

@dra27
Copy link

dra27 commented Nov 14, 2022

Hopefully fixing that might change what's going on in the second part 🤞

@jmid
Copy link
Collaborator

jmid commented Nov 15, 2022

In the CI log for #179 I just spotted a Linux 5.0.0+trunk domain_spawntree failure, which could indicate that this is not Windows-specific issue: https://github.com/jmid/multicoretests/actions/runs/3469687128/jobs/5796977688

random seed: 474886661
generated error fail pass / total     time test name

[ ]    0    0    0    0 /  100     0.0s domain_spawntree - with Atomic
[ ]    0    0    0    0 /  100     0.0s domain_spawntree - with Atomic (generating)
[ ]   87    0    0   87 /  100    67.0s domain_spawntree - with Atomic (shrinking:    0.0003)
[ ]   87    0    0   87 /  100   135.1s domain_spawntree - with Atomic (shrinking:    0.0006)
[ ]   87    0    0   87 /  100   198.1s domain_spawntree - with Atomic (shrinking:    0.0008)
[ ]   87    0    0   87 /  100   263.2s domain_spawntree - with Atomic (shrinking:    0.0010)
[ ]   87    0    0   87 /  100   329.9s domain_spawntree - with Atomic (shrinking:    0.0012)
[ ]   87    0    0   87 /  100   419.8s domain_spawntree - with Atomic (shrinking:    0.0015)
[ ]   87    0    0   87 /  100   504.1s domain_spawntree - with Atomic (shrinking:    0.0018)
[ ]   87    0    0   87 /  100   568.6s domain_spawntree - with Atomic (shrinking:    0.0020)
[ ]   87    0    0   87 /  100   632.1s domain_spawntree - with Atomic (shrinking:    0.0022)
[ ]   87    0    0   87 /  100   694.3s domain_spawntree - with Atomic (shrinking:    0.0024)
[ ]   87    0    0   87 /  100   756.9s domain_spawntree - with Atomic (shrinking:    0.0026)
[ ]   87    0    0   87 /  100   839.1s domain_spawntree - with Atomic (shrinking:    0.0029)
[ ]   87    0    0   87 /  100   926.2s domain_spawntree - with Atomic (shrinking:    0.0032)
[ ]   87    0    0   87 /  100   991.2s domain_spawntree - with Atomic (shrinking:    0.0034)
[ ]   87    0    0   87 /  100  1054.3s domain_spawntree - with Atomic (shrinking:    0.0036)
[ ]   87    0    0   87 /  100  1119.4s domain_spawntree - with Atomic (shrinking:    0.0038)
[ ]   87    0    0   87 /  100  1194.9s domain_spawntree - with Atomic (shrinking:    0.0041)
[ ]   87    0    0   87 /  100  1287.1s domain_spawntree - with Atomic (shrinking:    0.0044)
[ ]   87    0    0   87 /  100  1353.4s domain_spawntree - with Atomic (shrinking:    0.0046)
[ ]   87    0    0   87 /  100  1419.4s domain_spawntree - with Atomic (shrinking:    0.0048)
[ ]   87    0    0   87 /  100  1508.5s domain_spawntree - with Atomic (shrinking:    0.0051)
[ ]   87    0    0   87 /  100  1570.0s domain_spawntree - with Atomic (shrinking:    0.0053)
[ ]   87    0    0   87 /  100  1634.3s domain_spawntree - with Atomic (shrinking:    0.0055)
[ ]   87    0    0   87 /  100  1695.9s domain_spawntree - with Atomic (shrinking:    0.0057)
[ ]   87    0    0   87 /  100  1760.7s domain_spawntree - with Atomic (shrinking:    0.0059)
[ ]   87    0    0   87 /  100  1850.3s domain_spawntree - with Atomic (shrinking:    0.0062)
[ ]   87    0    0   87 /  100  1915.8s domain_spawntree - with Atomic (shrinking:    0.0064)
[ ]   87    0    0   87 /  100  1980.5s domain_spawntree - with Atomic (shrinking:    0.0066)
[ ]   87    0    0   87 /  100  2048.0s domain_spawntree - with Atomic (shrinking:    0.0068)
[ ]   87    0    0   87 /  100  2110.7s domain_spawntree - with Atomic (shrinking:    0.0070)
[ ]   87    0    0   87 /  100  2178.2s domain_spawntree - with Atomic (shrinking:    0.0072)
[ ]   87    0    0   87 /  100  2244.0s domain_spawntree - with Atomic (shrinking:    0.0074)
[ ]   87    0    0   87 /  100  2322.9s domain_spawntree - with Atomic (shrinking:    0.0077)
[ ]   87    0    0   87 /  100  2390.0s domain_spawntree - with Atomic (shrinking:    0.0079)
[ ]   87    0    0   87 /  100  2467.1s domain_spawntree - with Atomic (shrinking:    0.0082)
[ ]   87    0    0   87 /  100  2534.6s domain_spawntree - with Atomic (shrinking:    0.0085)
[✗]   88    0    1   87 /  100  2567.9s domain_spawntree - with Atomic

--- Failure --------------------------------------------------------------------

Test domain_spawntree - with Atomic failed (0 shrink steps):

(Spawn
   [(Spawn []);
     (Spawn
        [(Spawn
            [(Spawn
                [Decr; Decr; Decr; Incr; Decr; Incr; Decr; Incr; Incr; Incr]);
              Decr; Incr; Incr]);
          Decr; Decr; (Spawn [(Spawn [Incr; Incr; Incr]); Decr; Decr]); Decr;
          Decr; Decr]);
     Incr; Incr; Decr; Incr; (Spawn [Incr; Decr; Decr; (Spawn []); Decr]);
     Incr; Incr;
     (Spawn
        [(Spawn []); Decr; Incr;
          (Spawn
             [Incr; (Spawn [Decr; Decr; Decr; Incr; Decr; Decr; Decr; Decr]);
               Decr; Incr]);
          (Spawn [(Spawn [Decr]); (Spawn [Incr])]);
          (Spawn
             [(Spawn [Decr]); Decr; (Spawn []); Decr; Incr;
               (Spawn [Incr; Decr; Decr; Decr; Decr; Incr; Incr; Decr]);
               Decr; Decr; Incr]);
          Incr])
     ])
================================================================================
failure (1 tests failed, 0 tests errored, ran 1 tests)
File "src/domain/dune", line 30, characters 0-114:
30 | (rule
31 |  (alias runtest)
32 |  (deps domain_spawntree.exe)
33 |  (package multicoretests)
34 |  (action (run ./%{deps} --verbose)))
(cd _build/default/src/domain && ./domain_spawntree.exe --verbose)
Command exited with code 1.

@jmid
Copy link
Collaborator

jmid commented Nov 15, 2022

It seems like the QCHECK_MSG_INTERVAL environment variable of #180 is missing. As a result the CI logs are very long.

Also the latest Windows 5.0.0~beta1 CI log offered this gem @shym
https://github.com/jmid/multicoretests/actions/runs/3472032558/jobs/5802310225

random seed: 417531959
generated error fail pass / total     time test name

[ ]    0    0    0    0 /  500     0.0s Mash up of threads and domains
[ ]    0    0    0    0 /  500     0.0s Mash up of threads and domains (generating)
[ ]    2    0    0    2 /  500     1.0s Mash up of threads and domains
[ ]    3    0    0    3 /  500     1.4s Mash up of threads and domains
[ ]    4    0    0    4 /  500     3.2s Mash up of threads and domains
[ ]    5    0    0    5 /  500     3.8s Mash up of threads and domains
[ ]    6    0    0    6 /  500     4.9s Mash up of threads and domains
[ ]    7    0    0    7 /  500     6.1s Mash up of threads and domains
[ ]    8    0    0    8 /  500     8.4s Mash up of threads and domains
[ ]    9    0    0    9 /  500     9.1s Mash up of threads and domains
[ ]   10    0    0   10 /  500     9.6s Mash up of threads and domains
[ ]   11    0    0   11 /  500    10.9s Mash up of threads and domains
[ ]   14    0    0   14 /  500    13.4s Mash up of threads and domains
[ ]   15    0    0   15 /  500    14.6s Mash up of threads and domains
[ ]   16    0    0   16 /  500    16.0s Mash up of threads and domains
[ ]   17    0    0   17 /  500    16.1s Mash up of threads and domains
[ ]   18    0    0   18 /  500    16.9s Mash up of threads and domains
[ ]   19    0    0   19 /  500    17.2s Mash up of threads and domains
[ ]   20    0    0   20 /  500    17.4s Mash up of threads and domains
[ ]   21    0    0   21 /  500    18.4s Mash up of threads and domains
[ ]   22    0    0   22 /  500    19.5s Mash up of threads and domains
File "src/threadomain/dune", line 15, characters 0-113:
15 | (rule

16 |  (alias runtest)

17 |  (package multicoretests)

18 |  (deps threadomain.exe)

19 |  (action (run ./%{deps} --verbose)))

(cd _build/default/src/threadomain && ./threadomain.exe --verbose)
Command exited with code -1073741819.
[ ]   23    0    0   23 /  500    20.8s Mash up of threads and domains

This is a lot more complex than it should be because:
- even with a `override` opam repository providing packages for the
  OCaml 5 compiler with build instructions compatible with Windows,
  setup-ocaml fails
- many different attempts to build the compiler in a simpler way failed
  without many clues to help (probably because of issues with the PATH,
  which sh is found, or not, to call configure, etc. etc.)
- ocaml-config.3 (upstream opam package) fails to install claiming the
  hashes in the opam package are invalid (?), so the `override` opam
  repository distribute that same package without the hashes
- ocamlfind.1.9.5 as provided by the `default` opam repository doesn’t
  build with OCaml 5 since the Windows patch uses deprecated functions
@shym
Copy link
Collaborator Author

shym commented Nov 16, 2022

I fixed the missing 60s message gap and added to the log the commit of the compiler repository, to track which revision was used when building on trunk.

@jmid
Copy link
Collaborator

jmid commented Nov 16, 2022

Thanks a bunch for getting this working! I'll merge this now 👍
CI-wise of the 6 native runs - there was just 1 one well-known MacOSX install failure

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.

3 participants