From c77346b035bf645cffc99fba65089233f61a8d59 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Mon, 11 Mar 2024 16:31:49 +0900 Subject: [PATCH] CI: Use the latest available Red Arrow (#71) fix #70 --- Gemfile | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index cf1c9c4..0ece4b1 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ # -*- ruby -*- # -# Copyright 2022-2023 Sutou Kouhei +# Copyright 2022-2024 Sutou Kouhei # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,24 @@ source "https://rubygems.org/" +# Use the version of red-arrow based on the available arrow-glib version +red_arrow_version = ">= 0" +IO.pipe do |input, output| + begin + pid = spawn("pkg-config", "--modversion", "arrow-glib", + out: output, + err: File::NULL) + output.close + _, status = Process.waitpid2(pid) + if status.success? + arrow_glib_version = input.read.strip.sub(/-SNAPSHOT\z/, "").strip + red_arrow_version = "<= #{arrow_glib_version}" + end + rescue SystemCallError + end +end + gem "rake" -gem "red-arrow" -gem "red-parquet" +gem "red-arrow", red_arrow_version +gem "red-parquet", red_arrow_version gem "test-unit"