From 90732d33e8441d47e702e6427c578819c79de042 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Fri, 13 Dec 2024 15:31:32 -0500 Subject: [PATCH 1/4] dep: update to rake-compiler-dock v1.6.0 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index ee1b2f35638..e441717f860 100644 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,7 @@ group :development do # building extensions gem "rake-compiler", "1.2.8" - gem "rake-compiler-dock", "1.5.2" + gem "rake-compiler-dock", "1.6.0" # parser generator gem "rexical", "1.0.8" From ca91777dda51917509e8beb029b4e1144ba9a726 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 12 Dec 2024 18:50:36 -0500 Subject: [PATCH 2/4] ext: make changes to work with rake-compiler-dock v1.6.0 --- .cross_rubies | 12 ++++++------ rakelib/extensions.rake | 6 ++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.cross_rubies b/.cross_rubies index 211fa1df46a..d92b7110a15 100644 --- a/.cross_rubies +++ b/.cross_rubies @@ -10,9 +10,9 @@ 3.2.0:x64-mingw-ucrt 3.2.0:x86_64-darwin 3.2.0:x86_64-linux -3.3.0:aarch64-linux -3.3.0:arm-linux -3.3.0:arm64-darwin -3.3.0:x64-mingw-ucrt -3.3.0:x86_64-darwin -3.3.0:x86_64-linux +3.3.5:aarch64-linux +3.3.5:arm-linux +3.3.5:arm64-darwin +3.3.5:x64-mingw-ucrt +3.3.5:x86_64-darwin +3.3.5:x86_64-linux diff --git a/rakelib/extensions.rake b/rakelib/extensions.rake index fc37a97a2fb..f662d90a65a 100644 --- a/rakelib/extensions.rake +++ b/rakelib/extensions.rake @@ -64,7 +64,7 @@ CrossRuby = Struct.new(:version, :platform) do when "x64-mingw-ucrt" "x86_64-w64-mingw32-" when "x86_64-linux" - "x86_64-redhat-linux-gnu-" + "x86_64-linux-gnu-" when "aarch64-linux" "aarch64-linux-gnu-" when "x86_64-darwin" @@ -185,9 +185,7 @@ CrossRuby = Struct.new(:version, :platform) do def dll_ref_versions case platform - when X86_LINUX_PLATFORM_REGEX - { "GLIBC" => "2.17" } - when AARCH_LINUX_PLATFORM_REGEX, ARM_LINUX_PLATFORM_REGEX + when AARCH_LINUX_PLATFORM_REGEX, ARM_LINUX_PLATFORM_REGEX, X86_LINUX_PLATFORM_REGEX { "GLIBC" => "2.29" } else raise "CrossRuby.dll_ref_versions: unmatched platform: #{platform}" From 4c15c5c590eeca4a91eb4cf7fe13f117fedcfe37 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Fri, 13 Dec 2024 11:25:11 -0500 Subject: [PATCH 3/4] ext: split the generic linux native gem into -gnu and -musl gems --- .cross_rubies | 27 +++++--- .github/workflows/ci.yml | 27 ++++---- README.md | 5 +- rakelib/extensions.rake | 141 ++++++++++++++++----------------------- 4 files changed, 92 insertions(+), 108 deletions(-) diff --git a/.cross_rubies b/.cross_rubies index d92b7110a15..99a95716b6d 100644 --- a/.cross_rubies +++ b/.cross_rubies @@ -1,18 +1,27 @@ -3.1.0:aarch64-linux -3.1.0:arm-linux +3.1.0:aarch64-linux-gnu +3.1.0:aarch64-linux-musl +3.1.0:arm-linux-gnu +3.1.0:arm-linux-musl 3.1.0:arm64-darwin 3.1.0:x64-mingw-ucrt 3.1.0:x86_64-darwin -3.1.0:x86_64-linux -3.2.0:aarch64-linux -3.2.0:arm-linux +3.1.0:x86_64-linux-gnu +3.1.0:x86_64-linux-musl +3.2.0:aarch64-linux-gnu +3.2.0:aarch64-linux-musl +3.2.0:arm-linux-gnu +3.2.0:arm-linux-musl 3.2.0:arm64-darwin 3.2.0:x64-mingw-ucrt 3.2.0:x86_64-darwin -3.2.0:x86_64-linux -3.3.5:aarch64-linux -3.3.5:arm-linux +3.2.0:x86_64-linux-gnu +3.2.0:x86_64-linux-musl +3.3.5:aarch64-linux-gnu +3.3.5:aarch64-linux-musl +3.3.5:arm-linux-gnu +3.3.5:arm-linux-musl 3.3.5:arm64-darwin 3.3.5:x64-mingw-ucrt 3.3.5:x86_64-darwin -3.3.5:x86_64-linux +3.3.5:x86_64-linux-gnu +3.3.5:x86_64-linux-musl diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 714c98da15c..14639da2bcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -481,7 +481,7 @@ jobs: path: ports/archives key: tarballs-ubuntu-${{hashFiles('dependencies.yml', 'patches/**/*.patch')}} - env: - DOCKER_IMAGE: "ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.rcd_image_version.outputs.rcd_image_version}}-mri-x86_64-linux" + DOCKER_IMAGE: "ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.rcd_image_version.outputs.rcd_image_version}}-mri-x86_64-linux-gnu" run: | docker run --rm -v "$(pwd):/nokogiri" -w /nokogiri \ ${DOCKER_IMAGE} \ @@ -565,12 +565,15 @@ jobs: fail-fast: false matrix: plat: - - "aarch64-linux" - - "arm-linux" + - "aarch64-linux-gnu" + - "aarch64-linux-musl" + - "arm-linux-gnu" + - "arm-linux-musl" - "arm64-darwin" - "x64-mingw-ucrt" - "x86_64-darwin" - - "x86_64-linux" + - "x86_64-linux-gnu" + - "x86_64-linux-musl" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -592,7 +595,7 @@ jobs: path: gems retention-days: 1 - cruby-aarch64-linux-install: + cruby-aarch64-linux-gnu-install: needs: ["cruby-package", "ruby_versions"] strategy: fail-fast: false @@ -605,7 +608,7 @@ jobs: submodules: true - uses: actions/download-artifact@v4 with: - name: cruby-aarch64-linux-gem + name: cruby-aarch64-linux-gnu-gem path: gems - run: | docker run --rm --privileged multiarch/qemu-user-static --reset -p yes @@ -614,7 +617,7 @@ jobs: ruby:${{matrix.ruby}} \ ./scripts/test-gem-install gems - cruby-arm-linux-install: + cruby-arm-linux-gnu-install: needs: ["cruby-package", "ruby_versions"] strategy: fail-fast: false @@ -627,7 +630,7 @@ jobs: submodules: true - uses: actions/download-artifact@v4 with: - name: cruby-arm-linux-gem + name: cruby-arm-linux-gnu-gem path: gems - run: | docker run --rm --privileged multiarch/qemu-user-static --reset -p yes @@ -636,7 +639,7 @@ jobs: ruby:${{matrix.ruby}} \ ./scripts/test-gem-install gems - cruby-x86_64-linux-install: + cruby-x86_64-linux-gnu-install: needs: ["cruby-package", "ruby_versions"] strategy: fail-fast: false @@ -652,11 +655,11 @@ jobs: ruby-version: "${{matrix.ruby}}" - uses: actions/download-artifact@v4 with: - name: cruby-x86_64-linux-gem + name: cruby-x86_64-linux-gnu-gem path: gems - run: ./scripts/test-gem-install gems - cruby-x86_64-musl-install: + cruby-x86_64-linux-musl-install: needs: ["cruby-package"] strategy: fail-fast: false @@ -669,7 +672,7 @@ jobs: submodules: true - uses: actions/download-artifact@v4 with: - name: cruby-x86_64-linux-gem + name: cruby-x86_64-linux-musl-gem path: gems - run: ./scripts/test-gem-install gems diff --git a/README.md b/README.md index 1ec023dd4e0..df466f4a832 100644 --- a/README.md +++ b/README.md @@ -131,9 +131,8 @@ If you are compiling the native extension against a system version of libxml2: Nokogiri ships pre-compiled, "native" gems for the following platforms: - Linux: - - `x86_64-linux` (req: `glibc >= 2.17`) - - `aarch64-linux` and `arm-linux` (req: `glibc >= 2.29`) - - Note that musl platforms like Alpine **are** supported + - `x86_64-linux-gnu`, `aarch64-linux-gnu`, and `arm-linux-gnu` (req: `glibc >= 2.29`) + - `x86_64-linux-musl`, `aarch64-linux-musl`, and `arm-linux-musl` - Darwin/MacOS: `x86_64-darwin` and `arm64-darwin` - Windows: `x64-mingw-ucrt` - Java: any platform running JRuby 9.4 or higher diff --git a/rakelib/extensions.rake b/rakelib/extensions.rake index f662d90a65a..232291c354a 100644 --- a/rakelib/extensions.rake +++ b/rakelib/extensions.rake @@ -4,14 +4,17 @@ require "rbconfig" require "shellwords" CrossRuby = Struct.new(:version, :platform) do - WINDOWS_PLATFORM_REGEX = /mingw|mswin/ - MINGWUCRT_PLATFORM_REGEX = /mingw-ucrt/ - MINGW32_PLATFORM_REGEX = /mingw32/ LINUX_PLATFORM_REGEX = /linux/ - X86_LINUX_PLATFORM_REGEX = /x86.*linux/ - AARCH_LINUX_PLATFORM_REGEX = /aarch.*linux/ - ARM_LINUX_PLATFORM_REGEX = /arm-linux/ DARWIN_PLATFORM_REGEX = /darwin/ + WINDOWS_PLATFORM_REGEX = /mingw|mswin/ + + X86_64_LINUX_GNU_PLATFORM_REGEX = /x86.*linux-gnu$/ + X86_64_LINUX_MUSL_PLATFORM_REGEX = /x86.*linux-musl$/ + AARCH64_LINUX_GNU_PLATFORM_REGEX = /aarch.*linux-gnu$/ + AARCH64_LINUX_MUSL_PLATFORM_REGEX = /aarch.*linux-musl$/ + ARM_LINUX_GNU_PLATFORM_REGEX = /arm-linux-gnu$/ + ARM_LINUX_MUSL_PLATFORM_REGEX = /arm-linux-musl$/ + MINGWUCRT_PLATFORM_REGEX = /mingw-ucrt/ def windows? !!(platform =~ WINDOWS_PLATFORM_REGEX) @@ -42,37 +45,17 @@ CrossRuby = Struct.new(:version, :platform) do end end - def host - @host ||= case platform - when "x64-mingw-ucrt" - "x86_64-w64-mingw32" - when "x86_64-linux" - "x86_64-linux-gnu" - when "aarch64-linux" - "aarch64-linux" - when "x86_64-darwin" - "x86_64-darwin" - when "arm64-darwin" - "aarch64-darwin" - else - raise "CrossRuby.platform: unsupported platform: #{platform}" - end - end - def tool(name) (@binutils_prefix ||= case platform - when "x64-mingw-ucrt" - "x86_64-w64-mingw32-" - when "x86_64-linux" - "x86_64-linux-gnu-" - when "aarch64-linux" - "aarch64-linux-gnu-" - when "x86_64-darwin" - "x86_64-apple-darwin-" - when "arm64-darwin" - "aarch64-apple-darwin-" - when "arm-linux" - "arm-linux-gnueabihf-" + when "aarch64-linux-gnu" then "aarch64-linux-gnu-" + when "aarch64-linux-musl" then "aarch64-linux-musl-" + when "arm-linux-gnu" then "arm-linux-gnueabihf-" + when "arm-linux-musl" then "arm-linux-musleabihf-" + when "arm64-darwin" then "aarch64-apple-darwin-" + when "x64-mingw-ucrt" then "x86_64-w64-mingw32-" + when "x86_64-darwin" then "x86_64-apple-darwin-" + when "x86_64-linux-gnu" then "x86_64-linux-gnu-" + when "x86_64-linux-musl" then "x86_64-unknown-linux-musl-" else raise "CrossRuby.tool: unmatched platform: #{platform}" end) + name @@ -80,18 +63,12 @@ CrossRuby = Struct.new(:version, :platform) do def target_file_format case platform - when "x64-mingw-ucrt" - "pei-x86-64" - when "x86_64-linux" - "elf64-x86-64" - when "aarch64-linux" - "elf64-littleaarch64" - when "x86_64-darwin" - "Mach-O 64-bit x86-64" # hmm - when "arm64-darwin" - "Mach-O arm64" - when "arm-linux" - "elf32-littlearm" + when "aarch64-linux-gnu", "aarch64-linux-musl" then "elf64-littleaarch64" + 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" + when "x86_64-darwin" then "Mach-O 64-bit x86-64" # hmm + when "x86_64-linux-gnu", "x86_64-linux-musl" then "elf64-x86-64" else raise "CrossRuby.target_file_format: unmatched platform: #{platform}" end @@ -116,37 +93,17 @@ CrossRuby = Struct.new(:version, :platform) do def allowed_dlls case platform - when MINGW32_PLATFORM_REGEX + when DARWIN_PLATFORM_REGEX [ - "advapi32.dll", - "bcrypt.dll", - "kernel32.dll", - "msvcrt.dll", - "user32.dll", - "ws2_32.dll", - libruby_dll, + "/usr/lib/libSystem.B.dylib", + "/usr/lib/liblzma.5.dylib", + "/usr/lib/libobjc.A.dylib", ] - when MINGWUCRT_PLATFORM_REGEX + when X86_64_LINUX_MUSL_PLATFORM_REGEX, ARM_LINUX_MUSL_PLATFORM_REGEX, AARCH64_LINUX_MUSL_PLATFORM_REGEX [ - "advapi32.dll", - "bcrypt.dll", - "api-ms-win-crt-convert-l1-1-0.dll", - "api-ms-win-crt-environment-l1-1-0.dll", - "api-ms-win-crt-filesystem-l1-1-0.dll", - "api-ms-win-crt-heap-l1-1-0.dll", - "api-ms-win-crt-locale-l1-1-0.dll", - "api-ms-win-crt-math-l1-1-0.dll", - "api-ms-win-crt-private-l1-1-0.dll", - "api-ms-win-crt-runtime-l1-1-0.dll", - "api-ms-win-crt-stdio-l1-1-0.dll", - "api-ms-win-crt-string-l1-1-0.dll", - "api-ms-win-crt-time-l1-1-0.dll", - "api-ms-win-crt-utility-l1-1-0.dll", - "kernel32.dll", - "ws2_32.dll", - libruby_dll, + "libc.so", ] - when X86_LINUX_PLATFORM_REGEX + when X86_64_LINUX_GNU_PLATFORM_REGEX [ "libc.so.6", "libdl.so.2", # on old dists only - now in libc @@ -154,7 +111,7 @@ CrossRuby = Struct.new(:version, :platform) do ].tap do |dlls| dlls << "libpthread.so.0" if ver >= "3.2.0" end - when AARCH_LINUX_PLATFORM_REGEX + when AARCH64_LINUX_GNU_PLATFORM_REGEX [ "ld-linux-aarch64.so.1", "libc.so.6", @@ -163,21 +120,35 @@ CrossRuby = Struct.new(:version, :platform) do ].tap do |dlls| dlls << "libpthread.so.0" if ver >= "3.2.0" end - when DARWIN_PLATFORM_REGEX - [ - "/usr/lib/libSystem.B.dylib", - "/usr/lib/liblzma.5.dylib", - "/usr/lib/libobjc.A.dylib", - ] - when ARM_LINUX_PLATFORM_REGEX + when ARM_LINUX_GNU_PLATFORM_REGEX [ "ld-linux-armhf.so.3", - "libc.so.6", + "libc.so.6", "libc.so", # glibc and musl "libdl.so.2", "libm.so.6", ].tap do |dlls| dlls << "libpthread.so.0" if ver >= "3.2.0" end + when MINGWUCRT_PLATFORM_REGEX + [ + "advapi32.dll", + "bcrypt.dll", + "api-ms-win-crt-convert-l1-1-0.dll", + "api-ms-win-crt-environment-l1-1-0.dll", + "api-ms-win-crt-filesystem-l1-1-0.dll", + "api-ms-win-crt-heap-l1-1-0.dll", + "api-ms-win-crt-locale-l1-1-0.dll", + "api-ms-win-crt-math-l1-1-0.dll", + "api-ms-win-crt-private-l1-1-0.dll", + "api-ms-win-crt-runtime-l1-1-0.dll", + "api-ms-win-crt-stdio-l1-1-0.dll", + "api-ms-win-crt-string-l1-1-0.dll", + "api-ms-win-crt-time-l1-1-0.dll", + "api-ms-win-crt-utility-l1-1-0.dll", + "kernel32.dll", + "ws2_32.dll", + libruby_dll, + ] else raise "CrossRuby.allowed_dlls: unmatched platform: #{platform}" end @@ -185,7 +156,9 @@ CrossRuby = Struct.new(:version, :platform) do def dll_ref_versions case platform - when AARCH_LINUX_PLATFORM_REGEX, ARM_LINUX_PLATFORM_REGEX, X86_LINUX_PLATFORM_REGEX + when X86_64_LINUX_MUSL_PLATFORM_REGEX, ARM_LINUX_MUSL_PLATFORM_REGEX, AARCH64_LINUX_MUSL_PLATFORM_REGEX + {} + when X86_64_LINUX_GNU_PLATFORM_REGEX, ARM_LINUX_GNU_PLATFORM_REGEX, AARCH64_LINUX_GNU_PLATFORM_REGEX { "GLIBC" => "2.29" } else raise "CrossRuby.dll_ref_versions: unmatched platform: #{platform}" From 3c0d202fc50403dae0b3a7af58acf3210513f373 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Fri, 13 Dec 2024 11:41:10 -0500 Subject: [PATCH 4/4] ci: expand linux native install test to include all musl platforms Also: - matrix the linux and darwin native install tests - add a "install on setup-ruby" test - some general CI cleanup --- .github/workflows/ci.yml | 131 ++++++++++++++------------------------- 1 file changed, 48 insertions(+), 83 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14639da2bcf..e24d98c5603 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -480,11 +480,9 @@ jobs: with: path: ports/archives key: tarballs-ubuntu-${{hashFiles('dependencies.yml', 'patches/**/*.patch')}} - - env: - DOCKER_IMAGE: "ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.rcd_image_version.outputs.rcd_image_version}}-mri-x86_64-linux-gnu" - run: | + - run: | docker run --rm -v "$(pwd):/nokogiri" -w /nokogiri \ - ${DOCKER_IMAGE} \ + ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.rcd_image_version.outputs.rcd_image_version}}-mri-x86_64-linux-gnu \ ./scripts/test-gem-build gems ruby - uses: actions/upload-artifact@v4 with: @@ -583,11 +581,9 @@ jobs: with: path: ports/archives key: tarballs-ubuntu-${{hashFiles('dependencies.yml', 'patches/**/*.patch')}} - - env: - DOCKER_IMAGE: "ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.rcd_image_version.outputs.rcd_image_version}}-mri-${{matrix.plat}}" - run: | + - run: | docker run --rm -v "$(pwd):/nokogiri" -w /nokogiri \ - ${DOCKER_IMAGE} \ + ghcr.io/rake-compiler/rake-compiler-dock-image:${{needs.rcd_image_version.outputs.rcd_image_version}}-mri-${{matrix.plat}} \ ./scripts/test-gem-build gems ${{matrix.plat}} - uses: actions/upload-artifact@v4 with: @@ -595,51 +591,7 @@ jobs: path: gems retention-days: 1 - cruby-aarch64-linux-gnu-install: - needs: ["cruby-package", "ruby_versions"] - strategy: - fail-fast: false - matrix: - ruby: ${{ fromJSON(needs.ruby_versions.outputs.minors) }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - uses: actions/download-artifact@v4 - with: - name: cruby-aarch64-linux-gnu-gem - path: gems - - run: | - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - docker run --rm -v "$(pwd):/nokogiri" -w /nokogiri \ - --platform=linux/arm64/v8 \ - ruby:${{matrix.ruby}} \ - ./scripts/test-gem-install gems - - cruby-arm-linux-gnu-install: - needs: ["cruby-package", "ruby_versions"] - strategy: - fail-fast: false - matrix: - ruby: ${{ fromJSON(needs.ruby_versions.outputs.minors) }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - uses: actions/download-artifact@v4 - with: - name: cruby-arm-linux-gnu-gem - path: gems - - run: | - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - docker run --rm -v "$(pwd):/nokogiri" -w /nokogiri \ - --platform=linux/arm/v7 \ - ruby:${{matrix.ruby}} \ - ./scripts/test-gem-install gems - - cruby-x86_64-linux-gnu-install: + cruby-install-with-setup-ruby: needs: ["cruby-package", "ruby_versions"] strategy: fail-fast: false @@ -659,60 +611,73 @@ jobs: path: gems - run: ./scripts/test-gem-install gems - cruby-x86_64-linux-musl-install: - needs: ["cruby-package"] - strategy: - fail-fast: false - runs-on: ubuntu-latest - container: - image: ghcr.io/sparklemotion/nokogiri-test:alpine - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - uses: actions/download-artifact@v4 - with: - name: cruby-x86_64-linux-musl-gem - path: gems - - run: ./scripts/test-gem-install gems - - cruby-x86_64-darwin-install: + cruby-linux-install-matrix: needs: ["cruby-package", "ruby_versions"] + name: "cruby-${{ matrix.platform }}-install (${{ matrix.ruby }})" strategy: fail-fast: false matrix: + platform: + - aarch64-linux-gnu + - aarch64-linux-musl + - arm-linux-gnu + - arm-linux-musl + - x86_64-linux-gnu + - x86_64-linux-musl ruby: ${{ fromJSON(needs.ruby_versions.outputs.minors) }} - runs-on: macos-13 + include: + # declare docker image for each platform + - { platform: aarch64-linux-musl, docker_tag: "-alpine", bootstrap: "apk add bash build-base &&" } + - { platform: arm-linux-musl, docker_tag: "-alpine", bootstrap: "apk add bash build-base &&" } + - { platform: x86_64-linux-musl, docker_tag: "-alpine", bootstrap: "apk add bash build-base &&" } + # declare docker platform for each platform + - { platform: aarch64-linux-gnu, docker_platform: "--platform=linux/arm64/v8" } + - { platform: aarch64-linux-musl, docker_platform: "--platform=linux/arm64/v8" } + - { platform: arm-linux-gnu, docker_platform: "--platform=linux/arm/v7" } + - { platform: arm-linux-musl, docker_platform: "--platform=linux/arm/v7" } + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: true - - uses: ruby/setup-ruby@v1 - with: - ruby-version: "${{matrix.ruby}}" - uses: actions/download-artifact@v4 with: - name: cruby-x86_64-darwin-gem + name: cruby-${{ matrix.platform }}-gem path: gems - - run: ./scripts/test-gem-install gems - - cruby-arm64-darwin-install: + - run: | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + docker run --rm -v $PWD:/nokogiri -w /nokogiri \ + ${{ matrix.docker_platform }} ruby:${{ matrix.ruby }}${{ matrix.docker_tag }} \ + sh -c " + ${{ matrix.bootstrap }} + ${{ matrix.rubyenv }} + ./scripts/test-gem-install gems + " + + cruby-darwin-install-matrix: needs: ["cruby-package", "ruby_versions"] + name: "cruby-${{ matrix.platform }}-install (${{ matrix.ruby }})" strategy: fail-fast: false matrix: + platform: + - arm64-darwin + - x86_64-darwin ruby: ${{ fromJSON(needs.ruby_versions.outputs.minors) }} - runs-on: macos-14 + include: + - { platform: arm64-darwin, os: macos-14 } + - { platform: x86_64-darwin, os: macos-13 } + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 with: submodules: true - uses: ruby/setup-ruby@v1 with: - ruby-version: "${{matrix.ruby}}" + ruby-version: "${{ matrix.ruby }}" - uses: actions/download-artifact@v4 with: - name: cruby-arm64-darwin-gem + name: cruby-${{ matrix.platform }}-gem path: gems - run: ./scripts/test-gem-install gems @@ -771,6 +736,6 @@ jobs: name: jruby-gem path: gems - run: | - docker run --rm -v "$(pwd):/nokogiri" -w /nokogiri \ + docker run --rm -v "$PWD:/nokogiri" -w /nokogiri \ jruby:${{matrix.jruby}}-jre${{matrix.jre}} \ ./scripts/test-gem-install gems