3 # Licensed to the Apache Software Foundation (ASF) under one
4 # or more contributor license agreements. See the NOTICE file
5 # distributed with this work for additional information
6 # regarding copyright ownership. The ASF licenses this file
7 # to you under the Apache License, Version 2.0 (the
8 # "License"); you may not use this file except in compliance
9 # with the License. You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing,
14 # software distributed under the License is distributed on an
15 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 # KIND, either express or implied. See the License for the
17 # specific language governing permissions and limitations
21 ## These hooks are used by benchmark builds
22 # to create a conda env with Arrow dependencies and build Arrow C++, Python, etc
23 create_conda_env_for_benchmark_build
() {
24 conda create
-y -n "${BENCHMARKABLE_TYPE}" -c conda-forge \
25 --file ci
/conda_env_unix.txt \
26 --file ci
/conda_env_cpp.txt \
27 --file ci
/conda_env_python.txt \
28 --file ci
/conda_env_gandiva.txt \
30 python
="${PYTHON_VERSION}" \
36 activate_conda_env_for_benchmark_build
() {
38 conda activate
"${BENCHMARKABLE_TYPE}"
41 install_arrow_python_dependencies
() {
42 pip
install -r python
/requirements-build.txt
-r python
/requirements-test.txt
45 set_arrow_build_and_run_env_vars
() {
47 source dev
/conbench_envs
/benchmarks.env
52 # Ignore the error when a cache can't be created
53 if ! ci
/scripts
/cpp_build.sh $
(pwd) $
(pwd) 2> error.log
; then
54 if ! grep -q -F "Can\'t create temporary cache file" error.log
; then
60 build_arrow_python
() {
61 ci
/scripts
/python_build.sh $
(pwd) $
(pwd)
65 cat ci
/etc
/rprofile
>> $
(R RHOME
)/etc
/Rprofile.site
66 ci
/scripts
/r_deps.sh $
(pwd) $
(pwd)
67 (cd r
; R CMD INSTALL .
;)
71 ci
/scripts
/java_build.sh $
(pwd) $
(pwd)
75 pip
install -e dev
/archery
78 install_java_script_project_dependencies
() {
82 create_conda_env_with_arrow_python
() {
83 create_conda_env_for_benchmark_build
84 activate_conda_env_for_benchmark_build
85 install_arrow_python_dependencies
86 set_arrow_build_and_run_env_vars