blob: 13121a484d686fa9cd552fb2a40f588790eb4023 [file] [log] [blame]
# 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.
os: linux
services:
- docker
# Update docker to support newer docker-compose versions
addons:
apt:
packages:
- docker-ce
# don't build twice
if: tag IS blank
env:
global:
- PLAT=x86_64
- TRAVIS_TAG={{ task.tag }}
before_script:
- sudo pip install -U docker-compose
script:
- git clone --no-checkout {{ arrow.remote }} arrow
- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
- git -C arrow checkout FETCH_HEAD
- mkdir -p dist
# build wheel
- pushd arrow
# Pull testing resources
- git submodule init
- git submodule update
# don't attempt to build it, because the base image by pypa is updated
# regularly and would cause undeterministic builds
- BUILD_IMAGE=python-{{ wheel_tag }}
- docker-compose pull $BUILD_IMAGE
- docker-compose run
-e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }}
-e PYTHON_VERSION="{{ python_version }}"
-e UNICODE_WIDTH="{{ unicode_width }}"
$BUILD_IMAGE
# run auditwheel, it does always exit with 0 so it is mostly for debugging
# purposes
- docker run -v `pwd`:/arrow quay.io/pypa/{{ wheel_tag }}_x86_64 /bin/bash -c
"auditwheel show /arrow/python/{{ wheel_tag }}/dist/*.whl"
# test on multiple distributions
{%- for image in test_docker_images %}
- docker run -it --shm-size 2G -v `pwd`:/arrow -e WHEEL_TAG="{{ wheel_tag }}"
{%- if test_remove_system_libs %}
{{ image }} /arrow/dev/tasks/python-wheels/manylinux-test.sh --remove-system-libs
{%- else %}
{{ image }} /arrow/dev/tasks/python-wheels/manylinux-test.sh
{%- endif %}
{%- endfor %}
- popd
# prepare for deployment
- sudo mv arrow/python/{{ wheel_tag }}/dist/* dist/
deploy:
provider: releases
api_key: $CROSSBOW_GITHUB_TOKEN
file_glob: true
file: dist/*.whl
skip_cleanup: true
on:
tags: true
notifications:
email:
- {{ job.email }}