Skip to content

Apache DataFusion SQL Query Engine

ARROW-8103: [R] Make default Linux build more minimal

Neal Richardsonc79014fc372e
diff --git a/ci/scripts/r_deps.sh b/ci/scripts/r_deps.sh
index eb14080e61..edb8cdf2bf 100755
--- a/ci/scripts/r_deps.sh
+++ b/ci/scripts/r_deps.sh
@@ -30,3 +30,9 @@ ${R_BIN} -e "remotes::install_deps(dependencies = TRUE)"
${R_BIN} -e "remotes::install_github('nealrichardson/decor')"
popd
+
+if [ "$RPREFIX" = "/opt/R-devel" ]; then
+ # We need this on R-devel, which we test on rhub images, which have this env var set
+ curl -L https://sourceforge.net/projects/checkbaskisms/files/2.0.0.2/checkbashisms/download > /usr/local/bin/checkbashisms
+ chmod 755 /usr/local/bin/checkbashisms
+fi
diff --git a/ci/scripts/r_test.sh b/ci/scripts/r_test.sh
index 042b543092..e79fac5f36 100755
--- a/ci/scripts/r_test.sh
+++ b/ci/scripts/r_test.sh
@@ -34,6 +34,8 @@ export _R_CHECK_COMPILATION_FLAGS_KNOWN_=${ARROW_R_CXXFLAGS}
if [ "$ARROW_R_DEV" = "TRUE" ]; then
# These are used in the Arrow C++ build and are not a problem
export _R_CHECK_COMPILATION_FLAGS_KNOWN_="${_R_CHECK_COMPILATION_FLAGS_KNOWN_} -Wno-attributes -msse4.2"
+ # Note that NOT_CRAN=true means (among other things) that optional dependencies are built
+ export NOT_CRAN=true
fi
export TEST_R_WITH_ARROW=TRUE
export _R_CHECK_TESTS_NLINES_=0
@@ -46,7 +48,8 @@ BEFORE=$(ls -alh ~/)
# Conditionally run --as-cran because crossbow jobs aren't using _R_CHECK_COMPILATION_FLAGS_KNOWN_
# (maybe an R version thing, needs 3.6.2?)
-${R_BIN} -e "rcmdcheck::rcmdcheck(build_args = '--no-build-vignettes', args = c('--no-manual', if (!identical(Sys.getenv('ARROW_R_DEV'), 'TRUE')) '--as-cran', '--ignore-vignettes', '--run-donttest'), error_on = 'warning', check_dir = 'check')"
+# Also only --run-donttest if NOT_CRAN because Parquet example requires snappy (optional dependency)
+${R_BIN} -e "cran <- !identical(tolower(Sys.getenv('NOT_CRAN')), 'true'); rcmdcheck::rcmdcheck(build_args = '--no-build-vignettes', args = c('--no-manual', '--ignore-vignettes', ifelse(cran, '--as-cran', '--run-donttest')), error_on = 'warning', check_dir = 'check')"
AFTER=$(ls -alh ~/)
if [ "$BEFORE" != "$AFTER" ]; then
diff --git a/dev/tasks/r/azure.linux.yml b/dev/tasks/r/azure.linux.yml
index ccc2abea1f..59d5b02375 100644
--- a/dev/tasks/r/azure.linux.yml
+++ b/dev/tasks/r/azure.linux.yml
@@ -47,7 +47,8 @@ jobs:
R_IMAGE={{ r_image }}
R_TAG={{ r_tag }}
# we have to export this (right?) because we need it in the build env
- export ARROW_R_DEV={{ verbose }}
+ export ARROW_R_DEV={{ not_cran }}
+ # Note that ci/scripts/r_test.sh sets NOT_CRAN=true if ARROW_R_DEV=TRUE
docker-compose run r
displayName: Docker run
diff --git a/dev/tasks/r/github.linux.cran.yml b/dev/tasks/r/github.linux.cran.yml
new file mode 100644
index 0000000000..0a5362b498
--- /dev/null
+++ b/dev/tasks/r/github.linux.cran.yml
@@ -0,0 +1,67 @@
+# 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.
+
+# NOTE: must set "Crossbow" as name to have the badge links working in the
+# github comment reports!
+name: Crossbow
+
+on:
+ push:
+ branches:
+ - "*-github-*"
+
+jobs:
+ as-cran:
+ name: "rhub/{{ MATRIX }}"
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ # See https://hub.docker.com/r/rhub
+ r_image:
+ - debian-gcc-devel
+ - debian-gcc-patched
+ - debian-gcc-release
+ - fedora-gcc-devel
+ - fedora-clang-devel
+ env:
+ R_ORG: "rhub"
+ R_IMAGE: {{ MATRIX }}
+ R_TAG: "latest"
+ ARROW_R_DEV: "FALSE"
+ steps:
+ - name: Checkout Arrow
+ run: |
+ git clone --no-checkout {{ arrow.remote }} arrow
+ git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
+ git -C arrow checkout FETCH_HEAD
+ git -C arrow submodule update --init --recursive
+ - name: Fetch Submodules and Tags
+ shell: bash
+ run: cd arrow && ci/scripts/util_checkout.sh
+ - name: Docker Pull
+ shell: bash
+ run: cd arrow && docker-compose pull --ignore-pull-failures r
+ - name: Docker Build
+ shell: bash
+ run: cd arrow && docker-compose build r
+ - name: Docker Run
+ shell: bash
+ run: cd arrow && docker-compose run r
+ - name: Dump install logs on failure
+ if: failure()
+ run: cat arrow/r/check/arrow.Rcheck/00install.out
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index 58678f2c3a..f7686d5a85 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -104,8 +104,8 @@ groups:
- test-ubuntu-18.04-python-3
- test-fedora-30-python-3
- test-r-rhub-ubuntu-gcc-release
- - test-r-rhub-debian-gcc-devel
- - test-r-rocker-r-base-latest
+ - test-r-linux-as-cran
+ - test-r-rocker-r-base-latest
- test-r-rstudio-r-base-3.6-bionic
- test-r-rstudio-r-base-3.6-centos6
- test-r-rstudio-r-base-3.6-opensuse15
@@ -149,7 +149,7 @@ groups:
- test-ubuntu-18.04-python-3
- test-fedora-30-python-3
- test-r-rhub-ubuntu-gcc-release
- - test-r-rhub-debian-gcc-devel
+ - test-r-linux-as-cran
- test-r-rocker-r-base-latest
- test-r-rstudio-r-base-3.6-bionic
- test-r-rstudio-r-base-3.6-centos6
@@ -187,7 +187,7 @@ groups:
- test-conda-r-3.6
- test-ubuntu-18.04-r-sanitizer
- test-r-rhub-ubuntu-gcc-release
- - test-r-rhub-debian-gcc-devel
+ - test-r-linux-as-cran
- test-r-rocker-r-base-latest
- test-r-rstudio-r-base-3.6-bionic
- test-r-rstudio-r-base-3.6-centos6
@@ -276,7 +276,7 @@ groups:
- test-ubuntu-18.04-python-3
- test-fedora-30-python-3
- test-r-rhub-ubuntu-gcc-release
- - test-r-rhub-debian-gcc-devel
+ - test-r-linux-as-cran
- test-r-rocker-r-base-latest
- test-r-rstudio-r-base-3.6-bionic
- test-r-rstudio-r-base-3.6-centos6
@@ -1850,15 +1850,12 @@ tasks:
- docker-compose build fedora-python
- docker-compose run fedora-python
- test-r-rhub-debian-gcc-devel:
- ci: azure
+ test-r-linux-as-cran:
+ ci: github
platform: linux
- template: r/azure.linux.yml
+ template: r/github.linux.cran.yml
params:
- r_org: rhub
- r_image: debian-gcc-devel
- r_tag: latest
- verbose: "TRUE"
+ MATRIX: "${{ matrix.r_image }}"
test-r-rhub-ubuntu-gcc-release:
ci: azure
@@ -1868,7 +1865,7 @@ tasks:
r_org: rhub
r_image: ubuntu-gcc-release
r_tag: latest
- verbose: "TRUE"
+ not_cran: "TRUE"
test-r-rocker-r-base-latest:
ci: azure
@@ -1878,7 +1875,7 @@ tasks:
r_org: rocker
r_image: r-base
r_tag: latest
- verbose: "TRUE"
+ not_cran: "TRUE"
test-r-rstudio-r-base-3.6-bionic:
ci: azure
@@ -1888,8 +1885,7 @@ tasks:
r_org: rstudio
r_image: r-base
r_tag: 3.6-bionic
- # Turn off verbosity on some tests in order to check compiler flags
- verbose: "FALSE"
+ not_cran: "TRUE"
test-r-rstudio-r-base-3.6-centos6:
ci: azure
@@ -1899,7 +1895,7 @@ tasks:
r_org: rstudio
r_image: r-base
r_tag: 3.6-centos6
- verbose: "FALSE"
+ not_cran: "TRUE"
test-r-rstudio-r-base-3.6-opensuse15:
ci: azure
@@ -1909,7 +1905,7 @@ tasks:
r_org: rstudio
r_image: r-base
r_tag: 3.6-opensuse15
- verbose: "TRUE"
+ not_cran: "TRUE"
test-r-rstudio-r-base-3.6-opensuse42:
ci: azure
@@ -1919,7 +1915,7 @@ tasks:
r_org: rstudio
r_image: r-base
r_tag: 3.6-opensuse24
- verbose: "TRUE"
+ not_cran: "TRUE"
test-ubuntu-18.04-r-3.6:
ci: circle
diff --git a/docker-compose.yml b/docker-compose.yml
index ce1bed695a..6f87d2b5bb 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -824,7 +824,6 @@ services:
base: ${R_ORG}/${R_IMAGE}:${R_TAG}
shm_size: *shm-size
environment:
- NOT_CRAN: "true"
LIBARROW_DOWNLOAD: "false"
ARROW_HOME: "/arrow"
ARROW_USE_PKG_CONFIG: "false"