Skip to content

GHA/windows: add GnuTLS job, drop default OpenSSL for Cygwin/MSYS2 jobs - #16629

Closed
vszakats wants to merge 12 commits into
curl:masterfrom
vszakats:mingw-gtls
Closed

vszakats wants to merge 12 commits into
curl:masterfrom
vszakats:mingw-gtls

Conversation

@vszakats

@vszakats vszakats commented Mar 8, 2025 •

Copy link
Copy Markdown
Member

To allow selecting the TLS backend(s) for each individual job.

@vszakats vszakats added TLS Windows Windows-specific CI Continuous Integration labels Mar 8, 2025
@vszakats vszakats changed the title GHA/windows: drop openssl as default for Cygwin/MSYS2, add GnuTLS job GHA/windows: drop OpenSSL as default for Cygwin/MSYS2, add GnuTLS job Mar 8, 2025
@testclutch

This comment was marked as resolved.

@vszakats vszakats changed the title GHA/windows: drop OpenSSL as default for Cygwin/MSYS2, add GnuTLS job GHA/windows: add GnuTLS job, drop default OpenSSL for Cygwin/MSYS2 jobs Mar 9, 2025
@vszakats vszakats closed this in 66313cc Mar 9, 2025
@vszakats
vszakats deleted the mingw-gtls branch March 9, 2025 02:31
vszakats added a commit that referenced this pull request Mar 9, 2025
It fixes test 2302, 2303, 2307 with MSVC and clang on Windows.
GCC Windows builds were not affected.

Failure was caused by stack overflow due to a 1MB+ sized test struct on
stack. Replace it with dynamic allocation.

Also unignore affected tests in GHA/windows.

As seen under WINE with llvm-mingw:
```
$ wine64 libtests.exe lib2302 ws://127.0.0.1:59964/2302 > stdout2302 2> stderr2302
Test: lib2302
URL: ws://127.0.0.1:59964/2302
wine: Unhandled stack overflow at address 000000014007486A (thread 0024), starting debugger...
Unhandled exception: stack overflow in 64-bit code (0x000000014007486a).
```

Ref: #16629 (discovery)
Ref: 1bd5ac9 #16570

Closes #16630
vszakats added a commit that referenced this pull request Apr 1, 2025
To allow making per-job variations for SSH backends.

Also:
- fix Cygwin builds to not ignore per-job `install:` items.
  It worked by accident before this patch.
  Follow-up to 66313cc #16629

Closes #16911
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
To allow selecting the TLS backend(s) for each individual job.

Closes curl#16629
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
It fixes test 2302, 2303, 2307 with MSVC and clang on Windows.
GCC Windows builds were not affected.

Failure was caused by stack overflow due to a 1MB+ sized test struct on
stack. Replace it with dynamic allocation.

Also unignore affected tests in GHA/windows.

As seen under WINE with llvm-mingw:
```
$ wine64 libtests.exe lib2302 ws://127.0.0.1:59964/2302 > stdout2302 2> stderr2302
Test: lib2302
URL: ws://127.0.0.1:59964/2302
wine: Unhandled stack overflow at address 000000014007486A (thread 0024), starting debugger...
Unhandled exception: stack overflow in 64-bit code (0x000000014007486a).
```

Ref: curl#16629 (discovery)
Ref: 1bd5ac9 curl#16570

Closes curl#16630
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
To allow making per-job variations for SSH backends.

Also:
- fix Cygwin builds to not ignore per-job `install:` items.
  It worked by accident before this patch.
  Follow-up to 66313cc curl#16629

Closes curl#16911
vszakats added a commit that referenced this pull request Sep 30, 2026
Each `install:` combination results in a separate (and fairly large)
cache entry. There are ~12 of them before this commit, in the 100-200 MB
size range each. Reduce the number of cache entries by installing
commonly used packages for all jobs. But, each installed package comes
with a size overhead in the cache entry and a significant time to
install them, even if unused in an actual job (because the cache holds
the raw package tarballs, which still need to be installed in each job
run). Thus, keep the list of commonly used packages minimal, and install
the rest of the packages in an separate `pacman` step, without using the
cache. These packages include the build tools (autotools, cmake), and
extra, not commonly used packages that a job may need in addition.

This reduces the number of cache blobs to 4, one per MSYS2 environment,
while a slight, tolerable rise in install times.

Since some packages are now installed, but not intended to be used, we
need to make sure auto-detections don't pick them up. (existing configs
already complied with this.)

Also:
- update logic that relied on the per-package `install:` list to decide
  which SSH backend is used. Use the `config:` line instead.
- tried installing builds tools in the default install list. This turned
  out to cause much overhead in wasted size and install time.

All in all, this balancing act is painful and difficult to maintain, I
wish the MSYS2 Action would cache the _installed_ directory, thus
avoiding the lengthy install step for installed/cached packages. This
would allow to install everything from cache with good performance,
still save bandwidth and server load for MSYS2, while simplifying
things. Pending upstream issue about such feature:
msys2/setup-msys2#575

Slight downside is that mutually exclusive packages cannot be installed,
namely libssh2 vs. libssh2-wincng. Not currently used. In the future
(once the WinCNG stabilizing fix reaches a release) the variants can be
spread across envs to cover both without adding new cache blobs:
```diff
-mingw-w64-${{ matrix.env }}-libssh2
+${{ matrix.env == 'ucrt-x86_64' && format('mingw-w64-{0}-libssh2-wincng', matrix.env) || format('mingw-w64-{0}-libssh2', matrix.env) }}
```

Follow-up to 66313cc #16629

Closes #23155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration tests TLS Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

2 participants