Skip to content

Add CI for MSVC using dkml-workflows - #6540

Merged
nojb merged 7 commits into
ocaml:mainfrom
jonahbeckford:feature-dkmlworkflows-ci
Nov 29, 2022
Merged

nojb merged 7 commits into
ocaml:mainfrom
jonahbeckford:feature-dkmlworkflows-ci

Conversation

@jonahbeckford

Copy link
Copy Markdown
Contributor

Implements #6535

@jonahbeckford
jonahbeckford force-pushed the feature-dkmlworkflows-ci branch from b2bad8c to 9697085 Compare November 22, 2022 02:02
Comment thread CHANGES.md Resolved
Comment thread Makefile Resolved
@rgrinberg

Copy link
Copy Markdown
Member

Would it be possible to remove the stuff that doesn't pertain to msvc?

@jonahbeckford

Copy link
Copy Markdown
Contributor Author

Would it be possible to remove the stuff that doesn't pertain to msvc?

Is "the stuff" talking about the gh-darwin/gh-linux folders? Sure, we can remove files that were generated during dune promote with a Makefile rule. Is that fine?

@rgrinberg

Copy link
Copy Markdown
Member

Yes, that is what I meant. Removing them in a makefile rule is fine

@jonahbeckford
jonahbeckford force-pushed the feature-dkmlworkflows-ci branch from da627ea to 6658c94 Compare November 22, 2022 17:16
@jonahbeckford

Copy link
Copy Markdown
Contributor Author

Yes, that is what I meant. Removing them in a makefile rule is fine

Done.

And I'd like to see how long the MSVC builds take now that they've had a chance to cache some parts.

@rgrinberg

Copy link
Copy Markdown
Member

@nojb can you review please?

@nojb nojb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to confess that I find the amount of generated code a bit scary, but the results are good: the CI jobs (one for 32-bit and one for 64-bit) each take ~10m to complete once the cache is full.

The generated code itself is hard to review, but here are some general questions:

  • What is the version of MSVC targeted?
  • What is the workflow to update the generated files? make update-dkml?
  • What is the required environment to execute the desktop-ci-* targets in the main Makefile?

For the record, could we enumerate somewhere which files are generated and which files are supposed to be maintained by hand? In particular, build-test.sh is hand-written, right?

I am approving based on the general idea that this is an strict improvement on the present situation (no MSVC testing at all).

@jonahbeckford

jonahbeckford commented Nov 23, 2022 •

Copy link
Copy Markdown
Contributor Author

NOTE: Everything below is now in a FAQ in a README in the PR.

  • What is the version of MSVC targeted?

There is no "target" per se. The CI machine (or your developer machine) is queried for all MSVC versions, and any versions that I know to be compatible with OCaml are used. The precise definition is Get-CompatibleVisualStudios at https://github.com/diskuv/dkml-runtime-distribution/blob/main/src/windows/Machine/Machine.psm1; that package is available for common use in the central Opam repository.

The compatible versions today are: Visual Studio 2019 with a) Windows 10 SDK (10.0.18362.0) and b) MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.25) or (v14.26). Machine.psm1 has notes why other MSVC 2019 versions are not compatible with OCaml; very much beyond the scope of this PR though!

More importantly, just running it will show the user what is on their system and what Visual Studio components they are missing (if any).

  • What is the workflow to update the generated files? make update-dkml?

Yes. Obviously assuming there is an update available from opam update.

  • What is the required environment to execute the desktop-ci-* targets in the main Makefile?

Same as first answer.

For the record, could we enumerate somewhere which files are generated and which files are supposed to be maintained by hand? In particular, build-test.sh is hand-written, right?

To make it easy I'll put a README.md in ci/setup-dkml/: only those files are auto-generated.

I'll add in that README a link to https://github.com/diskuv/dkml-workflows#readme (setup-dkml) which a) describes what is hand-generated and what goes into it, and b) includes auto-tested examples and c) implicitly defines a place for bug reports.

jonahbeckford and others added 5 commits November 23, 2022 12:05
Implements ocaml#6535

