Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,40 @@ jobs:
cd docker
./run-one.sh local main ${{ matrix.os }}

riscv64:
name: "RISC-V ${{ matrix.os }}"
needs: [license-check]
runs-on: ubuntu-latest
timeout-minutes: 180
strategy:
fail-fast: false
max-parallel: 20
matrix:
os:
- riscv64-ubuntu26
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/riscv64
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: |
cd docker/${{ matrix.os }}
docker buildx build --platform linux/riscv64 --load \
--cache-from type=gha,scope=riscv64-ubuntu26 \
--cache-to type=gha,mode=max,scope=riscv64-ubuntu26 \
-t orc-riscv64 .
- name: Build ORC with RVV
env:
QEMU_CPU: rv64,v=on,vlen=128,vext_spec=v1.0
run: |
docker run --platform linux/riscv64 --rm -e QEMU_CPU -v $(pwd):/root/orc orc-riscv64 /bin/bash -c \
"mkdir -p build && cd build && cmake -DBUILD_JAVA=OFF -DBUILD_ENABLE_RVV=ON -DCMAKE_BUILD_TYPE=Release ../orc && make -j\$(nproc) package"

build:
name: "Java ${{ matrix.java }} and ${{ matrix.cxx }} on ${{ matrix.os }}"
needs: [license-check]
Expand Down
1 change: 1 addition & 0 deletions docker/os-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ oraclelinux9
oraclelinux10
amazonlinux23
ubi10
riscv64-ubuntu26
64 changes: 64 additions & 0 deletions docker/riscv64-ubuntu26/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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.

# ORC compile for RISC-V Ubuntu 26
#

FROM --platform=linux/riscv64 ubuntu:26.04
LABEL org.opencontainers.image.authors="Apache ORC project <dev@orc.apache.org>"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.ref.name="Apache ORC on RISC-V Ubuntu 26"
LABEL org.opencontainers.image.version=""
ARG jdk=21
ARG cc=gcc

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
git \
libsasl2-dev \
libssl-dev \
make \
curl \
maven \
openjdk-${jdk}-jdk-headless \
tzdata \
$( [ "${cc}" = "gcc" ] && echo "gcc g++" || echo "clang" ) && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
if [ "${cc}" != "gcc" ] ; then \
update-alternatives --set cc /usr/bin/clang && \
update-alternatives --set c++ /usr/bin/clang++; \
fi
RUN update-alternatives --set java \
$(update-alternatives --list java | grep "java-${jdk}-openjdk") && \
update-alternatives --set javac \
$(update-alternatives --list javac | grep "java-${jdk}-openjdk")

ENV CC=cc
ENV CXX=c++

RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime && \
mkdir -p /usr/share/zoneinfo/US && \
ln -fs /usr/share/zoneinfo/America/Los_Angeles /usr/share/zoneinfo/US/Pacific

WORKDIR /root
VOLUME /root/.m2/repository

CMD ["/bin/bash", "-c", "if [ ! -d orc ]; then echo \"No volume provided, building from apache main.\"; echo \"Pass '-v\`pwd\`:/root/orc' to docker run to build local source.\"; git clone https://github.com/apache/orc.git -b main; fi && mkdir build && cd build && cmake ../orc && make package test-out"]