You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by li...@apache.org on 2023/01/15 14:47:16 UTC

[arrow-adbc] branch main updated: fix(ci): revert GEM_HOME for RubyGems install test (#351)

This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 9548319  fix(ci): revert GEM_HOME for RubyGems install test (#351)
9548319 is described below

commit 9548319975a9e7bfb6532c63b330812fd36b0256
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Sun Jan 15 23:47:10 2023 +0900

    fix(ci): revert GEM_HOME for RubyGems install test (#351)
    
    Fixes #350.
    
    We don't need to set GEM_HOME for RubyGems install test. Because we
    don't use installed gems. We just want to test installation.
    
    We can't use GEM_HOME environment variable on conda
    environment. Because conda's Ruby sets gemhome in etc/gemrc. We can't
    overwrite it by GEM_HOME environment variable.
    
    So "--install-dir" is portable than GEM_HOME.
---
 .github/workflows/cpp.yml               |  2 ++
 ci/scripts/glib_test.sh                 | 12 +++++-------
 dev/release/verify-release-candidate.sh |  1 +
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index ed16754..8352c28 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -24,6 +24,7 @@ on:
     paths:
       - "adbc.h"
       - "c/**"
+      - "ci/**"
       - "glib/**"
       - "python/**"
       - ".github/workflows/cpp.yml"
@@ -31,6 +32,7 @@ on:
     paths:
       - "adbc.h"
       - "c/**"
+      - "ci/**"
       - "glib/**"
       - "python/**"
       - ".github/workflows/cpp.yml"
diff --git a/ci/scripts/glib_test.sh b/ci/scripts/glib_test.sh
index 5d4f8d5..51d955b 100755
--- a/ci/scripts/glib_test.sh
+++ b/ci/scripts/glib_test.sh
@@ -40,8 +40,8 @@ test_subproject() {
 
     if [[ "$(uname)" = "Darwin" ]]; then
         bundle config build.red-arrow -- \
-               --with-cflags=\"-D_LIBCPP_DISABLE_AVAILABILITY\" \
-               --with-cppflags=\"-D_LIBCPP_DISABLE_AVAILABILITY\"
+               --with-cflags=-D_LIBCPP_DISABLE_AVAILABILITY \
+               --with-cppflags=-D_LIBCPP_DISABLE_AVAILABILITY
     fi
 
     bundle config set --local path 'vendor/bundle'
@@ -57,8 +57,8 @@ test_subproject() {
 
     if [[ "$(uname)" = "Darwin" ]]; then
         bundle config build.red-arrow -- \
-               --with-cflags=\"-D_LIBCPP_DISABLE_AVAILABILITY\" \
-               --with-cppflags=\"-D_LIBCPP_DISABLE_AVAILABILITY\"
+               --with-cflags=-D_LIBCPP_DISABLE_AVAILABILITY \
+               --with-cppflags=-D_LIBCPP_DISABLE_AVAILABILITY
     fi
 
     bundle config set --local path 'vendor/bundle'
@@ -74,9 +74,7 @@ test_subproject() {
         gem_flags='-- --with-cflags="-D_LIBCPP_DISABLE_AVAILABILITY" --with-cppflags="-D_LIBCPP_DISABLE_AVAILABILITY"'
     fi
 
-    export GEM_HOME="${build_dir}/gems"
-    export PATH="${GEM_HOME}/bin:${PATH}"
-    gem install pkg/*.gem -- ${gem_flags}
+    gem install --install-dir "${build_dir}/gems" pkg/*.gem -- ${gem_flags}
     popd
 }
 
diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh
index 0d10a8d..2791ad2 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -484,6 +484,7 @@ test_glib() {
 
   # Install bundler if doesn't exist
   if ! bundle --version; then
+    # This is for old Ruby. Recent Ruby bundles Bundler.
     export GEM_HOME="${ARROW_TMPDIR}/glib-build/gems"
     export PATH="${GEM_HOME}/bin:${PATH}"
     gem install --no-document bundler