Signed-off-by: Jonah Beckford <[email protected]>
Signed-off-by: jonahbeckford <[email protected]>
Co-authored-by: Antonio Nuno Monteiro <[email protected]>
Signed-off-by: jonahbeckford <[email protected]>
Signed-off-by: Jonah Beckford <[email protected]>
@jonahbeckford
jonahbeckford force-pushed the feature-dkmlworkflows-ci branch from 6658c94 to 363d8d9 Compare November 23, 2022 20:17
@nojb

nojb commented Nov 24, 2022

Copy link
Copy Markdown
Collaborator

I'll add in that README a link to https://github.com/diskuv/dkml-workflows#readme (setup-dkml) which a) describes what is hand-generated and what goes into it, and b) includes auto-tested examples and c) implicitly defines a place for bug reports.

Thanks, that's good enough for me! I sync'ed your PR with main and if the CI passes, let's merge.

@nojb
nojb merged commit ef58825 into ocaml:main Nov 29, 2022
moyodiallo pushed a commit to moyodiallo/dune that referenced this pull request Dec 2, 2022
Signed-off-by: Jonah Beckford <[email protected]>
Co-authored-by: Antonio Nuno Monteiro <[email protected]>
Co-authored-by: Nicolás Ojeda Bär <[email protected]>
jchavarri added a commit to jchavarri/dune that referenced this pull request Dec 5, 2022
* main: (54 commits)
  doc: how we write `to_dyn` and `equal` (ocaml#6621)
  test(cache): test output of man pages
  test: dune utop for (subdir ..) (ocaml#6629)
  refactor: improve style of utop rules (ocaml#6628)
  test: depend on utop (ocaml#6627)
  refactor(stdune): Add Appendable_list.cons (ocaml#6624)
  doc: tighten wording in README.md
  test: add a repro case for ocaml#6607 (ocaml#6612)
  doc: cleanup status badges in README.md (ocaml#6618)
  doc(README): rewrap paragraphs and cleanup links
  coq: more resilient config query
  fix: link time code gen (ocaml#6606)
  fix(melange): run melc ppx with merlin (ocaml#6476)
  feature(melange): add compile_flags (ocaml#6569)
  refactor: move `modules: Modules.t` from `Dune_package.Lib` to `Lib_info` (ocaml#6605)
  Set CLICOLOR_FORCE=0 (ocaml#6608)
  fix: declare deps for ccomp detection (ocaml#6610)
  refactor: assume Cmdliner.Arg.conv is abstract (ocaml#6609)
  refactor: gen_rules pattern matching (ocaml#6604)
  Add CI for MSVC using dkml-workflows (ocaml#6540)
  ...
@rgrinberg rgrinberg added the windows Issues that relate to Dune on Microsoft Windows label Dec 18, 2022
emillon pushed a commit to emillon/dune that referenced this pull request Dec 20, 2022
Signed-off-by: Jonah Beckford <[email protected]>
Co-authored-by: Antonio Nuno Monteiro <[email protected]>
Co-authored-by: Nicolás Ojeda Bär <[email protected]>
emillon pushed a commit to emillon/dune that referenced this pull request Dec 20, 2022
Signed-off-by: Jonah Beckford <[email protected]>
Co-authored-by: Antonio Nuno Monteiro <[email protected]>
Co-authored-by: Nicolás Ojeda Bär <[email protected]>
Signed-off-by: Etienne Millon <[email protected]>
emillon added a commit that referenced this pull request Dec 20, 2022
Signed-off-by: Jonah Beckford <[email protected]>
Co-authored-by: Antonio Nuno Monteiro <[email protected]>
Co-authored-by: Nicolás Ojeda Bär <[email protected]>
Signed-off-by: Etienne Millon <[email protected]>

Signed-off-by: Jonah Beckford <[email protected]>
Signed-off-by: Etienne Millon <[email protected]>
Co-authored-by: jonahbeckford <[email protected]>
Co-authored-by: Antonio Nuno Monteiro <[email protected]>
Co-authored-by: Nicolás Ojeda Bär <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

windows Issues that relate to Dune on Microsoft Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants