You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2022/02/22 08:09:57 UTC

[orc] branch main updated: ORC-1118: Support Java 17 and ARM64 docker tests (#1047)

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/main by this push:
     new 827bc67  ORC-1118: Support Java 17 and ARM64 docker tests (#1047)
827bc67 is described below

commit 827bc67083ab396701c718643609255860704ca4
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Tue Feb 22 00:09:53 2022 -0800

    ORC-1118: Support Java 17 and ARM64 docker tests (#1047)
    
    ### What changes were proposed in this pull request?
    
    This PR aims two goals:
    - Support Java 17 docker test
    - Support ARM64 docker test
    
    ### Why are the changes needed?
    
    The current test Dockerfile contains a hardcoded architecture postfix `-amd64` which was broken on ARM64.
    Although we only support Apple Silicon so far, this test suite should support ARM64 first.
    
    ### How was this patch tested?
    
    Manually tested with the build argument in the OS directories on ARM64 machine.
    ```
    docker build -t test --build-arg jdk=17 .
    ```
    
    Note that `protoc 2.5.0` supports only Intel Architecture and `Apple Silicon` so far. We cannot make the all Docker tests pass on ARM64.
---
 docker/debian10/Dockerfile | 6 +++---
 docker/debian11/Dockerfile | 6 +++---
 docker/ubuntu18/Dockerfile | 3 ++-
 docker/ubuntu20/Dockerfile | 3 ++-
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/docker/debian10/Dockerfile b/docker/debian10/Dockerfile
index ab5a100..863656e 100644
--- a/docker/debian10/Dockerfile
+++ b/docker/debian10/Dockerfile
@@ -41,10 +41,10 @@ RUN apt-get install -y \
     add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ && \
     apt-get update && \
     apt-get install -y adoptopenjdk-8-hotspot && \
-    update-alternatives --set java /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java && \
-    update-alternatives --set javac /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/javac; \
+    update-alternatives --set java $(update-alternatives --list java | grep ${jdk}) && \
+    update-alternatives --set javac $(update-alternatives --list javac | grep ${jdk}); \
   else \
-    apt-get install -y openjdk-11-jdk; \
+    apt-get install -y openjdk-${jdk}-jdk; \
   fi
 
 WORKDIR /root
diff --git a/docker/debian11/Dockerfile b/docker/debian11/Dockerfile
index 86ec0ae..943735e 100644
--- a/docker/debian11/Dockerfile
+++ b/docker/debian11/Dockerfile
@@ -41,10 +41,10 @@ RUN apt-get install -y \
     add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ && \
     apt-get update && \
     apt-get install -y adoptopenjdk-8-hotspot && \
-    update-alternatives --set java /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java && \
-    update-alternatives --set javac /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/javac; \
+    update-alternatives --set java $(update-alternatives --list java | grep ${jdk}) && \
+    update-alternatives --set javac $(update-alternatives --list javac | grep ${jdk}); \
   else \
-    apt-get install -y openjdk-11-jdk; \
+    apt-get install -y openjdk-${jdk}-jdk; \
   fi
 
 WORKDIR /root
diff --git a/docker/ubuntu18/Dockerfile b/docker/ubuntu18/Dockerfile
index f8782ae..3e6a65c 100644
--- a/docker/ubuntu18/Dockerfile
+++ b/docker/ubuntu18/Dockerfile
@@ -35,7 +35,8 @@ RUN apt-get install -y \
   maven \
   openjdk-${jdk}-jdk \
   tzdata
-RUN update-java-alternatives --set java-1.${jdk}.0-openjdk-amd64
+RUN update-alternatives --set java $(update-alternatives --list java | grep ${jdk}) && \
+    update-alternatives --set javac $(update-alternatives --list javac | grep ${jdk})
 
 WORKDIR /root
 VOLUME /root/.m2/repository
diff --git a/docker/ubuntu20/Dockerfile b/docker/ubuntu20/Dockerfile
index 936ce3b..79d0e22 100644
--- a/docker/ubuntu20/Dockerfile
+++ b/docker/ubuntu20/Dockerfile
@@ -45,7 +45,8 @@ RUN apt-get install -y \
     update-alternatives --set cc  /usr/bin/clang && \
     update-alternatives --set c++ /usr/bin/clang++ \
   ; fi
-RUN update-java-alternatives --set java-1.${jdk}.0-openjdk-amd64
+RUN update-alternatives --set java $(update-alternatives --list java | grep ${jdk}) && \
+    update-alternatives --set javac $(update-alternatives --list javac | grep ${jdk})
 
 ENV CC=cc
 ENV CXX=c++