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

CI(OSGeo4w): Sort and split msys packages into separate lines #4747

Merged
merged 3 commits into from
Dec 5, 2024

Conversation

echoix
Copy link
Member

@echoix echoix commented Nov 23, 2024

In the numerous times I've rebased and merged branches containing changes to the msys2 packages used, it has always been hard to follow what changed and always causing conflicts.

This PR splits the package list into separate lines, and are sorted. Just like the action's readme, it uses >- instead of | or |- to collapse newlines together with spaces (it's a yaml-defined feature, useful in GitHub Actions).
It also makes use of the pacboy: input. This allows to avoid using long, repetitive package prefixes. Without any prefixes, the pacboy wrapper script rewrites package names according to the current environment used before forwarding it to pacman. (The page https://www.msys2.org/docs/package-naming/#avoiding-writing-long-package-names is outdated since msys2/pactoys#6 was merged in may 2024).

This makes our package list environment-independent, so in theory that part of our CI is ready for an eventual switch to any of the other 4 msys2 envs, like UCRT64 for example, or a matrix strategy testing them all out. https://www.msys2.org/docs/environments/#overview

The time used is about the same between using pacboy or not (I cannot tell a difference as runner speed variation can account for these < 5-8 seconds difference I see). Cache with or without pacboy, and no cache with or without pacboy are similar, so pacboy isn't a factor here. Only easier to read.

The suffix `:p` means to install for the current env only (MINGW_PACKAGE_PREFIX). This allows to have the same package name for different msys2 environments
Not needed since msys2/pactoys#6 changed the defaults when no suffix, and doesn't install for `mingw32` and `mingw64` anymore, only for the current env
@github-actions github-actions bot added the CI Continuous integration label Nov 23, 2024
@echoix echoix requested a review from ninsbl November 25, 2024 18:06
@echoix echoix requested a review from nilason December 3, 2024 02:53
Copy link
Member

@neteler neteler left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@echoix echoix merged commit 603b4e5 into OSGeo:main Dec 5, 2024
27 checks passed
@github-actions github-actions bot added this to the 8.5.0 milestone Dec 5, 2024
@echoix echoix deleted the sort-msys2-packages-pacboy branch December 27, 2024 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants