GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.)#14013
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.)#14013dra27 merged 12 commits intoocaml:trunkfrom
Conversation
|
Example on my fork with the two labels applied - dra27#195 (I won’t add the new labels here until we’ve agreed both that we want to do it and on the names!) |
There was a problem hiding this comment.
I like all these changes. I appreciate how the configure arguments are now handled, and the introduction of the config job. I made a minor suggestion on the C code.
I'm a bit puzzled by the double comments: why are // # needed in all these lines?
I'm tempted to suggest to switch to a list of arches in the build matrix: instead of having x86_64: [true, false], we could have arch: ['x86', 'x86_64'], which I find cleaner; and in the future arm64!
The label run-cygwin-tests was introduced in my previous attempt, it can be removed.
ocamltest/run_stubs.c
Outdated
| int i = 0; | ||
| LUID_AND_ATTRIBUTES* privilege = process_privileges->Privileges; | ||
|
|
||
| while (i++ < process_privileges->PrivilegeCount) { |
There was a problem hiding this comment.
| int i = 0; | |
| LUID_AND_ATTRIBUTES* privilege = process_privileges->Privileges; | |
| while (i++ < process_privileges->PrivilegeCount) { | |
| LUID_AND_ATTRIBUTES* privilege = process_privileges->Privileges; | |
| for (int i = 0; i < process_privileges->PrivilegeCount; i++) { |
Is there a reason you didn't opt for the for loop?
There was a problem hiding this comment.
Hah - because it was adapted from this in #8797:
/* Search for SeRestorePrivilege */
while (i < privs->PrivilegeCount
&& (privilege->Luid.HighPart != privilege_luid.HighPart
|| privilege->Luid.LowPart != privilege_luid.LowPart)) {
i++;
privilege++;
}(I can't resist the temptation to say "Luxury! When I were a lad we didn't have any of these 'ere for loops!")
Ah, that's because my editor doesn't recognise TypeScript embedded in YAML! 🫣 |
It is needed on Cygwin.
Define the matrix for the others job using an actions/github-script step, which allows the possibility of the matrix being dynamic.
Tests a full `--disable-shared` build on Linux and also a Linux build with as many options disabled as possible (as the minimal build in the other-configs job on Jenkins also does). The matrix is expanded by adding the 'CI: Full matrix' label to a pull request.
If Cygwin is running "elevated" - which it is in CI - then it acts as though it's running as root. It intentionally activates SeBackupPrivilege, which thwarts the test_create_cursor_failures.ml test. The OCaml testsuite will never require root privileges for anything meaningful, so ocamltest on Cygwin simply drops the SeBackupPrivilege when running on Cygwin, which means the test correctly fails.
|
I pushed an extra commit trying out the |
Yes, yes, the filename -msvc.yml has become a bit out of date...
Applying this label _before_ the testsuite has started in either GitHub Actions or AppVeyor will cause the execution of the testsuite to be skipped.
|
I've renamed the |
|
Is it expected for one of the GHA jobs to be named EDIT: ah nevermind, it's in the "ThreadSanitizer" sub-category |
|
That’s something I hope to deal with when they all get merged - the semantics of an empty or a skipped matrix are a bit meh! |
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
GHA: add an optional wider test matrix (Cygwin, static, minimal, etc.) (cherry picked from commit 96b56fd)
This adds a couple of things I've been using over on my fork for Relocatable OCaml for the last few months:
CI: Full matrixlabel--disable-sharedjob on LinuxCI: Skip testsuitelabelI've pulled in and updated the documentation improvements from #13996 and also the fix to
tools/check-symbol-namesas my version hadn't originally been calling that. Unlike in #13996, I opted to fix thetest_create_cursor_failures.mltest, as the failure was for the same reason as the i386 run originally in #13419. To do, I've adapted a fix in the style of #8797 inocamltestonly.I've included comments in the YAML for the part which generates the matrix, but note that the workflow here is to avoid re-running either of the build workflows automatically if the labels are added/removed - the idea is to re-run the config job in each workflow manually if the labels have been changed. There's more merging work with these workflows to do in the future, but I think this is a reasonable step forward...