Skip to content

Commit c77346b

Browse files
authored
CI: Use the latest available Red Arrow (#71)
fix #70
1 parent 3728c3f commit c77346b

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

Gemfile

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- ruby -*-
22
#
3-
# Copyright 2022-2023 Sutou Kouhei <kou@clear-code.com>
3+
# Copyright 2022-2024 Sutou Kouhei <kou@clear-code.com>
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -16,7 +16,24 @@
1616

1717
source "https://rubygems.org/"
1818

19+
# Use the version of red-arrow based on the available arrow-glib version
20+
red_arrow_version = ">= 0"
21+
IO.pipe do |input, output|
22+
begin
23+
pid = spawn("pkg-config", "--modversion", "arrow-glib",
24+
out: output,
25+
err: File::NULL)
26+
output.close
27+
_, status = Process.waitpid2(pid)
28+
if status.success?
29+
arrow_glib_version = input.read.strip.sub(/-SNAPSHOT\z/, "").strip
30+
red_arrow_version = "<= #{arrow_glib_version}"
31+
end
32+
rescue SystemCallError
33+
end
34+
end
35+
1936
gem "rake"
20-
gem "red-arrow"
21-
gem "red-parquet"
37+
gem "red-arrow", red_arrow_version
38+
gem "red-parquet", red_arrow_version
2239
gem "test-unit"

0 commit comments

Comments
 (0)