]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/ci/scripts/r_revdepcheck.sh
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / ci / scripts / r_revdepcheck.sh
1 #!/usr/bin/env bash
2 # Licensed to the Apache Software Foundation (ASF) under one
3 # or more contributor license agreements. See the NOTICE file
4 # distributed with this work for additional information
5 # regarding copyright ownership. The ASF licenses this file
6 # to you under the Apache License, Version 2.0 (the
7 # "License"); you may not use this file except in compliance
8 # with the License. You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing,
13 # software distributed under the License is distributed on an
14 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 # KIND, either express or implied. See the License for the
16 # specific language governing permissions and limitations
17 # under the License.
18
19 set -ex
20
21 : ${R_BIN:=R}
22
23 source_dir=${1}/r
24
25 # cpp building dependencies
26 apt install -y cmake
27
28 # system dependencies needed for arrow's reverse dependencies
29 apt install -y libxml2-dev \
30 libfontconfig1-dev \
31 libcairo2-dev \
32 libglpk-dev \
33 libmysqlclient-dev \
34 unixodbc-dev \
35 libpq-dev \
36 coinor-libsymphony-dev \
37 coinor-libcgl-dev \
38 coinor-symphony \
39 libzmq3-dev \
40 libudunits2-dev \
41 libgdal-dev \
42 libgeos-dev \
43 libproj-dev
44
45 pushd ${source_dir}
46
47 printenv
48
49 # By default, aws-sdk tries to contact a non-existing local ip host
50 # to retrieve metadata. Disable this so that S3FileSystem tests run faster.
51 export AWS_EC2_METADATA_DISABLED=TRUE
52
53 # Set crancache dir so we can cache it
54 export CRANCACHE_DIR="/arrow/.crancache"
55
56 SCRIPT="
57 # We can't use RSPM binaries because we need source packages
58 options('repos' = c(CRAN = 'https://packagemanager.rstudio.com/all/latest'))
59 remotes::install_github('r-lib/revdepcheck')
60
61 # zoo is needed by RcisTarget tests, though only listed in enhances so not installed by revdepcheck
62 install.packages('zoo')
63
64 # actually run revdepcheck
65 revdepcheck::revdep_check(
66 quiet = FALSE,
67 timeout = as.difftime(120, units = 'mins'),
68 num_workers = 1,
69 env = c(
70 ARROW_R_DEV = '$ARROW_R_DEV',
71 LIBARROW_DOWNLOAD = TRUE,
72 LIBARROW_MINIMAL = FALSE,
73 revdepcheck::revdep_env_vars()
74 ))
75 revdepcheck::revdep_report(all = TRUE)
76
77 # Go through the summary and fail if any of the statuses include -
78 summary <- revdepcheck::revdep_summary()
79 failed <- lapply(summary, function(check) grepl('-', check[['status']]))
80
81 if (any(unlist(failed))) {
82 quit(status = 1)
83 }
84 "
85
86 echo "$SCRIPT" | ${R_BIN} --no-save
87
88 popd