Skip to content

Commit 6d77443

Browse files
committed
Fix errors building Ruby 3.1 on windows
Drop testing system libraries for Ruby 3.1 because devkit is built with a version of GCC that isn't compatible with modern msys2. The error, on both syslib-enabled and -disabled Ruby 3.1 builds: pacman.exe -Sy --noconfirm --noprogressbar --needed --disable-download-timeout mingw-w64-ucrt-x86_64-libxml2 mingw-w64-ucrt-x86_64-libxslt looking for conflicting packages... error: failed to prepare transaction (could not satisfy dependencies) :: installing mingw-w64-ucrt-x86_64-gcc-libs (15.2.0-8) breaks dependency 'mingw-w64-ucrt-x86_64-gcc-libs=14.2.0-3' required by mingw-w64-ucrt-x86_64-gcc Error: Command failed: pacman.exe -Sy --noconfirm --noprogressbar --needed --disable-download-timeout mingw-w64-ucrt-x86_64-libxml2 mingw-w64-ucrt-x86_64-libxslt (cherry picked from commit ae334cd)
1 parent 9f14ab0 commit 6d77443

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@ jobs:
328328
matrix:
329329
sys: ["enable", "disable"]
330330
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby_win) }}
331+
exclude:
332+
- sys: "enable"
333+
ruby: "3.1" # because Ruby 3.1 devkit is built with a version of GCC too old for modern msys2 2025-08
331334
runs-on: windows-2022
332335
steps:
333336
- name: configure git crlf
@@ -340,7 +343,7 @@ jobs:
340343
- uses: ruby/setup-ruby-pkgs@v1
341344
with:
342345
ruby-version: "${{matrix.ruby}}"
343-
mingw: "libxml2 libxslt"
346+
mingw: ${{ matrix.ruby == '3.1' && ' ' || 'libxml2 libxslt' }} # '' is falsey, ' ' is truthy
344347
bundler-cache: true
345348
bundler: latest
346349
- uses: actions/cache@v4
@@ -551,6 +554,9 @@ jobs:
551554
matrix:
552555
sys: ["enable", "disable"]
553556
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby_win) }}
557+
exclude:
558+
- sys: "enable"
559+
ruby: "3.1" # because Ruby 3.1 devkit is built with a version of GCC too old for modern msys2 2025-08
554560
runs-on: windows-2022
555561
steps:
556562
- uses: actions/checkout@v4
@@ -559,7 +565,7 @@ jobs:
559565
- uses: ruby/setup-ruby-pkgs@v1
560566
with:
561567
ruby-version: "${{matrix.ruby}}"
562-
mingw: "libxml2 libxslt"
568+
mingw: ${{ matrix.ruby == '3.1' && ' ' || 'libxml2 libxslt' }} # '' is falsey, ' ' is truthy
563569
- uses: actions/download-artifact@v4
564570
with:
565571
name: generic-gem

0 commit comments

Comments
 (0)