-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-12590: [C++][R] Update copies of Homebrew files to reflect rece…
…nt updates (#13769) Building on #12157 Lead-authored-by: Jacob Wujciak-Jens <[email protected]> Co-authored-by: Jonathan Keane <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
- Loading branch information
1 parent
8474ee5
commit 70c6708
Showing
7 changed files
with
189 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
dev/tasks/homebrew-formulae/autobrew/apache-arrow-static.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# 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. | ||
|
||
# Cloned from https://github.com/autobrew/homebrew-core/blob/high-sierra/Formula/apache-arrow.rb | ||
# Upstream any relevant changes (dependencies, build args ...) | ||
|
||
class ApacheArrowStatic < Formula | ||
desc "Columnar in-memory analytics layer designed to accelerate big data" | ||
homepage "https://arrow.apache.org/" | ||
url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-8.0.0.9000/apache-arrow-8.0.0.9000.tar.gz" | ||
# Uncomment and update to test on a release candidate | ||
# mirror "https://dist.apache.org/repos/dist/dev/arrow/apache-arrow-8.0.0-rc1/apache-arrow-8.0.0.tar.gz" | ||
sha256 "9948ddb6d4798b51552d0dca3252dd6e3a7d0f9702714fc6f5a1b59397ce1d28" | ||
head "https://github.com/apache/arrow.git" | ||
|
||
bottle do | ||
sha256 cellar: :any, arm64_big_sur: "ef89d21a110b89840cc6148add685d407e75bd633bc8f79625eb33d00e3694b4" | ||
sha256 cellar: :any, big_sur: "6fcb9f55d44eb61d295a8020e039a0622bdc044b220cfffef855f3e3ab8057a1" | ||
sha256 cellar: :any, catalina: "bf71b17766688077fb9b4e679f309742c16524015287dd3633758c679752c977" | ||
end | ||
|
||
depends_on "boost" => :build | ||
depends_on "cmake" => :build | ||
depends_on "aws-sdk-cpp-static" | ||
depends_on "brotli" | ||
depends_on "lz4" | ||
depends_on "snappy" | ||
depends_on "thrift" | ||
depends_on "zstd" | ||
|
||
conflicts_with "apache-arrow", because: "both install Arrow" | ||
|
||
def install | ||
ENV.cxx11 | ||
# https://github.com/Homebrew/homebrew-core/issues/94724 | ||
# https://issues.apache.org/jira/browse/ARROW-15664 | ||
ENV["HOMEBREW_OPTIMIZATION_LEVEL"] = "O2" | ||
|
||
args = %W[ | ||
-DARROW_BUILD_SHARED=OFF | ||
-DARROW_BUILD_UTILITIES=ON | ||
-DARROW_COMPUTE=ON | ||
-DARROW_CSV=ON | ||
-DARROW_DATASET=ON | ||
-DARROW_FILESYSTEM=ON | ||
-DARROW_GCS=ON | ||
-DARROW_JEMALLOC=ON | ||
-DARROW_JSON=ON | ||
-DARROW_MIMALLOC=ON | ||
-DARROW_PARQUET=ON | ||
-DARROW_S3=ON | ||
-DARROW_VERBOSE_THIRDPARTY_BUILD=ON | ||
-DARROW_WITH_BROTLI=ON | ||
-DARROW_WITH_BZ2=ON | ||
-DARROW_WITH_LZ4=ON | ||
-DARROW_WITH_SNAPPY=ON | ||
-DARROW_WITH_ZLIB=ON | ||
-DARROW_WITH_ZSTD=ON | ||
-DLZ4_HOME=#{Formula["lz4"].prefix} | ||
-DPARQUET_BUILD_EXECUTABLES=ON | ||
-DTHRIFT_HOME=#{Formula["thrift"].prefix} | ||
] | ||
|
||
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", "-larrow_bundled_dependencies", "-o", "test" | ||
system "./test" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,44 +16,60 @@ | |
# under the License. | ||
|
||
{% import 'macros.jinja' as macros with context %} | ||
{% set is_fork = macros.is_fork %} | ||
|
||
{{ macros.github_header() }} | ||
|
||
jobs: | ||
autobrew: | ||
name: "Autobrew" | ||
runs-on: macOS-10.15 | ||
name: "Autobrew {{ "${{ matrix.platform }}" }}" | ||
runs-on: {{ "${{ matrix.platform }}" }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- macos-11 | ||
- macos-10.13 # self-hosted | ||
r-version: | ||
- {{ macros.r_release }} | ||
- {{ macros.r_oldrel }} | ||
steps: | ||
{{ macros.github_checkout_arrow()|indent }} | ||
|
||
- name: Configure autobrew script | ||
run: | | ||
# minio is pre-installed on the self-hosted 10.13 runer | ||
if [ {{ '${{ matrix.platform }}' }} != macos-10.13 ]; then | ||
# install minio for tests | ||
brew install minio | ||
fi | ||
cd arrow/r | ||
# Put the formula inside r/ so that it's included in the package build | ||
cp ../dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb tools/apache-arrow.rb | ||
# Pin the current commit in the formula to test so that we're not always pulling from master | ||
sed -i.bak -E -e 's@https://github.com/apache/arrow.git"$@{{ arrow.remote }}.git", :revision => "{{ arrow.head }}"@' tools/apache-arrow.rb && rm -f tools/apache-arrow.rb.bak | ||
# Sometimes crossbow gives a remote URL with .git and sometimes not. Make sure there's only one | ||
sed -i.bak -E -e '[email protected]@.git@' tools/apache-arrow.rb && rm -f tools/apache-arrow.rb.bak | ||
# Get minio for S3 testing | ||
brew install minio | ||
- uses: r-lib/actions/setup-r@v1 | ||
- name: Install dependencies | ||
run: | | ||
install.packages("remotes") | ||
remotes::install_deps("arrow/r", dependencies = TRUE) | ||
remotes::install_cran(c("rcmdcheck", "sys", "sessioninfo")) | ||
shell: Rscript {0} | ||
- name: Session info | ||
{{ macros.pin_brew_formulae(is_fork)|indent }} | ||
- uses: r-lib/actions/setup-r@v2 | ||
if: matrix.platform != 'macos-10.13' | ||
with: | ||
r-version: {{ '${{ matrix.r-version }}' }} | ||
use-public-rspm: true | ||
- name: Setup R | ||
if: matrix.platform == 'macos-10.13' | ||
run: | | ||
options(width = 100) | ||
pkgs <- installed.packages()[, "Package"] | ||
sessioninfo::session_info(pkgs, include_base = TRUE) | ||
shell: Rscript {0} | ||
# rig is a system utility that allows for switching | ||
# between pre-installed R version on the self-hosted runners | ||
rig default {{ '${{ matrix.r-version }}' }} | ||
rig system setup-user-lib | ||
rig system add-pak | ||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
working-directory: 'arrow/r' | ||
extra-packages: | | ||
any::rcmdcheck | ||
any::sys | ||
any::readr | ||
- name: Check | ||
env: | ||
_R_CHECK_CRAN_INCOMING_: false | ||
NOT_CRAN: true | ||
ARROW_USE_PKG_CONFIG: false | ||
ARROW_R_DEV: true | ||
run: arrow/ci/scripts/r_test.sh arrow | ||
- name: Dump install logs | ||
run: cat arrow/r/check/arrow.Rcheck/00install.out | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters