You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2017/06/03 15:17:47 UTC

arrow git commit: ARROW-1082: [GLib] Add CI on macOS

Repository: arrow
Updated Branches:
  refs/heads/master 931a87757 -> a81aefbd8


ARROW-1082: [GLib] Add CI on macOS

Author: Kouhei Sutou <ko...@clear-code.com>

Closes #722 from kou/glib-travis-macos and squashes the following commits:

1a08aa0 [Kouhei Sutou] [GLib] Don't run Torch example on macOS
651f9ff [Kouhei Sutou] [GLib] Add CI on macOS


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/a81aefbd
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/a81aefbd
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/a81aefbd

Branch: refs/heads/master
Commit: a81aefbd8cdcc081dbe8669cdaaf459a1c8127b4
Parents: 931a877
Author: Kouhei Sutou <ko...@clear-code.com>
Authored: Sat Jun 3 17:17:41 2017 +0200
Committer: Uwe L. Korn <uw...@xhochy.com>
Committed: Sat Jun 3 17:17:41 2017 +0200

----------------------------------------------------------------------
 .travis.yml                       | 12 +++++++++-
 ci/travis_before_script_c_glib.sh | 42 ++++++++++++++++++++++------------
 ci/travis_env_common.sh           |  4 ++++
 ci/travis_script_c_glib.sh        | 19 ++++++++++-----
 4 files changed, 56 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/a81aefbd/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 36e3c18..7a8b16c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,7 +17,6 @@ addons:
     - gtk-doc-tools
     - autoconf-archive
     - libgirepository1.0-dev
-    - gir1.2-gudev-1.0
 services:
   - docker
 
@@ -91,6 +90,17 @@ matrix:
     - $TRAVIS_BUILD_DIR/ci/travis_before_script_c_glib.sh
     script:
     - $TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh
+  - compiler: clang
+    osx_image: xcode6.4
+    os: osx
+    cache:
+    addons:
+    rvm: 2.2
+    before_script:
+    - $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh --only-library
+    - $TRAVIS_BUILD_DIR/ci/travis_before_script_c_glib.sh
+    script:
+    - $TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh
 
 before_install:
 - ulimit -c unlimited -S

http://git-wip-us.apache.org/repos/asf/arrow/blob/a81aefbd/ci/travis_before_script_c_glib.sh
----------------------------------------------------------------------
diff --git a/ci/travis_before_script_c_glib.sh b/ci/travis_before_script_c_glib.sh
index e397b0e..6387f4d 100755
--- a/ci/travis_before_script_c_glib.sh
+++ b/ci/travis_before_script_c_glib.sh
@@ -19,28 +19,38 @@ source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh
 
 if [ $TRAVIS_OS_NAME == "osx" ]; then
   brew install gtk-doc autoconf-archive gobject-introspection
+  brew upgrade git cmake wget libtool
+
+  export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig
 fi
 
-gem install gobject-introspection
-
-git clone \
-  --quiet \
-  --depth 1 \
-  --recursive \
-  https://github.com/torch/distro.git ~/torch
-pushd ~/torch
-./install-deps > /dev/null
-echo "yes" | ./install.sh > /dev/null
-. ~/torch/install/bin/torch-activate
-popd
+gem install test-unit gobject-introspection
+
+if [ $TRAVIS_OS_NAME == "osx" ]; then
+  brew install lua
+else
+  git clone \
+    --quiet \
+    --depth 1 \
+    --recursive \
+    https://github.com/torch/distro.git ~/torch
+  pushd ~/torch
+  ./install-deps > /dev/null
+  echo "yes" | ./install.sh > /dev/null
+  . ~/torch/install/bin/torch-activate
+  popd
+fi
 luarocks install lgi
 
 go get github.com/linuxdeepin/go-gir-generator || :
 pushd $GOPATH/src/github.com/linuxdeepin/go-gir-generator
+mv Makefile{,.orig}
+sed -e 's/ gudev-1.0//' Makefile.orig > Makefile
+mkdir -p out/src/gir/gudev-1.0
 make build copyfile
 mkdir -p $GOPATH/bin/
 cp -a out/gir-generator $GOPATH/bin/
-cp -a out/src/gir/ $GOPATH/src/
+cp -a out/src/gir/ $GOPATH/src/gir/
 popd
 
 pushd $ARROW_C_GLIB_DIR
@@ -50,7 +60,11 @@ pushd $ARROW_C_GLIB_DIR
 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$ARROW_CPP_INSTALL/lib/pkgconfig
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ARROW_CPP_INSTALL/lib
 
-./configure --prefix=${ARROW_C_GLIB_INSTALL} --enable-gtk-doc
+CONFIGURE_OPTIONS="--prefix=$ARROW_C_GLIB_INSTALL"
+if [ $TRAVIS_OS_NAME != "osx" ]; then
+  CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --enable-gtk-doc"
+fi
+./configure $CONFIGURE_OPTIONS
 
 make -j4
 make install

http://git-wip-us.apache.org/repos/asf/arrow/blob/a81aefbd/ci/travis_env_common.sh
----------------------------------------------------------------------
diff --git a/ci/travis_env_common.sh b/ci/travis_env_common.sh
index cef2d65..9ded3e0 100755
--- a/ci/travis_env_common.sh
+++ b/ci/travis_env_common.sh
@@ -26,3 +26,7 @@ export ARROW_INTEGRATION_DIR=$TRAVIS_BUILD_DIR/integration
 export ARROW_CPP_INSTALL=$TRAVIS_BUILD_DIR/cpp-install
 export ARROW_CPP_BUILD_DIR=$TRAVIS_BUILD_DIR/cpp-build
 export ARROW_C_GLIB_INSTALL=$TRAVIS_BUILD_DIR/c-glib-install
+
+if [ $TRAVIS_OS_NAME == "osx" ]; then
+  export GOPATH=$TRAVIS_BUILD_DIR/gopath
+fi

http://git-wip-us.apache.org/repos/asf/arrow/blob/a81aefbd/ci/travis_script_c_glib.sh
----------------------------------------------------------------------
diff --git a/ci/travis_script_c_glib.sh b/ci/travis_script_c_glib.sh
index c4df713..4bfa0c0 100755
--- a/ci/travis_script_c_glib.sh
+++ b/ci/travis_script_c_glib.sh
@@ -27,12 +27,19 @@ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$ARROW_CPP_INSTALL/lib/pkgconfig
 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$ARROW_C_GLIB_INSTALL/lib/pkgconfig
 
 pushd example/lua
-. ~/torch/install/bin/torch-activate
-luajit write-batch.lua
-luajit read-batch.lua
-luajit write-stream.lua
-luajit read-stream.lua
-luajit stream-to-torch-tensor.lua
+if [ $TRAVIS_OS_NAME == "osx" ]; then
+  lua write-batch.lua
+  lua read-batch.lua
+  lua write-stream.lua
+  lua read-stream.lua
+else
+  . ~/torch/install/bin/torch-activate
+  luajit write-batch.lua
+  luajit read-batch.lua
+  luajit write-stream.lua
+  luajit read-stream.lua
+  luajit stream-to-torch-tensor.lua
+fi
 popd
 
 pushd example/go