]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
ci: Use pacboy to simplify installation of msys2 packages
authorMartin Storsjö <martin@martin.st>
Tue, 10 Jun 2025 10:28:53 +0000 (13:28 +0300)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 5 Aug 2025 17:38:01 +0000 (19:38 +0200)
See [1] and [2] for reference on using pacboy to simplify installing
mingw packages in msys2. The relevant bit to know is that by
specifying plain package names with a ":p" suffix, in the "pacboy"
section in msys2/setup-msys2, those packages are installed within
the current msys2 environment.

This avoids needing to specify the long package prefix like
"mingw-w64-x86_64". For other environments like "ucrt64", "clang64"
and "clangarm64", the prefix is even longer and less obvious.

[1] https://github.com/msys2/setup-msys2?tab=readme-ov-file#pacboy
[2] https://www.msys2.org/docs/package-naming/#avoiding-writing-long-package-names

.github/workflows/build.yaml

index 6cc7c16faed79d840a39a5c038dd3e762ca95ad1..f012c24d8e5fe1b5052ee0cc2b4ccaebfc921bac 100644 (file)
@@ -173,11 +173,9 @@ jobs:
       matrix:
         include:
           - sys: mingw64
-            env: x86_64
             compiler: gcc
 
           - sys: mingw64
-            env: x86_64
             compiler: clang
             extra_cmake_params: -DENABLE_TESTING=OFF # clang currently triggers warnings with doctest
 
@@ -195,12 +193,13 @@ jobs:
             git
             diffutils
             tar
-            mingw-w64-${{matrix.env}}-toolchain
-            mingw-w64-${{matrix.env}}-cmake
-            mingw-w64-${{matrix.env}}-ninja
-            mingw-w64-${{matrix.env}}-hiredis
-            mingw-w64-${{matrix.env}}-lld
-            mingw-w64-${{matrix.env}}-${{matrix.compiler}}
+          pacboy: >-
+            toolchain:p
+            cmake:p
+            ninja:p
+            hiredis:p
+            lld:p
+            ${{matrix.compiler}}:p
 
       - name: Set up environment
         run: |
@@ -234,7 +233,7 @@ jobs:
         if: failure()
         uses: actions/upload-artifact@v4
         with:
-          name: ${{ matrix.sys}}-${{ matrix.env }}-${{ matrix.compiler }}-testdir.tar.xz
+          name: ${{ matrix.sys }}-${{ matrix.compiler }}-testdir.tar.xz
           path: testdir.tar.xz
 
   build_macos_universal: