You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by pa...@apache.org on 2023/03/28 14:46:50 UTC
[arrow-nanoarrow] branch main updated: chore(ci): Add centos7 image; add valgrind and arrow/R to ubuntu image (#172)
This is an automated email from the ASF dual-hosted git repository.
paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git
The following commit(s) were added to refs/heads/main by this push:
new bebb790 chore(ci): Add centos7 image; add valgrind and arrow/R to ubuntu image (#172)
bebb790 is described below
commit bebb7907a75482fa2ba2bbba3e54b9fd87b62179
Author: Dewey Dunnington <de...@dunnington.ca>
AuthorDate: Tue Mar 28 10:46:44 2023 -0400
chore(ci): Add centos7 image; add valgrind and arrow/R to ubuntu image (#172)
...so that we can run memcheck from docker compose and at least one
image runs nanoarrow/R tests with arrow/R installed.
---
.github/workflows/docker-build.yaml | 2 ++
.../{ubuntu.dockerfile => centos7.dockerfile} | 29 +++++++++++++++-------
ci/docker/ubuntu.dockerfile | 9 +++++--
3 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml
index 3e5ca0f..fe824d7 100644
--- a/.github/workflows/docker-build.yaml
+++ b/.github/workflows/docker-build.yaml
@@ -42,9 +42,11 @@ jobs:
- { platform: "fedora", arch: "amd64" }
- { platform: "archlinux", arch: "amd64" }
- { platform: "alpine", arch: "amd64" }
+ - { platform: "centos7", arch: "amd64" }
- { platform: "ubuntu", arch: "arm64" }
- { platform: "alpine", arch: "arm64" }
+ - { platform: "centos7", arch: "arm64" }
- { platform: "alpine", arch: "s390x" }
diff --git a/ci/docker/ubuntu.dockerfile b/ci/docker/centos7.dockerfile
similarity index 58%
copy from ci/docker/ubuntu.dockerfile
copy to ci/docker/centos7.dockerfile
index 7e731e5..cef84f3 100644
--- a/ci/docker/ubuntu.dockerfile
+++ b/ci/docker/centos7.dockerfile
@@ -17,17 +17,28 @@
ARG NANOARROW_ARCH
-FROM --platform=linux/${NANOARROW_ARCH} ubuntu:latest
+FROM --platform=linux/${NANOARROW_ARCH} centos:7
-RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales git cmake r-base gnupg curl
-RUN locale-gen en_US.UTF-8 && update-locale en_US.UTF-8
+RUN yum install -y epel-release
+RUN yum install -y git gnupg curl R gcc-c++ cmake3
-# For Arrow C++
-RUN apt-get install -y -V ca-certificates lsb-release wget && \
- wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
- apt-get install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
- apt-get update && \
- apt-get install -y -V libarrow-dev
+RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
+ENV LC_ALL en_US.UTF-8
+
+# For Arrow C++. Use 9.0.0 because this version works fine with the default gcc
+RUN curl https://dlcdn.apache.org/arrow/arrow-9.0.0/apache-arrow-9.0.0.tar.gz | tar -zxf - && \
+ mkdir /arrow-build && \
+ cd /arrow-build && \
+ cmake3 ../apache-arrow-9.0.0/cpp \
+ -DARROW_JEMALLOC=OFF \
+ -DARROW_SIMD_LEVEL=NONE \
+ -DCMAKE_INSTALL_PREFIX=../arrow && \
+ cmake3 --build . && \
+ make install
# For R. Note that arrow is not installed (takes too long).
RUN R -e 'install.packages(c("blob", "hms", "tibble", "rlang", "testthat", "tibble", "vctrs", "withr"), repos = "https://cloud.r-project.org")'
+
+ENV NANOARROW_CMAKE_OPTIONS -DArrow_DIR=/arrow/lib/cmake/Arrow
+ENV CMAKE_BIN cmake3
+ENV CTEST_BIN ctest3
diff --git a/ci/docker/ubuntu.dockerfile b/ci/docker/ubuntu.dockerfile
index 7e731e5..7cd6d76 100644
--- a/ci/docker/ubuntu.dockerfile
+++ b/ci/docker/ubuntu.dockerfile
@@ -19,7 +19,7 @@ ARG NANOARROW_ARCH
FROM --platform=linux/${NANOARROW_ARCH} ubuntu:latest
-RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales git cmake r-base gnupg curl
+RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales git cmake r-base gnupg curl valgrind
RUN locale-gen en_US.UTF-8 && update-locale en_US.UTF-8
# For Arrow C++
@@ -29,5 +29,10 @@ RUN apt-get install -y -V ca-certificates lsb-release wget && \
apt-get update && \
apt-get install -y -V libarrow-dev
-# For R. Note that arrow is not installed (takes too long).
+# For R. Note that we install arrow here so that the integration tests for R run
+# in at least one test image.
RUN R -e 'install.packages(c("blob", "hms", "tibble", "rlang", "testthat", "tibble", "vctrs", "withr"), repos = "https://cloud.r-project.org")'
+
+# Required for this to work on MacOS/arm64
+RUN mkdir ~/.R && echo "CXX17FLAGS += -fPIC" > ~/.R/Makevars
+RUN ARROW_USE_PKG_CONFIG=false ARROW_R_DEV=true R -e 'install.packages("arrow", repos = "https://cloud.r-project.org"); library(arrow)'