From ceb6b870aeb6e4f4af1e65f2463485146c7e9582 Mon Sep 17 00:00:00 2001 From: edolix Date: Tue, 22 Sep 2026 11:23:25 +0200 Subject: [PATCH 1/3] add support for aarch64 linux and use lib64 if there --- ext/or-tools/vendor.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ext/or-tools/vendor.rb b/ext/or-tools/vendor.rb index f2316ec..75b610f 100644 --- a/ext/or-tools/vendor.rb +++ b/ext/or-tools/vendor.rb @@ -27,7 +27,12 @@ os = os_info["ID"] os_version = os_info["VERSION_ID"] - if os == "ubuntu" && os_version == "24.04" && !arm + # A single aarch64 build is available and is compatible with these distributions + valid_aarch64_distribution = os == "arch" || (os == "ubuntu" && ["24.04", "22.04", "20.04"].include?(os_version)) || (os == "debian" && ["12", "11"].include?(os_version)) + if arm && valid_aarch64_distribution + filename = "or-tools_aarch64_AlmaLinux-8.10_cpp_v#{version}.tar.gz" + checksum = "422320008143611479b05216f3fa4dce65ca9d1a4751a070ecbe3a2ef1ebea4b" + elsif os == "ubuntu" && os_version == "24.04" && !arm filename = "or-tools_amd64_ubuntu-24.04_cpp_v#{version}.tar.gz" checksum = "6f389320672cee00b78aacefb2bde33fef0bb988c3b2735573b9fffd1047fbda" elsif os == "ubuntu" && os_version == "22.04" && !arm @@ -100,10 +105,11 @@ FileUtils.mv(File.join(extract_path, "include"), File.join(path, "include")) # shared library + lib_dir = Dir.exist?(File.join(extract_path, "lib64")) ? "lib64" : "lib" FileUtils.mkdir(File.join(path, "lib")) - Dir.glob("lib/lib*{.dylib,.so,.so.*}", base: extract_path) do |file| + Dir.glob("#{lib_dir}/lib*{.dylib,.so,.so.*}", base: extract_path) do |file| next if file.include?("libprotoc.") - FileUtils.mv(File.join(extract_path, file), File.join(path, file)) + FileUtils.mv(File.join(extract_path, file), File.join(path, "lib", File.basename(file))) end # licenses From 20d9e73716df6cd4ea4f67f0368774b79ba54fb2 Mon Sep 17 00:00:00 2001 From: edolix Date: Tue, 22 Sep 2026 11:23:44 +0200 Subject: [PATCH 2/3] append aarch64_AlmaLinux-8.10 to distributions in rake update --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 3e6d27c..9729b27 100644 --- a/Rakefile +++ b/Rakefile @@ -41,7 +41,8 @@ task :update do "amd64_ubuntu-20.04", "amd64_debian-12", "amd64_debian-11", - "amd64_archlinux" + "amd64_archlinux", + "aarch64_AlmaLinux-8.10" ] short_version = version.split(".").first(2).join(".") From dec68a72a9f5bb081d8b06751cad80666e68ad15 Mon Sep 17 00:00:00 2001 From: edolix Date: Tue, 22 Sep 2026 11:24:07 +0200 Subject: [PATCH 3/3] expand matrix in CI to cover arm as well --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17669e4..22302bf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,8 @@ jobs: - ruby: "4.0" os: ubuntu-24.04 valgrind: true + - ruby: 3.4 + os: ubuntu-24.04-arm - ruby: 3.4 os: macos-26 - ruby: 3.3