]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/ci/scripts/rust_build.sh
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / ci / scripts / rust_build.sh
1 #!/usr/bin/env bash
2 #
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
10 #
11 # http://www.apache.org/licenses/LICENSE-2.0
12 #
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
18 # under the License.
19
20 set -e
21
22 arrow_dir=${1}
23 source_dir=${1}/rust
24
25 # This file is used to build the rust binaries needed for the archery
26 # integration tests. Testing of the rust implementation in normal CI is handled
27 # by github workflows in the arrow-rs repository.
28
29 # Disable full debug symbol generation to speed up CI build / reduce memory required
30 export RUSTFLAGS="-C debuginfo=1"
31
32 export ARROW_TEST_DATA=${arrow_dir}/testing/data
33 export PARQUET_TEST_DATA=${arrow_dir}/cpp/submodules/parquet-testing/data
34
35 if [ "${ARCHERY_INTEGRATION_WITH_RUST}" -eq "0" ]; then
36 echo "====================================================================="
37 echo "Not building the Rust implementation."
38 echo "====================================================================="
39 exit 0;
40 elif [ ! -d "${source_dir}" ]; then
41 echo "====================================================================="
42 echo "The Rust source is missing. Please clone the arrow-rs repository"
43 echo "to arrow/rust before running the integration tests:"
44 echo " git clone https://github.com/apache/arrow-rs.git path/to/arrow/rust"
45 echo "====================================================================="
46 exit 1;
47 fi
48
49 set -x
50
51 # show activated toolchain
52 rustup show
53
54 pushd ${source_dir}
55
56 # build only the integration testing binaries
57 cargo build -p arrow-integration-testing
58
59 popd