Skip to content

Commit

Permalink
ARROW-17358: [CI][C++] Add a job for Alpine Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 9, 2022
1 parent cc9b89a commit b4f519a
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ ULIMIT_CORE=-1

# Default versions for platforms
ALMALINUX=8
ALPINE_LINUX=3.16
DEBIAN=11
FEDORA=35
UBUNTU=20.04
Expand Down
96 changes: 96 additions & 0 deletions ci/docker/alpine-linux-3.16-cpp.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# 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.

ARG arch=amd64
FROM ${arch}/alpine:3.16

RUN apk add \
bash \
benchmark-dev \
boost-dev \
brotli-dev \
bzip2-dev \
c-ares-dev \
ccache \
clang \
cmake \
curl-dev \
g++ \
gcc \
gdb \
gflags-dev \
git \
glog-dev \
gmock \
grpc-dev \
gtest-dev \
libxml2-dev \
llvm13-dev \
llvm13-static \
lz4-dev \
make \
nlohmann-json \
openssl-dev \
pkgconfig \
protobuf-dev \
py3-pip \
py3-numpy-dev \
python3-dev \
rapidjson-dev \
re2-dev \
rsync \
samurai \
snappy-dev \
sqlite-dev \
thrift-dev \
tzdata \
utf8proc-dev \
zlib-dev \
zstd-dev

COPY ci/scripts/install_minio.sh /arrow/ci/scripts/
RUN /arrow/ci/scripts/install_minio.sh latest /usr/local

COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/
RUN /arrow/ci/scripts/install_gcs_testbench.sh default

ENV ARROW_BUILD_TESTS=ON \
ARROW_DATASET=ON \
ARROW_DEPENDENCY_SOURCE=SYSTEM \
ARROW_FLIGHT=ON \
ARROW_FLIGHT_SQL=ON \
ARROW_GANDIVA=ON \
ARROW_GCS=ON \
ARROW_HOME=/usr/local \
ARROW_ORC=ON \
ARROW_PARQUET=ON \
ARROW_PLASMA=ON \
ARROW_S3=ON \
ARROW_USE_CCACHE=ON \
ARROW_WITH_BROTLI=ON \
ARROW_WITH_BZ2=ON \
ARROW_WITH_LZ4=ON \
ARROW_WITH_OPENTELEMETRY=OFF \
ARROW_WITH_SNAPPY=ON \
ARROW_WITH_ZLIB=ON \
ARROW_WITH_ZSTD=ON \
AWSSDK_SOURCE=BUNDLED \
CMAKE_CXX_STANDARD=17 \
google_cloud_cpp_storage_SOURCE=BUNDLED \
ORC_SOURCE=BUNDLED \
PATH=/usr/lib/ccache/:$PATH \
xsimd_SOURCE=BUNDLED
3 changes: 2 additions & 1 deletion dev/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,8 @@ tasks:

############################## Docker tests ##################################

{% for image in ["conda-cpp",
{% for image in ["alpine-linux-cpp",
"conda-cpp",
"debian-c-glib",
"ubuntu-c-glib",
"debian-ruby",
Expand Down
39 changes: 36 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ x-hierarchy:
# descendant images if any. Archery checks that all node has a corresponding
# service entry, so any new image/service must be listed here.
- almalinux-verify-rc
- alpine-linux-cpp
- centos-cpp-static
- conda:
- conda-cpp:
Expand Down Expand Up @@ -162,6 +163,8 @@ x-hierarchy:
volumes:
almalinux-ccache:
name: ${ARCH}-almalinux-ccache
alpine-linux-ccache:
name: ${ARCH}-alpine-linux-ccache
conda-ccache:
name: ${ARCH}-conda-ccache
debian-ccache:
Expand Down Expand Up @@ -192,6 +195,37 @@ services:
# -e ARROW_TEST_LINKAGE=static \
# conda-cpp|debian-cpp|...

alpine-linux-cpp:
# Usage:
# docker-compose build alpine-linux-cpp
# docker-compose run --rm alpine-linux-cpp
# Parameters:
# ALPINE_LINUX: 3.16
# ARCH: amd64, arm64v8, ...
image: ${REPO}:${ARCH}-alpine-linux-${ALPINE_LINUX}-cpp
build:
context: .
dockerfile: ci/docker/alpine-linux-${ALPINE_LINUX}-cpp.dockerfile
cache_from:
- ${REPO}:${ARCH}-alpine-linux-${ALPINE_LINUX}-cpp
args:
arch: ${ARCH}
shm_size: &shm-size 2G
ulimits: &ulimits
core: ${ULIMIT_CORE}
environment:
<<: *ccache
ARROW_ENABLE_TIMING_TESTS: # inherit
ARROW_MIMALLOC: "ON"
volumes: &alpine-linux-volumes
- .:/arrow:delegated
- ${DOCKER_VOLUME_PREFIX}alpine-linux-ccache:/ccache:delegated
command: |-
/bin/bash -c "
/arrow/ci/scripts/cpp_build.sh /arrow /build &&
/arrow/ci/scripts/cpp_test.sh /arrow /build
"
conda:
# Base image for conda builds.
#
Expand Down Expand Up @@ -229,9 +263,8 @@ services:
args:
repo: ${REPO}
arch: ${ARCH}
shm_size: &shm-size 2G
ulimits: &ulimits
core: ${ULIMIT_CORE}
shm_size: *shm-size
ulimits: *ulimits
environment:
<<: *ccache
ARROW_BUILD_BENCHMARKS: "ON"
Expand Down

0 comments on commit b4f519a

Please sign in to comment.