Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ matrix:
- $TRAVIS_BUILD_DIR/ci/travis_before_script_js.sh
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_js.sh
# C++ & glib w/ gcc 4.9
# C++ & GLib & Ruby w/ gcc 4.9
- compiler: gcc
language: cpp
os: linux
Expand All @@ -160,26 +160,30 @@ matrix:
- CC="gcc-4.9"
- CXX="g++-4.9"
before_script:
- if [ $ARROW_CI_C_GLIB_AFFECTED != "1" ]; then exit; fi
- if [ $ARROW_CI_RUBY_AFFECTED != "1" ]; then exit; fi
- $TRAVIS_BUILD_DIR/ci/travis_install_linux.sh
- $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh --only-library
- $TRAVIS_BUILD_DIR/ci/travis_before_script_c_glib.sh
- $TRAVIS_BUILD_DIR/ci/travis_before_script_ruby.sh
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh
# [OS X] C++ & glib w/ XCode 8.3 & homebrew
- if [ $ARROW_CI_C_GLIB_AFFECTED = "1" ]; then $TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh; fi
- $TRAVIS_BUILD_DIR/ci/travis_script_ruby.sh
# [OS X] C++ & GLib & Ruby w/ XCode 8.3 & homebrew
- compiler: clang
osx_image: xcode8.3
os: osx
cache:
addons:
rvm: 2.2
before_script:
- if [ $ARROW_CI_C_GLIB_AFFECTED != "1" ]; then exit; fi
- if [ $ARROW_CI_RUBY_AFFECTED != "1" ]; then exit; fi
- $TRAVIS_BUILD_DIR/ci/travis_install_osx.sh
- $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh --only-library --homebrew
- $TRAVIS_BUILD_DIR/ci/travis_before_script_c_glib.sh
- $TRAVIS_BUILD_DIR/ci/travis_before_script_ruby.sh
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh
- if [ $ARROW_CI_C_GLIB_AFFECTED = "1" ]; then $TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh; fi
- $TRAVIS_BUILD_DIR/ci/travis_script_ruby.sh
# Rust
- language: rust
cache: cargo
Expand Down
7 changes: 5 additions & 2 deletions ci/detect-changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

perr = functools.partial(print, file=sys.stderr)

LANGUAGE_TOPICS = ['c_glib', 'cpp', 'java', 'js', 'python', 'rust']
LANGUAGE_TOPICS = ['c_glib', 'cpp', 'java', 'js', 'python', 'ruby', 'rust']

ALL_TOPICS = LANGUAGE_TOPICS + ['integration', 'site']

Expand Down Expand Up @@ -141,7 +141,10 @@ def get_affected_topics(affected_files):
elif p in ('java', 'js'):
affected[p] = True
affected['integration'] = True
elif p in ('c_glib', 'integration', 'python', 'site', 'rust'):
elif p in ('c_glib'):
affected[p] = True
affected['ruby'] = True
elif p in ('integration', 'python', 'site', 'ruby', 'rust'):
affected[p] = True

return affected
Expand Down
31 changes: 31 additions & 0 deletions ci/travis_before_script_ruby.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

set -e

source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh

pushd $ARROW_RUBY_DIR/red-arrow
bundle install
popd

# TODO: GPU required
# pushd $ARROW_RUBY_DIR/red-arrow-gpu
# bundle install
# popd
1 change: 1 addition & 0 deletions ci/travis_env_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export ARROW_C_GLIB_DIR=$TRAVIS_BUILD_DIR/c_glib
export ARROW_JAVA_DIR=${TRAVIS_BUILD_DIR}/java
export ARROW_JS_DIR=${TRAVIS_BUILD_DIR}/js
export ARROW_INTEGRATION_DIR=$TRAVIS_BUILD_DIR/integration
export ARROW_RUBY_DIR=$TRAVIS_BUILD_DIR/ruby
export ARROW_RUST_DIR=${TRAVIS_BUILD_DIR}/rust

if [ $ARROW_TRAVIS_COVERAGE == "1" ]; then
Expand Down
53 changes: 53 additions & 0 deletions ci/travis_script_ruby.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

set -e

source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh

arrow_ruby_run_test()
{
local arrow_c_glib_lib_dir=$1

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$arrow_c_glib_lib_dir
export GI_TYPELIB_PATH=$arrow_c_glib_lib_dir/girepository-1.0
test/run-test.rb
}

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ARROW_CPP_INSTALL/lib
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$ARROW_CPP_INSTALL/lib/pkgconfig

pushd $ARROW_RUBY_DIR/red-arrow
(arrow_ruby_run_test $ARROW_C_GLIB_INSTALL_AUTOTOOLS/lib)
if [ -d $ARROW_C_GLIB_INSTALL_MESON/lib/$(arch)-linux-gnu ]; then
(arrow_ruby_run_test $ARROW_C_GLIB_INSTALL_MESON/lib/$(arch)-linux-gnu)
# else # TODO: Enable this
# (arrow_ruby_run_test $ARROW_C_GLIB_INSTALL_MESON/lib)
fi
popd

# TODO: GPU required
# pushd $ARROW_RUBY_DIR/red-arrow-gpu
# (arrow_ruby_run_test $ARROW_C_GLIB_INSTALL_AUTOTOOLS/lib)
# if [ -d $ARROW_C_GLIB_INSTALL_MESON/lib/$(arch)-linux-gnu ]; then
# (arrow_ruby_run_test $ARROW_C_GLIB_INSTALL_MESON/lib/$(arch)-linux-gnu)
# # else # TODO: Enable this
# # (arrow_ruby_run_test $ARROW_C_GLIB_INSTALL_MESON/lib)
# fi
# popd
26 changes: 26 additions & 0 deletions ruby/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!---
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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.
-->

# Apache Arrow Ruby

There are the official Ruby bindings for Apache Arrow.

[Red Arrow](https://github.com/apache/arrow/tree/master/ruby/red-arrow) is the base Apache Arrow bindings.

[Red Arrow GPU](https://github.com/apache/arrow/tree/master/ruby/red-arrow-gpu) is the Apache Arrow bindings of GPU part.
20 changes: 20 additions & 0 deletions ruby/red-arrow-gpu/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

/lib/arrow-gpu/version.rb

/pkg/
22 changes: 22 additions & 0 deletions ruby/red-arrow-gpu/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- ruby -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

source "https://rubygems.org/"

gemspec
Loading