diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f4a3de94c..36bcb5166d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -549,9 +549,17 @@ jobs: matrix: sys: ["enable", "disable"] ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby_win) }} + os: [ windows-2022 ] exclude: - ruby: "3.1" # because Ruby 3.1 devkit is built with a version of GCC too old for modern msys2 2025-08 - runs-on: windows-2022 + include: + - os: windows-11-arm + sys: "enable" + ruby: "3.4" + - os: windows-11-arm + sys: "disable" + ruby: "3.4" + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v5 with: @@ -566,6 +574,11 @@ jobs: path: gems - run: ./scripts/test-gem-install gems --${{matrix.sys}}-system-libraries shell: bash + - name: Print mkmf logs if job failed on Windows + if: ${{ failure() && startsWith( matrix.os, 'windows' ) }} + run: | + ridk exec cat C:/hostedtoolcache/windows/Ruby/*/*/lib/ruby/gems/*/extensions/*/*/nokogiri*/mkmf.log + ridk exec gcc -v cruby-package: needs: ["rcd_image_version"] @@ -579,6 +592,7 @@ jobs: - "arm-linux-gnu" - "arm-linux-musl" - "arm64-darwin" + - "aarch64-mingw-ucrt" - "x64-mingw-ucrt" - "x86_64-darwin" - "x86_64-linux-gnu" @@ -712,6 +726,27 @@ jobs: - run: ./scripts/test-gem-install gems shell: bash + cruby-aarch64-mingw-ucrt-install: + needs: ["cruby-package", "ruby_versions"] + strategy: + fail-fast: false + matrix: + ruby: ["3.4"] + runs-on: windows-11-arm + steps: + - uses: actions/checkout@v5 + with: + submodules: true + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "${{matrix.ruby}}" + - uses: actions/download-artifact@v5 + with: + name: cruby-aarch64-mingw-ucrt-gem + path: gems + - run: ./scripts/test-gem-install gems + shell: bash + jruby-package: needs: ["rcd_image_version"] runs-on: ubuntu-latest diff --git a/Gemfile b/Gemfile index ea99313a2c..9f47a29454 100644 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,7 @@ group :development do # building extensions gem "rake-compiler", "1.3.0" - gem "rake-compiler-dock", "1.9.1" + gem "rake-compiler-dock", "1.10.0" # parser generator gem "rexical", "1.0.8" diff --git a/ext/nokogiri/extconf.rb b/ext/nokogiri/extconf.rb index b544bee461..f1a3c0eafe 100644 --- a/ext/nokogiri/extconf.rb +++ b/ext/nokogiri/extconf.rb @@ -550,7 +550,6 @@ def recipe.port_path chdir_for_build { recipe.cook } FileUtils.touch(checkpoint) end - recipe.activate end end diff --git a/misc/native.yml b/misc/native.yml index b8f29dbcbe..304e4a0be6 100644 --- a/misc/native.yml +++ b/misc/native.yml @@ -2,6 +2,7 @@ platforms: - aarch64-linux-gnu - aarch64-linux-musl + - aarch64-mingw-ucrt - arm64-darwin - arm-linux-gnu - arm-linux-musl @@ -14,3 +15,10 @@ rubies: - "3.3" - "3.2" - "3.1" +exclude: + - platform: aarch64-mingw-ucrt + ruby: "3.1" + - platform: aarch64-mingw-ucrt + ruby: "3.2" + - platform: aarch64-mingw-ucrt + ruby: "3.3" diff --git a/rakelib/extensions.rake b/rakelib/extensions.rake index a21e342754..f3f12d6c59 100644 --- a/rakelib/extensions.rake +++ b/rakelib/extensions.rake @@ -51,6 +51,7 @@ CrossRuby = Struct.new(:version, :platform) do (@binutils_prefix ||= case platform when "aarch64-linux-gnu" then "aarch64-linux-gnu-" when "aarch64-linux-musl" then "aarch64-linux-musl-" + when "aarch64-mingw-ucrt" then "aarch64-w64-mingw32-" when "arm-linux-gnu" then "arm-linux-gnueabihf-" when "arm-linux-musl" then "arm-linux-musleabihf-" when "arm64-darwin" then "aarch64-apple-darwin-" @@ -66,6 +67,7 @@ CrossRuby = Struct.new(:version, :platform) do def target_file_format case platform when "aarch64-linux-gnu", "aarch64-linux-musl" then "elf64-littleaarch64" + when "aarch64-mingw-ucrt" then "coff-arm64" when "arm-linux-gnu", "arm-linux-musl" then "elf32-littlearm" when "arm64-darwin" then "Mach-O arm64" when "x64-mingw-ucrt" then "pei-x86-64" @@ -88,6 +90,8 @@ CrossRuby = Struct.new(:version, :platform) do case platform when "x64-mingw-ucrt" "x64-ucrt-ruby#{api_ver_suffix}.dll" + when "aarch64-mingw-ucrt" + "aarch64-ucrt-ruby#{api_ver_suffix}.dll" else raise "CrossRuby.libruby_dll: unmatched platform: #{platform}" end diff --git a/scripts/test-gem-file-contents b/scripts/test-gem-file-contents index 45099dd143..e8453d7203 100755 --- a/scripts/test-gem-file-contents +++ b/scripts/test-gem-file-contents @@ -73,7 +73,11 @@ describe File.basename(gemfile) do let(:native_config) { YAML.load_file(File.join(__dir__, "..", "misc", "native.yml")) } let(:supported_ruby_versions) do - native_config["rubies"] + versions = native_config["rubies"] + native_config["exclude"].each do |h| + versions -= [h["ruby"]] if h["platform"] == gemspec.platform.to_s + end + versions end describe "setup" do