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

Clean up the test and its use in CI #137

Merged
merged 9 commits into from
May 31, 2024
Merged

Clean up the test and its use in CI #137

merged 9 commits into from
May 31, 2024

Conversation

shym
Copy link
Contributor

@shym shym commented May 31, 2024

This PR combines a couple of small details that have been nagging me in the test and, partly as a consequence, also in CI.
The main changes are:

  • import a fix to the test programs by Romain and Pierre extracted from Support of OCaml 5.0 (cleaned version) #124/Support OCaml 5.2 #134,
  • deduplicate example and test as they are really the same code (I kept the name example to emphasize its use as documentation, but with the multiple backends of the test, obviously),
  • simplify its dune rules, so that the possibility to test multiple backends is noiseless,
  • test all the backends in the same job as I noticed that in CI runs all the time is spent in the setup, not in the test itself, so it is wasteful not to share one setup to run the tests of all the backends.

I hesitated to break it down into smaller PRs but those changes are fairly tightly coupled so the smaller PRs would have conflicted quite a bit. But that means I could easily drop some of changes this PR proposes.

dinosaure and others added 9 commits May 30, 2024 17:10
The `example` and `test` directories are pretty-much duplicates, with
only the configurability of the backend in the `test` as a notable
difference, so merge them, keeping the configurability from `test` and
the directory name from `example`, as it provides a good documentation
for newcomers
Use dune's ability to interpolate strings with environment variables to
eliminate intermediate files
Use :standard link flags to simplify (and drop non-link) flags
CI time is spent almost entirely on building the compiler and packages
so try out all the backends sequentially in a single job
Normalise the step names on the way
The example should always return 0 with the fix of the missing return
value
@hannesm
Copy link
Member

hannesm commented May 31, 2024

I like the changes, and when CI passes would be happy to merge them! Thanks a lot.

@hannesm hannesm merged commit bd6b8df into mirage:main May 31, 2024
6 checks passed
@shym shym deleted the test-cleanup branch May 31, 2024 11:05
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