Skip to content

Commit

Permalink
Add homebrew formula and crossbow nightly task
Browse files Browse the repository at this point in the history
  • Loading branch information
nealrichardson committed Sep 20, 2019
1 parent dd20e99 commit 163c67a
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 0 deletions.
82 changes: 82 additions & 0 deletions ci/apache-arrow.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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.

class ApacheArrow < Formula
desc "Columnar in-memory analytics layer designed to accelerate big data"
homepage "https://arrow.apache.org/"
url "https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-0.14.1/apache-arrow-0.14.1.tar.gz"
sha256 "9948ddb6d4798b51552d0dca3252dd6e3a7d0f9702714fc6f5a1b59397ce1d28"
head "https://github.com/apache/arrow.git"

bottle do
cellar :any
sha256 "cb9b62e236c4d138c3ad06671818c0f1a81ddd97bb5ef9fecc8c449d5f8aee86" => :mojave
sha256 "8afda2fb6023553c4c4e2ba4ad3a87e9411e2283905fd3fca0ec7e4ddb3cf612" => :high_sierra
sha256 "b5d11576669485b771d2fab149d499b41ec9d0fcda55d7f4ec98716e1e2f5c08" => :sierra
end

depends_on "autoconf" => :build
depends_on "cmake" => :build
depends_on "boost"
depends_on "brotli"
depends_on "double-conversion"
depends_on "flatbuffers"
depends_on "glog"
depends_on "grpc"
depends_on "lz4"
depends_on "numpy"
depends_on "openssl"
depends_on "protobuf"
depends_on "python"
depends_on "rapidjson"
depends_on "snappy"
depends_on "thrift"
depends_on "zstd"

def install
ENV.cxx11
args = %W[
-DARROW_FLIGHT=ON
-DARROW_ORC=ON
-DARROW_PARQUET=ON
-DARROW_PLASMA=ON
-DARROW_PROTOBUF_USE_SHARED=ON
-DARROW_PYTHON=ON
-DARROW_INSTALL_NAME_RPATH=OFF
-DPYTHON_EXECUTABLE=#{Formula["python"].bin/"python3"}
]

mkdir "build"
cd "build" do
system "cmake", "../cpp", *std_cmake_args, *args
system "make"
system "make", "install"
end
end

test do
(testpath/"test.cpp").write <<~EOS
#include "arrow/api.h"
int main(void) {
arrow::int64();
return 0;
}
EOS
system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", "-larrow", "-o", "test"
system "./test"
end
end
8 changes: 8 additions & 0 deletions dev/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ groups:
- ubuntu-disco-arm64
- centos-6
- centos-7
- homebrew-formula
- gandiva-jar-trusty
- gandiva-jar-osx
- docker-r
Expand Down Expand Up @@ -1085,6 +1086,13 @@ tasks:
- plasma-glib-libs-{no_rc_version}-1.el7.x86_64.rpm
- plasma-libs-{no_rc_version}-1.el7.x86_64.rpm

############################## Homebrew Tasks ################################

homebrew-formula:
ci: travis
platform: osx
template: travis.homebrew.yml

############################## Gandiva Tasks ################################

gandiva-jar-trusty:
Expand Down
41 changes: 41 additions & 0 deletions dev/tasks/travis.homebrew.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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.

os: osx
language: ruby
cache: bundler

# don't build twice
if: tag IS blank

env:
global:
- TRAVIS_TAG={{ task.tag }}
- ARROW_FORMULA=./arrow/ci/apache-arrow.rb

before_script:
- git clone --no-checkout {{ arrow.remote }} arrow
- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
- if [ $CROSSBOW_USE_COMMIT_ID == true ]; then git -C arrow checkout {{ arrow.head }}; else git -C arrow checkout FETCH_HEAD; fi
- brew update
- brew audit $ARROW_FORMULA
script:
- brew install -v --build-from-source --HEAD $ARROW_FORMULA
- brew test $ARROW_FORMULA

notifications:
email:
- {{ job.email }}

0 comments on commit 163c67a

Please sign in to comment.