From b11da3295cbf3cf8422c99d6b8b69e8791c3772a Mon Sep 17 00:00:00 2001 From: otegami Date: Thu, 27 Nov 2025 10:43:49 +0900 Subject: [PATCH 1/2] Add MSYS2 platform package requirement ## Issue On MSYS2 environments, installing gems that depend on pkgconf might fail because the pkgconf system package cannot be automatically installed. ## Cause The pkg-config gem was missing MSYS2 platform configuration in its system package requirements. Without this, the rubygems-requirements-system gem cannot automatically install the pkgconfg system package on MSYS2 environments. ## Solution Add `system: pkgconf: msys2: pkgconf` to the gemspec requirements. This works with rubygems-requirements-system which supports MSYS2 platform. --- pkg-config.gemspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg-config.gemspec b/pkg-config.gemspec index 01e76bc..48fa2f5 100644 --- a/pkg-config.gemspec +++ b/pkg-config.gemspec @@ -32,5 +32,7 @@ Gem::Specification.new do |spec| spec.files += Dir.glob("lib/**/*.rb") spec.test_files = Dir.glob("test/**/*.rb") + spec.requirements << "system: pkgconf: msys2: pkgconf" + spec.metadata["msys2_mingw_dependencies"] = "pkgconf" end From 66fed8a724591b052e9a5222fa9f295903ba8ada Mon Sep 17 00:00:00 2001 From: otegami Date: Thu, 27 Nov 2025 12:01:27 +0900 Subject: [PATCH 2/2] ci windows: support for MSYS2 environments --- .github/workflows/test.yml | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d3c971..c573d08 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,3 +60,46 @@ jobs: - name: Test run: | bundle exec rake + + windows-msys2: + name: Windows ${{ matrix.msystem }} + runs-on: ${{ matrix.runner }} + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + include: + - msystem: CLANG64 + package-prefix: mingw-w64-clang-x86_64 + runner: windows-latest + - msystem: CLANGARM64 + package-prefix: mingw-w64-clang-aarch64 + runner: windows-11-arm + - msystem: MINGW32 + package-prefix: mingw-w64-i686 + runner: windows-latest + - msystem: MINGW64 + package-prefix: mingw-w64-x86_64 + runner: windows-latest + - msystem: UCRT64 + package-prefix: mingw-w64-ucrt-x86_64 + runner: windows-latest + steps: + - uses: actions/checkout@v6 + - uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.msystem }} + update: true + install: >- + base-devel + ${{ matrix.package-prefix }}-cairo + ${{ matrix.package-prefix }}-ruby + ${{ matrix.package-prefix }}-toolchain + - name: Install dependencies + shell: msys2 {0} + run: | + bundle install + - name: Test + shell: msys2 {0} + run: | + bundle exec rake