There is a problem: ruby from msys2 package was not configured properly, this config may be valid for cygwin, but not for mingw. Thats why users have to bring together ruby build for windows by rubyinstaller (unpacked by choco) and msys2.
PS we don’t need to use complete base-devel mingw-w64-x86_64-toolchain packages, mingw-w64-x86_64-binutils, mingw-w64-x86_64-crt-git, mingw-w64-x86_64-gcc, make will be enough.
Official travis documentation introduced some strange wunderwaffe export msys2 = ...
, it can be replaced by ridk.cmd exec
, because we have to deal with rubyinstaller anyway.
- os: windows
arch: amd64
language: bash # using git bash
before_install:
- choco uninstall mingw -y
- choco upgrade msys2 ruby -y
- ridk.cmd exec pacman --sync --noconfirm --needed
mingw-w64-x86_64-binutils
mingw-w64-x86_64-crt-git
mingw-w64-x86_64-gcc
make
After that you can make gem install json
with extensions successfully.
Using this simple config I’ve added windows testing for small gem ocg. Please checkout the following successful log.