From 3ee8213a081374225d3a186c76dd46b823e70d66 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 2 Dec 2021 06:01:48 +0900 Subject: [PATCH] Remove CLANG_TOOLS from test-r-ubuntu-21.04 and test-r-gcc-11 --- ci/docker/ubuntu-20.04-cpp.dockerfile | 13 +++++++++---- ci/docker/ubuntu-21.04-cpp.dockerfile | 21 ++++++++++++++------- dev/tasks/tasks.yml | 2 -- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/ci/docker/ubuntu-20.04-cpp.dockerfile b/ci/docker/ubuntu-20.04-cpp.dockerfile index ad23a67121caa..7bd99aa1fb0ff 100644 --- a/ci/docker/ubuntu-20.04-cpp.dockerfile +++ b/ci/docker/ubuntu-20.04-cpp.dockerfile @@ -29,20 +29,25 @@ RUN echo "debconf debconf/frontend select Noninteractive" | \ # while debugging package list with docker build. ARG clang_tools ARG llvm -RUN if [ ${llvm} -gt 10 -o ${clang_tools} -gt 10 ]; then \ +RUN latest_system_llvm=10 && \ + if [ ${llvm} -gt ${latest_system_llvm} -o \ + ${clang_tools} -gt ${latest_system_llvm} ]; then \ apt-get update -y -q && \ apt-get install -y -q --no-install-recommends \ apt-transport-https \ ca-certificates \ gnupg \ + lsb-release \ wget && \ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ + code_name=$(lsb_release --codename --short) && \ if [ ${llvm} -gt 10 ]; then \ - echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-${llvm} main" > \ + echo "deb https://apt.llvm.org/${code_name}/ llvm-toolchain-${code_name}-${llvm} main" > \ /etc/apt/sources.list.d/llvm.list; \ fi && \ - if [ ${clang_tools} -ne ${llvm} -a ${clang_tools} -gt 10 ]; then \ - echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-${clang_tools} main" > \ + if [ ${clang_tools} -ne ${llvm} -a \ + ${clang_tools} -gt ${latest_system_llvm} ]; then \ + echo "deb https://apt.llvm.org/${code_name}/ llvm-toolchain-${code_name}-${clang_tools} main" > \ /etc/apt/sources.list.d/clang-tools.list; \ fi; \ fi && \ diff --git a/ci/docker/ubuntu-21.04-cpp.dockerfile b/ci/docker/ubuntu-21.04-cpp.dockerfile index 2017d26b5bd6d..a6a88040540ef 100644 --- a/ci/docker/ubuntu-21.04-cpp.dockerfile +++ b/ci/docker/ubuntu-21.04-cpp.dockerfile @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -ARG base=amd64/ubuntu:20.04 +ARG base=amd64/ubuntu:21.04 FROM ${base} SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -29,20 +29,27 @@ RUN echo "debconf debconf/frontend select Noninteractive" | \ # while debugging package list with docker build. ARG clang_tools ARG llvm -RUN if [ "${llvm}" -gt "10" ]; then \ +RUN latest_system_llvm=12 && \ + if [ ${llvm} -gt ${latest_system_llvm} -o \ + ${clang_tools} -gt ${latest_system_llvm} ]; then \ apt-get update -y -q && \ apt-get install -y -q --no-install-recommends \ apt-transport-https \ ca-certificates \ gnupg \ + lsb-release \ wget && \ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ - echo "deb https://apt.llvm.org/hirsute/ llvm-toolchain-hirsute-${llvm} main" > \ - /etc/apt/sources.list.d/llvm.list && \ - if [ "${clang_tools}" != "${llvm}" -a "${clang_tools}" -gt 10 ]; then \ - echo "deb https://apt.llvm.org/hirsute/ llvm-toolchain-hirsute-${clang_tools} main" > \ + code_name=$(lsb_release --codename --short) && \ + if [ ${llvm} -gt 10 ]; then \ + echo "deb https://apt.llvm.org/${code_name}/ llvm-toolchain-${code_name}-${llvm} main" > \ + /etc/apt/sources.list.d/llvm.list; \ + fi && \ + if [ ${clang_tools} -ne ${llvm} -a \ + ${clang_tools} -gt ${latest_system_llvm} ]; then \ + echo "deb https://apt.llvm.org/${code_name}/ llvm-toolchain-${code_name}-${clang_tools} main" > \ /etc/apt/sources.list.d/clang-tools.list; \ - fi \ + fi; \ fi && \ apt-get update -y -q && \ apt-get install -y -q --no-install-recommends \ diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 5e7b84bd417a7..33ccbc4de4466 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -1186,7 +1186,6 @@ tasks: params: env: UBUNTU: 21.04 - CLANG_TOOLS: 9 # can remove this when >=9 is the default R_PRUNE_DEPS: TRUE flags: '-e ARROW_SOURCE_HOME="/arrow" -e FORCE_BUNDLED_BUILD=TRUE -e LIBARROW_BUILD=TRUE' image: ubuntu-r-only-r @@ -1198,7 +1197,6 @@ tasks: params: env: UBUNTU: 21.04 - CLANG_TOOLS: 9 # can remove this when >=9 is the default GCC_VERSION: 11 # S3 support is not buildable with gcc11 right now flags: '-e ARROW_SOURCE_HOME="/arrow" -e FORCE_BUNDLED_BUILD=TRUE -e LIBARROW_BUILD=TRUE -e ARROW_S3=OFF'