1# Licensed to the Apache Software Foundation (ASF) under one
2# or more contributor license agreements.  See the NOTICE file
3# distributed with this work for additional information
4# regarding copyright ownership.  The ASF licenses this file
5# to you under the Apache License, Version 2.0 (the
6# "License"); you may not use this file except in compliance
7# with the License.  You may obtain a copy of the License at
8#
9#   http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing,
12# software distributed under the License is distributed on an
13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14# KIND, either express or implied.  See the License for the
15# specific language governing permissions and limitations
16# under the License.
17
18dist: bionic
19
20language: minimal
21
22cache:
23  directories:
24    - $TRAVIS_BUILD_DIR/.docker
25
26addons:
27  apt:
28    packages:
29      - python3-pip
30
31services:
32  - docker
33
34jobs:
35  include:
36    - name: "C++ on ARM"
37      os: linux
38      arch: arm64
39      env:
40        ARCH: arm64v8
41        ARROW_CI_MODULES: "CPP"
42        DOCKER_IMAGE_ID: ubuntu-cpp
43        UBUNTU: "20.04"
44    - name: "C++ on s390x"
45      os: linux
46      arch: s390x
47      env:
48        ARCH: s390x
49        ARROW_CI_MODULES: "CPP"
50        ARROW_FLIGHT: "ON"
51        ARROW_PARQUET: "OFF"
52        DOCKER_IMAGE_ID: ubuntu-cpp
53        PARQUET_BUILD_EXAMPLES: "OFF"
54        PARQUET_BUILD_EXECUTABLES: "OFF"
55        Protobuf_SOURCE: "BUNDLED"
56        UBUNTU: "20.04"
57        cares_SOURCE: "BUNDLED"
58        gRPC_SOURCE: "BUNDLED"
59
60env:
61  DOCKER_BUILDKIT: 0
62  COMPOSE_DOCKER_CLI_BUILD: 1
63  ARROW_ENABLE_TIMING_TESTS: "OFF"
64
65before_install:
66  - eval "$(python ci/detect-changes.py)"
67  - |
68    arrow_ci_affected=no
69    for arrow_ci_module in ${ARROW_CI_MODULES}; do
70      arrow_ci_affected_variable=ARROW_CI_${arrow_ci_module}_AFFECTED
71      if [ "$(eval "echo \$${arrow_ci_affected_variable}")" = "1" ]; then
72        arrow_ci_affected=yes
73      fi
74    done
75    if [ "${arrow_ci_affected}" = "no" ]; then
76      travis_terminate 0
77    fi
78
79install:
80  - pip3 install -e dev/archery[docker]
81
82script:
83  - sudo sysctl -w kernel.core_pattern="core.%e.%p"
84  # This isn't allowed on Travis CI:
85  #   /home/travis/.travis/functions: line 109: ulimit: core file size: cannot modify limit: Operation not permitted
86  - |
87    ulimit -c unlimited || :
88  - |
89    archery docker run \
90      -e ARROW_FLIGHT=${ARROW_FLIGHT:-OFF} \
91      -e ARROW_PARQUET=${ARROW_PARQUET:-ON} \
92      -e PARQUET_BUILD_EXAMPLES=${PARQUET_BUILD_EXAMPLES:-ON} \
93      -e PARQUET_BUILD_EXECUTABLES=${PARQUET_BUILD_EXECUTABLES:-ON} \
94      -e Protobuf_SOURCE=${Protobuf_SOURCE:-} \
95      -e cares_SOURCE=${cares_SOURCE:-} \
96      -e gRPC_SOURCE=${gRPC_SOURCE:-} \
97      --volume ${PWD}/build:/build \
98      ${DOCKER_IMAGE_ID}
99
100after_success:
101  - |
102    if [ "${TRAVIS_EVENT_TYPE}" = "push" -a \
103         "${TRAVIS_REPO_SLUG}" = "apache/arrow" ]; then
104      archery docker push ${DOCKER_IMAGE_ID} || :
105    fi
106