-
Notifications
You must be signed in to change notification settings - Fork 1
153 lines (152 loc) · 4.64 KB
/
test.yaml
File metadata and controls
153 lines (152 loc) · 4.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Copyright 2025 Sutou Kouhei <kou@clear-code.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Test
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
jobs:
unit:
name: Unit test
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
ruby-version:
- "3.1"
- "3.2"
- "3.3"
- "3.4"
- head
runs-on:
- ubuntu-latest
- macos-latest
- windows-latest
env:
FLATBUFFERS_REPOSITORY: ${{ github.workspace }}/flatbuffers
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
repository: google/flatbuffers
path: flatbuffers
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Install FlatBuffers
if: |
matrix.runs-on == 'ubuntu-latest'
run: |
sudo apt install -y -V flatbuffers-compiler
- name: Install FlatBuffers
if: |
matrix.runs-on == 'macos-latest'
run: |
brew bundle
- name: Install FlatBuffers
if: |
matrix.runs-on == 'windows-latest'
run: |
ridk exec pacman -S --noconfirm ${Env:MINGW_PACKAGE_PREFIX}-flatbuffers
- name: Test
run: |
bundle exec rake
apache-arrow:
name: Apache Arrow
runs-on: ubuntu-latest
env:
GI_TYPELIB_PATH: /tmp/local/lib/girepository-1.0
LD_LIBRARY_PATH: /tmp/local/lib
PKG_CONFIG_PATH: /tmp/local/lib/pkgconfig
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
repository: apache/arrow
path: apache-arrow
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
bundler-cache: true
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y -V \
ccache \
flatbuffers-compiler \
rapidjson-dev \
libgirepository1.0-dev \
libxsimd-dev \
meson
- name: Prepare ccache
run: |
echo "CCACHE_DIR=${PWD}/.ccache" >> "${GITHUB_ENV}"
- name: Cache ccache
uses: actions/cache@v5
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-apache-arrow-${{ hashFiles('apache-arrow/cpp/**', 'apache-arrow/c_glib/**', 'apache-arrow/ruby/red-arrow/ext/**') }}
restore-keys: ccache-apache-arrow-
- name: Install Red FlatBuffers
run: |
rake install
- name: Configure Apache Arrow C++
run: |
cmake \
-S apache-arrow/cpp \
-B apache-arrow/cpp.build \
--preset ninja-debug-minimal \
-D ARROW_ACERO=ON \
-D ARROW_COMPUTE=ON \
-D ARROW_CSV=ON \
-D ARROW_FILESYSTEM=ON \
-D ARROW_JSON=ON \
-D CMAKE_INSTALL_PREFIX=/tmp/local \
-D CMAKE_INSTALL_LIBDIR=lib
- name: Build Apache Arrow C++
run: |
cmake --build apache-arrow/cpp.build
- name: Install Apache Arrow C++
run: |
cmake --install apache-arrow/cpp.build
- name: Configure Apache Arrow GLib
run: |
meson setup \
--cmake-prefix-path=/tmp/local \
--libdir=lib \
--pkg-config-path=/tmp/local/lib/pkgconfig \
--prefix=/tmp/local \
apache-arrow/c_glib.build \
apache-arrow/c_glib
- name: Build Apache Arrow GLib
run: |
meson compile -C apache-arrow/c_glib.build
- name: Install Apache Arrow C++
run: |
meson install -C apache-arrow/c_glib.build
- name: Install Red Arrow dependencies
run: |
cd apache-arrow/ruby/red-arrow
bundle install -j$(nproc)
- name: Build Red Arrow
run: |
cd apache-arrow/ruby/red-arrow/ext/arrow
ruby extconf.rb --eanble-debug-build
make -j$(nproc)
- name: Run Red ArrowFormat tests
run: |
cd apache-arrow/ruby/red-arrow-format
ruby test/run.rb