Repository navigation
Conversation
|
After looking at thousands of job logs I have to realise that I don't Need to give a second attempt at this. After dropping the |
4833a4d to
55ca357
Compare
|
What may be happening is that the cache holds the package Meaning it's saving bandwidth and server load, but not saving I wonder if it'd be possible to cache the msys64 directory (without It also means that each individual installed package have edit: related Issue: msys2/setup-msys2#575 |
55ca357 to
2ed5f57
Compare
786986e to
ea73f56
Compare
ea73f56 to
a8a025a
Compare
5ee5ac6 to
eaf9624
Compare
|
FTR I find it surprising that installing This inflates the total downladed/installed size significantly. There must On a minor note, MSYS2 CMake doesn't pull in ninja, while the mingw |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The autotools path omits the required unprefixed make package.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Refactors Windows MSYS2 package installation to reduce cache entries while preserving job-specific dependencies.
Changes:
- Consolidates common packages per MSYS2 environment.
- Installs build tools and job-specific dependencies separately.
- Uses configuration flags to identify the SSH backend.
| File | Description |
|---|---|
.github/workflows/windows.yml |
Updates MSYS2 caching, prerequisite installation, and SSH test configuration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
After this patch these are the 4 cache entries (also reduced in size): |
Caching packages is expensive with msys2/setup-msys2, because cached packages all need to be installed after restore. Before this patch, to make installs as fast as possible, only a common set of packages were cached, and the rest installed from the MSYS2 repo servers (e.g. autotools or cmake). But, repo servers are struggling, so to avoid using them and possibly failing due to them, replace this with caching everything. This makes installs 5-15 seconds slower per job, for 10 jobs. In jobs running tests, msys openssh is still installed directly. If this causes an issue, it can be included in the cached set in a future PR. To avoid: ``` error: failed retrieving file 'mingw-w64-clang-aarch64-libarchive-3.8.9-6-any.pkg.tar.zst.sig' from ftp2.osuosl.org : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds ``` Ref: https://github.com/curl/curl/actions/runs/43029014875/job/130550970045#step:5:47 Also: - optimize slow clang-aarch64 install by omitting unused autotools. To keep install times the same as before this patch. - stop installing openssh for torture job, it's unused. Follow-up to 2643f5e #23864 - make msys openssh selection explicit (for tests). - cached entry size changes: 86/92/140/150 -> 100/120/140/160 in MB. Number of cache entries is unchanged. Bug: #23864 (comment) Ref: msys2/msys2-main-server#79 Follow-up to 2643f5e #23864 Follow-up to 5e654e2 #23155 Closes #23906

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
pacmanstep, without using thecache. 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:
install:list to decidewhich SSH backend is used. Use the
config:line instead.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:
Follow-up to 66313cc #16629