From 06af4458f0d830f32f9df2bea9748525fab2f796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Thu, 5 Apr 2018 17:35:58 +0200 Subject: [PATCH 01/60] initial commit for packaging mvp --- cd/appveyor-win-conda.yml | 5 ++ cd/appveyor-win-wheel.yml | 5 ++ cd/travis-linux-conda.yml | 8 +++ cd/travis-linux-packages.yml | 8 +++ cd/travis-linux-wheel.yml | 7 +++ cd/travis-osx-conda.yml | 8 +++ cd/travis-osx-wheel.yml | 7 +++ cd/xbow.py | 95 ++++++++++++++++++++++++++++++++++++ 8 files changed, 143 insertions(+) create mode 100644 cd/appveyor-win-conda.yml create mode 100644 cd/appveyor-win-wheel.yml create mode 100644 cd/travis-linux-conda.yml create mode 100644 cd/travis-linux-packages.yml create mode 100644 cd/travis-linux-wheel.yml create mode 100644 cd/travis-osx-conda.yml create mode 100644 cd/travis-osx-wheel.yml create mode 100644 cd/xbow.py diff --git a/cd/appveyor-win-conda.yml b/cd/appveyor-win-conda.yml new file mode 100644 index 000000000000..c9f92fd4c41e --- /dev/null +++ b/cd/appveyor-win-conda.yml @@ -0,0 +1,5 @@ +os: Visual Studio 2015 + +build_script: + - git clone https://github.com/apache/arrow + - cmd: "echo Hello, world!" diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml new file mode 100644 index 000000000000..c9f92fd4c41e --- /dev/null +++ b/cd/appveyor-win-wheel.yml @@ -0,0 +1,5 @@ +os: Visual Studio 2015 + +build_script: + - git clone https://github.com/apache/arrow + - cmd: "echo Hello, world!" diff --git a/cd/travis-linux-conda.yml b/cd/travis-linux-conda.yml new file mode 100644 index 000000000000..968ed799721d --- /dev/null +++ b/cd/travis-linux-conda.yml @@ -0,0 +1,8 @@ +language: python +python: 3.5 +sudo: required +dist: trusty + +script: + - git clone https://github.com/apache/arrow + - echo "Hello, World" diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml new file mode 100644 index 000000000000..968ed799721d --- /dev/null +++ b/cd/travis-linux-packages.yml @@ -0,0 +1,8 @@ +language: python +python: 3.5 +sudo: required +dist: trusty + +script: + - git clone https://github.com/apache/arrow + - echo "Hello, World" diff --git a/cd/travis-linux-wheel.yml b/cd/travis-linux-wheel.yml new file mode 100644 index 000000000000..120ad4448f41 --- /dev/null +++ b/cd/travis-linux-wheel.yml @@ -0,0 +1,7 @@ +language: python +python: 3.5 +sudo: required +dist: trusty + +script: +- echo "Hello, World" diff --git a/cd/travis-osx-conda.yml b/cd/travis-osx-conda.yml new file mode 100644 index 000000000000..f4ff64d3d796 --- /dev/null +++ b/cd/travis-osx-conda.yml @@ -0,0 +1,8 @@ +os: osx +sudo: required +language: objective-c + +script: + - git clone https://github.com/apache/arrow + - echo "Hello, World" + diff --git a/cd/travis-osx-wheel.yml b/cd/travis-osx-wheel.yml new file mode 100644 index 000000000000..353aa94b8283 --- /dev/null +++ b/cd/travis-osx-wheel.yml @@ -0,0 +1,7 @@ +os: osx +sudo: required +language: objective-c + +script: + - git clone https://github.com/apache/arrow + - echo "Hello, World" diff --git a/cd/xbow.py b/cd/xbow.py new file mode 100644 index 000000000000..0f5225aa6577 --- /dev/null +++ b/cd/xbow.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python + +# we might weaken the dependencies later, but a release manager probably +# can have these installed +import pygit2 + +from pygit2 import Signature, Repository, UserPass, RemoteCallbacks +from pathlib import Path + +# we should handle this later +signature = Signature('John Doe', 'jdoe@example.com', 12346, 0) +author = committer = signature + +message = 'disco!' + + +# --remote arg when it will clone otherwise locally +repo = Repository('/Users/krisz/Workspace/crossbow') + +head = repo[repo.head.target] # master's head +tree = head.tree + +print(tree) + +remote = repo.remotes['origin'] +refspecs = [] + +# create the build variants based on the arguments + +# iterate over the variants +cwd = Path(__file__).parent + + +for config in cwd.glob('*.yml'): + branch_name = config.stem + refspecs.append('refs/heads/{}'.format(branch_name)) + + + if branch_name in repo.branches: + # choose the appropiate branch + branch = repo.branches[branch_name] + else: + # otherwise we initialize it + branch = repo.branches.create(branch_name, head) + + # do the actual checkout + repo.checkout(branch) + + # creating the tree we are going to push + builder = repo.TreeBuilder(head.tree) + + # creating the file inside git object db + content = config.read_text() + blob_sha = repo.create_blob(content) + blob = repo[blob_sha] + + if 'travis' in str(config): + target = '.travis.yml' + elif 'appveyor' in str('config'): + target = 'appveyor.yml' + else: + ValueError('raise sommething') + + builder.insert(target, blob_sha, pygit2.GIT_FILEMODE_BLOB) + tree_sha = builder.write() + + print(tree_sha) + + parent_shas = [repo.head.target] # point to the currently checked out branch's head + commit_sha = repo.create_commit('HEAD', author, committer, message, tree_sha, + [repo.head.target]) + + commit = repo[commit_sha] + print(commit) + + +def acquire_credentials_cb(url, username_from_url, allowed_types): + print('credentials', url, username_from_url, allowed_types) + token = '64692d0e3c55a2e5652c3c350ffbbd51fd354af8' + return UserPass(token, 'x-oauth-basic') + + +class GitRemoteCallbacks(pygit2.RemoteCallbacks): + + + def push_update_reference(self, refname, message): + print(refname, message) + + def update_tips(self, refname, old, new): + print(refname, old, new) + + +callbacks = GitRemoteCallbacks(credentials=acquire_credentials_cb) + +remote.push(refspecs, callbacks=callbacks) From 5c96243491e56fd9f55da7b1b03d90516b30b55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Thu, 5 Apr 2018 17:44:13 +0200 Subject: [PATCH 02/60] fix appveyor condition --- cd/xbow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cd/xbow.py b/cd/xbow.py index 0f5225aa6577..a14560f1a778 100644 --- a/cd/xbow.py +++ b/cd/xbow.py @@ -56,7 +56,7 @@ if 'travis' in str(config): target = '.travis.yml' - elif 'appveyor' in str('config'): + elif 'appveyor' in str(config): target = 'appveyor.yml' else: ValueError('raise sommething') @@ -76,7 +76,7 @@ def acquire_credentials_cb(url, username_from_url, allowed_types): print('credentials', url, username_from_url, allowed_types) - token = '64692d0e3c55a2e5652c3c350ffbbd51fd354af8' + token = '' return UserPass(token, 'x-oauth-basic') From e38a7166367c9db53850ee8a00f85e070d4d8928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 6 Apr 2018 15:47:48 +0200 Subject: [PATCH 03/60] don't checkout during branch modification; edited templates --- cd/osx-wheel/config.sh | 161 +++++++++++++++++++++++++++++++++++ cd/travis-linux-packages.yml | 15 ++-- cd/travis-linux-wheel.yml | 28 +++++- cd/travis-osx-wheel.yml | 59 ++++++++++++- cd/xbow.py | 34 ++++---- 5 files changed, 270 insertions(+), 27 deletions(-) create mode 100755 cd/osx-wheel/config.sh diff --git a/cd/osx-wheel/config.sh b/cd/osx-wheel/config.sh new file mode 100755 index 000000000000..43bad901bef3 --- /dev/null +++ b/cd/osx-wheel/config.sh @@ -0,0 +1,161 @@ +#!/bin/bash + +# 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. + +set -e + +function build_wheel { + pip install -U pip + pip install setuptools_scm + echo `pwd` + export PATH="/usr/local/opt/flex/bin:/usr/local/opt/bison/bin:$PATH" + echo CFLAGS=${CFLAGS} + echo CXXFLAGS=${CXXFLAGS} + echo LDFLAGS=${LDFLAGS} + pushd $1 + + boost_version="1.65.1" + boost_directory_name="boost_${boost_version//\./_}" + boost_tarball_name="${boost_directory_name}.tar.gz" + wget --no-check-certificate \ + http://downloads.sourceforge.net/project/boost/boost/"${boost_version}"/"${boost_tarball_name}" \ + -O "${boost_tarball_name}" + tar xf "${boost_tarball_name}" + + arrow_boost="$PWD/arrow_boost" + arrow_boost_dist="$PWD/arrow_boost_dist" + mkdir "$arrow_boost" "$arrow_boost_dist" + pushd "${boost_directory_name}" + + # Arrow is 64-bit-only at the moment + export CFLAGS="-fPIC -arch x86_64 ${CFLAGS//"-arch i386"/}" + export CXXFLAGS="-fPIC -arch x86_64 ${CXXFLAGS//"-arch i386"} -std=c++11" + + ./bootstrap.sh + ./b2 tools/bcp > /dev/null 2>&1 + ./dist/bin/bcp --namespace=arrow_boost --namespace-alias \ + filesystem date_time system regex build algorithm locale format \ + "$arrow_boost" > /dev/null 2>&1 + + popd + pushd "$arrow_boost" + ./bootstrap.sh + ./bjam cxxflags="${CXXFLAGS}" \ + linkflags="-std=c++11" \ + cflags="${CFLAGS}" \ + variant=release \ + link=shared \ + --prefix="$arrow_boost_dist" \ + --with-filesystem --with-date_time --with-system --with-regex \ + install > /dev/null 2>&1 + popd + + export THRIFT_HOME=/usr/local + export THRIFT_VERSION=0.11.0 + wget http://archive.apache.org/dist/thrift/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}.tar.gz + tar xf thrift-${THRIFT_VERSION}.tar.gz + pushd thrift-${THRIFT_VERSION} + mkdir build-tmp + pushd build-tmp + cmake -DCMAKE_BUILD_TYPE=release \ + "-DCMAKE_CXX_FLAGS=-fPIC" \ + "-DCMAKE_C_FLAGS=-fPIC" \ + "-DCMAKE_INSTALL_PREFIX=${THRIFT_HOME}" \ + "-DCMAKE_INSTALL_RPATH=${THRIFT_HOME}/lib" \ + "-DBUILD_SHARED_LIBS=OFF" \ + "-DBUILD_TESTING=OFF" \ + "-DWITH_QT4=OFF" \ + "-DWITH_C_GLIB=OFF" \ + "-DWITH_JAVA=OFF" \ + "-DWITH_PYTHON=OFF" \ + "-DWITH_CPP=ON" \ + "-DWITH_STATIC_LIB=ON" \ + "-DWITH_LIBEVENT=OFF" \ + -DBoost_NAMESPACE=arrow_boost \ + -DBOOST_ROOT="$arrow_boost_dist" \ + .. + make install -j5 + popd + popd + + export ARROW_HOME=/usr/local + export PARQUET_HOME=/usr/local + pip install "cython==0.27.3" "numpy==${NP_TEST_DEP}" + pushd cpp + mkdir build + pushd build + cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \ + -DARROW_BUILD_TESTS=OFF \ + -DARROW_BUILD_SHARED=ON \ + -DARROW_BOOST_USE_SHARED=ON \ + -DARROW_JEMALLOC=OFF \ + -DARROW_PLASMA=ON \ + -DARROW_RPATH_ORIGIN=ON \ + -DARROW_JEMALLOC_USE_SHARED=OFF \ + -DARROW_PYTHON=ON \ + -DARROW_ORC=ON \ + -DBOOST_ROOT="$arrow_boost_dist" \ + -DBoost_NAMESPACE=arrow_boost \ + -DMAKE=make \ + .. + make -j5 + make install + popd + popd + + git clone https://github.com/apache/parquet-cpp.git + pushd parquet-cpp + mkdir build + pushd build + cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$PARQUET_HOME \ + -DPARQUET_VERBOSE_THIRDPARTY_BUILD=ON \ + -DPARQUET_BUILD_TESTS=OFF \ + -DPARQUET_BOOST_USE_SHARED=ON \ + -DBoost_NAMESPACE=arrow_boost \ + -DBOOST_ROOT="$arrow_boost_dist" \ + .. + make -j5 VERBOSE=1 + make install + popd + popd + + unset ARROW_HOME + unset PARQUET_HOME + export PYARROW_WITH_PARQUET=1 + export PYARROW_WITH_ORC=1 + export PYARROW_WITH_JEMALLOC=1 + export PYARROW_WITH_PLASMA=1 + export PYARROW_BUNDLE_BOOST=1 + export PYARROW_BUNDLE_ARROW_CPP=1 + export PYARROW_BUILD_TYPE='release' + export PYARROW_CMAKE_OPTIONS="-DBOOST_ROOT=$arrow_boost_dist" + export SETUPTOOLS_SCM_PRETEND_VERSION=$PYARROW_VERSION + pushd python + python setup.py build_ext \ + --with-plasma --with-orc --with-parquet \ + --bundle-arrow-cpp --bundle-boost --boost-namespace=arrow_boost \ + bdist_wheel + ls -l dist/ + for wheel in dist/*.whl; do + unzip -l "$wheel" + done + popd + popd +} diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index 968ed799721d..5b3c9d42ce34 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -1,8 +1,13 @@ -language: python -python: 3.5 -sudo: required +os: linux dist: trusty +sudo: required +language: cpp + +env: + global: + - PLAT=x86_64 + - BUILD_REF=7b2c79765cf92760e1f8cca079159d9613b86412 + - PYARROW_VERSION=0.9.0 script: - - git clone https://github.com/apache/arrow - - echo "Hello, World" + - cd cpp-linux && travis_wait 40 && rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no diff --git a/cd/travis-linux-wheel.yml b/cd/travis-linux-wheel.yml index 120ad4448f41..d88a0931cf8b 100644 --- a/cd/travis-linux-wheel.yml +++ b/cd/travis-linux-wheel.yml @@ -1,7 +1,27 @@ -language: python -python: 3.5 -sudo: required +env: + global: + - PLAT=x86_64 + - BUILD_REF=7b2c79765cf92760e1f8cca079159d9613b86412 + - PYARROW_VERSION=0.9.0 + +os: linux dist: trusty +sudo: required +language: cpp +services: + - docker +before_script: + - docker pull quay.io/xhochy/arrow_manylinux1_x86_64_base:latest +before_install: +install: script: -- echo "Hello, World" + - git clone https://github.com/apache/arrow arrow + - mkdir -p arrow/dist + - pushd arrow/python/manylinux1 + - docker build -t arrow-base-x86_64 -f Dockerfile-x86_64 . + - docker run --shm-size=2g --rm -e PYARROW_PARALLEL=3 + -e SETUPTOOLS_SCM_PRETEND_VERSION=$PYARROW_VERSION + -v $PWD:/io arrow-base-x86_64 /io/build_arrow.sh + - popd + - sudo mv arrow/python/manylinux1/dist/* dist/ diff --git a/cd/travis-osx-wheel.yml b/cd/travis-osx-wheel.yml index 353aa94b8283..9117644d3030 100644 --- a/cd/travis-osx-wheel.yml +++ b/cd/travis-osx-wheel.yml @@ -2,6 +2,61 @@ os: osx sudo: required language: objective-c -script: +env: + global: + - PLAT=x86_64 + - BUILD_REF=7b2c79765cf92760e1f8cca079159d9613b86412 + - PYARROW_VERSION=0.9.0 + +matrix: + exclude: + - python: 3.5 + include: + - env: + - MB_PYTHON_VERSION=2.7 + - NP_BUILD_DEP="1.10.1" + - NP_TEST_DEP="1.10.1" + - PANDAS_DEP="0.20.3" + - env: + - MB_PYTHON_VERSION=3.5 + - NP_BUILD_DEP="1.10.1" + - NP_TEST_DEP="1.10.1" + - PANDAS_DEP="0.20.3" + - env: + - MB_PYTHON_VERSION=3.6 + - NP_BUILD_DEP="1.11.3" + - NP_TEST_DEP="1.11.3" + - PANDAS_DEP="0.20.3" + +before_install: + - git clone https://github.com/matthew-brett/multibuild - git clone https://github.com/apache/arrow - - echo "Hello, World" + + # Also remove artifacts that depend on Boost + - brew uninstall boost cgal postgis sfcgal + - brew update + - brew upgrade cmake + - brew install bison flex + + - pushd arrow/cd/osx-wheel + - source multibuild/common_utils.sh + - source multibuild/travis_osx_steps.sh + - before_install + - popd + +install: + - BUILD_DEPENDS="numpy==$NP_BUILD_DEP six cython" + - TEST_DEPENDS="numpy==$NP_TEST_DEP six pandas==$PANDAS_DEP" + + - mkdir -p arrow/dist + - clean_code arrow $BUILD_REF + - build_wheel arrow $PLAT + - mv -v arrow/python/dist/* dist/ + +script: + - echo "SCRIPT" + - pwd + +after_success: + - echo "After success" + - pwd diff --git a/cd/xbow.py b/cd/xbow.py index a14560f1a778..98ac6a4a3890 100644 --- a/cd/xbow.py +++ b/cd/xbow.py @@ -17,10 +17,9 @@ # --remote arg when it will clone otherwise locally repo = Repository('/Users/krisz/Workspace/crossbow') -head = repo[repo.head.target] # master's head -tree = head.tree +master = repo.branches['master'] +head = repo[master.target] -print(tree) remote = repo.remotes['origin'] refspecs = [] @@ -33,7 +32,8 @@ for config in cwd.glob('*.yml'): branch_name = config.stem - refspecs.append('refs/heads/{}'.format(branch_name)) + reference = 'refs/heads/{}'.format(branch_name) + refspecs.append(reference) if branch_name in repo.branches: @@ -43,16 +43,18 @@ # otherwise we initialize it branch = repo.branches.create(branch_name, head) - # do the actual checkout - repo.checkout(branch) + # # do the actual checkout + # repo.checkout(branch) # creating the tree we are going to push builder = repo.TreeBuilder(head.tree) + print('creating blob') + # creating the file inside git object db content = config.read_text() - blob_sha = repo.create_blob(content) - blob = repo[blob_sha] + blob_id = repo.create_blob(content) + blob = repo[blob_id] if 'travis' in str(config): target = '.travis.yml' @@ -61,22 +63,22 @@ else: ValueError('raise sommething') - builder.insert(target, blob_sha, pygit2.GIT_FILEMODE_BLOB) - tree_sha = builder.write() + print('adding file {}'.format(target)) + builder.insert(target, blob_id, pygit2.GIT_FILEMODE_BLOB) + tree_id = builder.write() - print(tree_sha) - parent_shas = [repo.head.target] # point to the currently checked out branch's head - commit_sha = repo.create_commit('HEAD', author, committer, message, tree_sha, - [repo.head.target]) + commit_id = repo.create_commit(reference, author, committer, message, tree_id, + [branch.target]) - commit = repo[commit_sha] + commit = repo[commit_id] print(commit) def acquire_credentials_cb(url, username_from_url, allowed_types): print('credentials', url, username_from_url, allowed_types) - token = '' + # its a libgit2 bug, that it infinitly retries the authentication + token = '5f3ea541b44a23150d95eaa9b87a65edabf91ff3' return UserPass(token, 'x-oauth-basic') From 96c00b3e66b9400a6b3c5ece2752e5356fc871a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 6 Apr 2018 15:59:24 +0200 Subject: [PATCH 04/60] artifacts for building linux packages; ability to clone arrow fork --- cd/{xbow.py => crossbow.py} | 9 +- cd/linux-packages/.gitignore | 26 ++ cd/linux-packages/README.md | 38 +++ cd/linux-packages/Rakefile | 112 +++++++ cd/linux-packages/apt/build.sh | 68 ++++ .../apt/debian-stretch/Dockerfile | 49 +++ cd/linux-packages/apt/descriptor.json | 55 +++ .../apt/ubuntu-artful/Dockerfile | 47 +++ .../apt/ubuntu-trusty/Dockerfile | 43 +++ .../apt/ubuntu-xenial/Dockerfile | 48 +++ .../debian.ubuntu-trusty/changelog | 42 +++ cd/linux-packages/debian.ubuntu-trusty/compat | 1 + .../debian.ubuntu-trusty/control | 93 ++++++ .../debian.ubuntu-trusty/copyright | 193 +++++++++++ .../gir1.2-arrow-1.0.install | 1 + .../debian.ubuntu-trusty/libarrow-dev.install | 5 + .../libarrow-glib-dev.install | 6 + .../libarrow-glib-doc.doc-base | 9 + .../libarrow-glib-doc.install | 1 + .../libarrow-glib-doc.links | 3 + .../libarrow-glib0.install | 1 + .../libarrow-python0.install | 1 + .../debian.ubuntu-trusty/libarrow0.install | 1 + .../debian.ubuntu-trusty/patches/series | 0 cd/linux-packages/debian.ubuntu-trusty/rules | 52 +++ .../debian.ubuntu-trusty/source/format | 1 + cd/linux-packages/debian.ubuntu-trusty/watch | 2 + cd/linux-packages/debian/changelog | 45 +++ cd/linux-packages/debian/compat | 1 + cd/linux-packages/debian/control | 192 +++++++++++ cd/linux-packages/debian/copyright | 193 +++++++++++ .../debian/gir1.2-arrow-1.0.install | 1 + .../debian/gir1.2-arrow-gpu-1.0.install | 1 + cd/linux-packages/debian/libarrow-dev.install | 5 + .../debian/libarrow-glib-dev.install | 6 + .../debian/libarrow-glib-doc.doc-base | 9 + .../debian/libarrow-glib-doc.install | 1 + .../debian/libarrow-glib-doc.links | 3 + .../debian/libarrow-glib0.install | 1 + .../debian/libarrow-gpu-dev.install | 3 + .../debian/libarrow-gpu-glib-dev.install | 5 + .../debian/libarrow-gpu-glib0.install | 1 + .../debian/libarrow-gpu0.install | 1 + .../debian/libarrow-python-dev.install | 3 + .../debian/libarrow-python0.install | 1 + cd/linux-packages/debian/libarrow0.install | 1 + cd/linux-packages/debian/patches/series | 0 cd/linux-packages/debian/rules | 59 ++++ cd/linux-packages/debian/source/format | 1 + cd/linux-packages/debian/watch | 2 + cd/linux-packages/package-task.rb | 316 ++++++++++++++++++ cd/linux-packages/yum/arrow.spec.in | 244 ++++++++++++++ cd/linux-packages/yum/build.sh | 103 ++++++ cd/linux-packages/yum/centos-6/Dockerfile | 62 ++++ cd/linux-packages/yum/centos-7/Dockerfile | 41 +++ cd/linux-packages/yum/descriptor.json | 22 ++ cd/travis-linux-packages.yml | 4 +- 57 files changed, 2232 insertions(+), 2 deletions(-) rename cd/{xbow.py => crossbow.py} (92%) create mode 100644 cd/linux-packages/.gitignore create mode 100644 cd/linux-packages/README.md create mode 100644 cd/linux-packages/Rakefile create mode 100755 cd/linux-packages/apt/build.sh create mode 100644 cd/linux-packages/apt/debian-stretch/Dockerfile create mode 100644 cd/linux-packages/apt/descriptor.json create mode 100644 cd/linux-packages/apt/ubuntu-artful/Dockerfile create mode 100644 cd/linux-packages/apt/ubuntu-trusty/Dockerfile create mode 100644 cd/linux-packages/apt/ubuntu-xenial/Dockerfile create mode 100644 cd/linux-packages/debian.ubuntu-trusty/changelog create mode 100644 cd/linux-packages/debian.ubuntu-trusty/compat create mode 100644 cd/linux-packages/debian.ubuntu-trusty/control create mode 100644 cd/linux-packages/debian.ubuntu-trusty/copyright create mode 100644 cd/linux-packages/debian.ubuntu-trusty/gir1.2-arrow-1.0.install create mode 100644 cd/linux-packages/debian.ubuntu-trusty/libarrow-dev.install create mode 100644 cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-dev.install create mode 100644 cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.doc-base create mode 100644 cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.install create mode 100644 cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.links create mode 100644 cd/linux-packages/debian.ubuntu-trusty/libarrow-glib0.install create mode 100644 cd/linux-packages/debian.ubuntu-trusty/libarrow-python0.install create mode 100644 cd/linux-packages/debian.ubuntu-trusty/libarrow0.install create mode 100644 cd/linux-packages/debian.ubuntu-trusty/patches/series create mode 100755 cd/linux-packages/debian.ubuntu-trusty/rules create mode 100644 cd/linux-packages/debian.ubuntu-trusty/source/format create mode 100644 cd/linux-packages/debian.ubuntu-trusty/watch create mode 100644 cd/linux-packages/debian/changelog create mode 100644 cd/linux-packages/debian/compat create mode 100644 cd/linux-packages/debian/control create mode 100644 cd/linux-packages/debian/copyright create mode 100644 cd/linux-packages/debian/gir1.2-arrow-1.0.install create mode 100644 cd/linux-packages/debian/gir1.2-arrow-gpu-1.0.install create mode 100644 cd/linux-packages/debian/libarrow-dev.install create mode 100644 cd/linux-packages/debian/libarrow-glib-dev.install create mode 100644 cd/linux-packages/debian/libarrow-glib-doc.doc-base create mode 100644 cd/linux-packages/debian/libarrow-glib-doc.install create mode 100644 cd/linux-packages/debian/libarrow-glib-doc.links create mode 100644 cd/linux-packages/debian/libarrow-glib0.install create mode 100644 cd/linux-packages/debian/libarrow-gpu-dev.install create mode 100644 cd/linux-packages/debian/libarrow-gpu-glib-dev.install create mode 100644 cd/linux-packages/debian/libarrow-gpu-glib0.install create mode 100644 cd/linux-packages/debian/libarrow-gpu0.install create mode 100644 cd/linux-packages/debian/libarrow-python-dev.install create mode 100644 cd/linux-packages/debian/libarrow-python0.install create mode 100644 cd/linux-packages/debian/libarrow0.install create mode 100644 cd/linux-packages/debian/patches/series create mode 100755 cd/linux-packages/debian/rules create mode 100644 cd/linux-packages/debian/source/format create mode 100644 cd/linux-packages/debian/watch create mode 100644 cd/linux-packages/package-task.rb create mode 100644 cd/linux-packages/yum/arrow.spec.in create mode 100755 cd/linux-packages/yum/build.sh create mode 100644 cd/linux-packages/yum/centos-6/Dockerfile create mode 100644 cd/linux-packages/yum/centos-7/Dockerfile create mode 100644 cd/linux-packages/yum/descriptor.json diff --git a/cd/xbow.py b/cd/crossbow.py similarity index 92% rename from cd/xbow.py rename to cd/crossbow.py index 98ac6a4a3890..e9a1079415d5 100644 --- a/cd/xbow.py +++ b/cd/crossbow.py @@ -7,6 +7,9 @@ from pygit2 import Signature, Repository, UserPass, RemoteCallbacks from pathlib import Path +ARROW_REPO = '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/kszucs/arrow' +ARROW_BRANCH = 'cd' + # we should handle this later signature = Signature('John Doe', 'jdoe@example.com', 12346, 0) author = committer = signature @@ -53,6 +56,10 @@ # creating the file inside git object db content = config.read_text() + + # FANCY templating + content = content.format(ARROW_REPO=ARROW_REPO, ARROW_BRANCH=ARROW_BRANCH) + blob_id = repo.create_blob(content) blob = repo[blob_id] @@ -78,7 +85,7 @@ def acquire_credentials_cb(url, username_from_url, allowed_types): print('credentials', url, username_from_url, allowed_types) # its a libgit2 bug, that it infinitly retries the authentication - token = '5f3ea541b44a23150d95eaa9b87a65edabf91ff3' + token = '' return UserPass(token, 'x-oauth-basic') diff --git a/cd/linux-packages/.gitignore b/cd/linux-packages/.gitignore new file mode 100644 index 000000000000..b85fae7bd765 --- /dev/null +++ b/cd/linux-packages/.gitignore @@ -0,0 +1,26 @@ +# 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. + +/*.tar.gz +/apt/.vagrant/ +/apt/repositories/ +/apt/tmp/ +/apt/env.sh +/yum/.vagrant/ +/yum/repositories/ +/yum/tmp/ +/yum/env.sh diff --git a/cd/linux-packages/README.md b/cd/linux-packages/README.md new file mode 100644 index 000000000000..391deed23c39 --- /dev/null +++ b/cd/linux-packages/README.md @@ -0,0 +1,38 @@ + + +# Linux packages for Apache Arrow C++ and GLib + +## Requirements + + * Ruby + * Docker + * Tools to build tar.gz for Apache Arrow C++ and GLib + +## How to build .deb packages + +```console +% rake apt +``` + +## How to build .rpm packages + +```console +% rake yum +``` diff --git a/cd/linux-packages/Rakefile b/cd/linux-packages/Rakefile new file mode 100644 index 000000000000..af575c09301a --- /dev/null +++ b/cd/linux-packages/Rakefile @@ -0,0 +1,112 @@ +# -*- ruby -*- +# +# 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. + +require_relative "package-task" + +class ApacheArrowPackageTask < PackageTask + def initialize + release_time = latest_commit_time(arrow_source_dir) + super("apache-arrow", detect_version(release_time), release_time) + @rpm_package = "arrow" + end + + private + def arrow_source_dir + File.join(File.dirname(__FILE__), "..", "arrow") + end + + def detect_version(release_time) + pom_xml_path = File.join(arrow_source_dir, "java", "pom.xml") + version = File.read(pom_xml_path).scan(/^ (.+?)<\/version>/)[0][0] + formatted_release_time = release_time.strftime("%Y%m%d") + version.gsub(/-SNAPSHOT\z/) {".#{formatted_release_time}"} + end + + def define_archive_task + file @archive_name do + if /\A\d+\.\d+\.\d+\z/ =~ @version + download_archive + else + build_archive + end + end + end + + def download_archive + mirror_base_url = "https://www.apache.org/dyn/closer.cgi/arrow" + mirror_list_url = "#{mirror_base_url}/arrow-#{@version}/#{@archive_name}" + open(mirror_list_url) do |response| + if /href="(.+?\/#{Regexp.escape(@archive_name)})"/ =~ response.read + download($1, ".") + end + end + end + + def build_archive + cd(arrow_source_dir) do + sh("git", "archive", "HEAD", + "--prefix", "#{@archive_base_name}/", + "--output", @archive_name) + rm_f(@archive_base_name) + sh("tar", "xf", @archive_name) + rm_f(@archive_name) + + c_glib_tmp_dir = "c_glib_tmp" + rm_rf(c_glib_tmp_dir) + mkdir_p(c_glib_tmp_dir) + cp_r(@archive_base_name, c_glib_tmp_dir) + c_glib_dir = File.expand_path("#{@archive_base_name}/c_glib") + rm_rf(c_glib_dir) + cd("#{c_glib_tmp_dir}/#{@archive_base_name}") do + build_type = "debug" + cpp_dir = File.expand_path("cpp") + cpp_build_dir = File.expand_path("cpp_build") + mkdir_p(cpp_build_dir) + cd(cpp_build_dir) do + sh("cmake", cpp_dir, + "-DCMAKE_BUILD_TYPE=#{build_type}", + "-DARROW_BOOST_USE_SHARED=ON", + "-DARROW_BUILD_TESTS=OFF") + sh("make", "-j8") + end + cd("c_glib") do + sh("./autogen.sh") + sh("./configure", + "--with-arrow-cpp-build-dir=#{cpp_build_dir}", + "--with-arrow-cpp-build-type=#{build_type}", + "--enable-gtk-doc") + sh({"LD_LIBRARY_PATH" => "#{cpp_build_dir}/#{build_type}"}, + "make", "-j8") + sh("make", "dist") + tar_gz = Dir.glob("*.tar.gz").first + sh("tar", "xf", tar_gz) + mv(File.basename(tar_gz, ".tar.gz"), + c_glib_dir) + end + end + rm_rf(c_glib_tmp_dir) + + sh("tar", "czf", @full_archive_name, @archive_base_name) + rm_rf(@archive_base_name) + end + end +end + +task = ApacheArrowPackageTask.new +task.define diff --git a/cd/linux-packages/apt/build.sh b/cd/linux-packages/apt/build.sh new file mode 100755 index 000000000000..f489d026970b --- /dev/null +++ b/cd/linux-packages/apt/build.sh @@ -0,0 +1,68 @@ +#!/bin/sh +# -*- sh-indentation: 2; sh-basic-offset: 2 -*- +# +# 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. + +LANG=C + +run() +{ + "$@" + if test $? -ne 0; then + echo "Failed $@" + exit 1 + fi +} + +. /host/env.sh + +distribution=$(lsb_release --id --short | tr 'A-Z' 'a-z') +code_name=$(lsb_release --codename --short) +case "${distribution}" in + debian) + component=main + ;; + ubuntu) + component=universe + ;; +esac +specific_debian_dir="debian.${distribution}-${code_name}" + +run mkdir -p build +run cp /host/tmp/${PACKAGE}-${VERSION}.tar.gz \ + build/${PACKAGE}_${VERSION}.orig.tar.gz +run cd build +run tar xfz ${PACKAGE}_${VERSION}.orig.tar.gz +run cd ${PACKAGE}-${VERSION}/ +if [ -d "/host/tmp/${specific_debian_dir}" ]; then + run cp -rp "/host/tmp/${specific_debian_dir}" debian +else + run cp -rp "/host/tmp/debian" debian +fi +# export DEB_BUILD_OPTIONS=noopt +if [ "${DEBUG:-no}" = "yes" ]; then + run debuild -us -uc +else + run debuild -us -uc > /dev/null +fi +run cd - + +package_initial=$(echo "${PACKAGE}" | sed -e 's/\(.\).*/\1/') +pool_dir="/host/repositories/${distribution}/pool/${code_name}/${component}/${package_initial}/${PACKAGE}" +run mkdir -p "${pool_dir}/" +run cp *.tar.* *.dsc *.deb "${pool_dir}/" diff --git a/cd/linux-packages/apt/debian-stretch/Dockerfile b/cd/linux-packages/apt/debian-stretch/Dockerfile new file mode 100644 index 000000000000..b803727500ed --- /dev/null +++ b/cd/linux-packages/apt/debian-stretch/Dockerfile @@ -0,0 +1,49 @@ +# 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. + +FROM debian:stretch + +ENV DEBIAN_FRONTEND noninteractive + +ARG DEBUG + +RUN sed -i'' -e 's/main$/main contrib non-free/g' /etc/apt/sources.list + +RUN \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ + apt update ${quiet} && \ + apt install -y -V ${quiet} \ + autoconf-archive \ + build-essential \ + cmake \ + debhelper\ + devscripts \ + git \ + gtk-doc-tools \ + libboost-filesystem-dev \ + libboost-regex-dev \ + libboost-system-dev \ + libgirepository1.0-dev \ + libglib2.0-doc \ + libjemalloc-dev \ + lsb-release \ + nvidia-cuda-toolkit \ + pkg-config \ + python3-dev \ + python3-numpy && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* diff --git a/cd/linux-packages/apt/descriptor.json b/cd/linux-packages/apt/descriptor.json new file mode 100644 index 000000000000..27a1eae30fe5 --- /dev/null +++ b/cd/linux-packages/apt/descriptor.json @@ -0,0 +1,55 @@ +{ + "package": { + "name": "APT", + "repo": "apache-arrow-apt", + "subject": "kou", + "licenses": ["Apache-2.0"], + "vcs_url": "htttps://github.com/apache/arrow.git" + }, + "version": { + "name": "0.9.0" + }, + "files": [ + { + "includePattern": "cpp-linux/apt/repositories/([^/]+)/pool/stretch/main/a/apache-arrow/([^/]+\\.deb)\\z", + "uploadPattern": "pool/stretch/main/$2", + "matrixParams": { + "deb_distribution": "stretch", + "deb_component": "main", + "deb_architecture": "amd64", + "override": 1 + } + }, + { + "includePattern": "cpp-linux/apt/repositories/([^/]+)/pool/trusty/universe/a/apache-arrow/([^/]+\\.deb)\\z", + "uploadPattern": "pool/trusty/universe/$2", + "matrixParams": { + "deb_distribution": "trusty", + "deb_component": "universe", + "deb_architecture": "amd64", + "override": 1 + } + }, + { + "includePattern": "cpp-linux/apt/repositories/([^/]+)/pool/xenial/universe/a/apache-arrow/([^/]+\\.deb)\\z", + "uploadPattern": "pool/xenial/universe/$2", + "matrixParams": { + "deb_distribution": "xenial", + "deb_component": "universe", + "deb_architecture": "amd64", + "override": 1 + } + }, + { + "includePattern": "cpp-linux/apt/repositories/([^/]+)/pool/artful/universe/a/apache-arrow/([^/]+\\.deb)\\z", + "uploadPattern": "pool/artful/universe/$2", + "matrixParams": { + "deb_distribution": "artful", + "deb_component": "universe", + "deb_architecture": "amd64", + "override": 1 + } + } + ], + "publish": true +} diff --git a/cd/linux-packages/apt/ubuntu-artful/Dockerfile b/cd/linux-packages/apt/ubuntu-artful/Dockerfile new file mode 100644 index 000000000000..d95300067178 --- /dev/null +++ b/cd/linux-packages/apt/ubuntu-artful/Dockerfile @@ -0,0 +1,47 @@ +# 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. + +FROM ubuntu:17.10 + +ENV DEBIAN_FRONTEND noninteractive + +ARG DEBUG + +RUN \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ + apt update ${quiet} && \ + apt install -y -V ${quiet} \ + autoconf-archive \ + build-essential \ + cmake \ + debhelper\ + devscripts \ + git \ + gtk-doc-tools \ + libboost-filesystem-dev \ + libboost-regex-dev \ + libboost-system-dev \ + libgirepository1.0-dev \ + libglib2.0-doc \ + libjemalloc-dev \ + lsb-release \ + nvidia-cuda-toolkit \ + pkg-config \ + python3-dev \ + python3-numpy && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* diff --git a/cd/linux-packages/apt/ubuntu-trusty/Dockerfile b/cd/linux-packages/apt/ubuntu-trusty/Dockerfile new file mode 100644 index 000000000000..dcb343b0208e --- /dev/null +++ b/cd/linux-packages/apt/ubuntu-trusty/Dockerfile @@ -0,0 +1,43 @@ +# 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. + +FROM ubuntu:14.04 + +ENV DEBIAN_FRONTEND noninteractive + +ARG DEBUG + +RUN \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ + apt update ${quiet} && \ + apt install -y -V ${quiet} \ + build-essential \ + cmake3 \ + debhelper\ + devscripts \ + git \ + gtk-doc-tools \ + libboost-filesystem-dev \ + libboost-regex-dev \ + libboost-system-dev \ + libgirepository1.0-dev \ + libglib2.0-doc \ + libjemalloc-dev \ + lsb-release \ + pkg-config && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* diff --git a/cd/linux-packages/apt/ubuntu-xenial/Dockerfile b/cd/linux-packages/apt/ubuntu-xenial/Dockerfile new file mode 100644 index 000000000000..8448b2856cb2 --- /dev/null +++ b/cd/linux-packages/apt/ubuntu-xenial/Dockerfile @@ -0,0 +1,48 @@ +# 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. + +FROM ubuntu:16.04 + +ENV DEBIAN_FRONTEND noninteractive + +ARG DEBUG + +RUN \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ + apt update ${quiet} && \ + apt install -y -V ${quiet} \ + autoconf-archive \ + build-essential \ + cmake \ + debhelper\ + devscripts \ + dh-autoreconf \ + git \ + gtk-doc-tools \ + libboost-filesystem-dev \ + libboost-regex-dev \ + libboost-system-dev \ + libgirepository1.0-dev \ + libglib2.0-doc \ + libjemalloc-dev \ + lsb-release \ + nvidia-cuda-toolkit \ + pkg-config \ + python3-dev \ + python3-numpy && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* diff --git a/cd/linux-packages/debian.ubuntu-trusty/changelog b/cd/linux-packages/debian.ubuntu-trusty/changelog new file mode 100644 index 000000000000..ebfe9359a993 --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/changelog @@ -0,0 +1,42 @@ +apache-arrow (0.9.0-1) unstable; urgency=low + + * New upstream release. + + -- Kouhei Sutou Fri, 16 Mar 2018 16:56:31 -0000 + +apache-arrow (0.8.0-2) unstable; urgency=low + + * Fix .typelib path. + Reported by Mike Sam. Thanks!!! + + -- Kouhei Sutou Thu, 25 Jan 2018 21:44:11 +0900 + +apache-arrow (0.8.0-1) unstable; urgency=low + + * New upstream release. + + -- Uwe L. Korn Sun, 17 Dec 2017 20:24:44 -0000 + +apache-arrow (0.7.1-1) unstable; urgency=low + + * New upstream release. + + -- Kouhei Sutou Wed, 27 Sep 2017 13:19:05 -0000 + +apache-arrow (0.7.0-1) unstable; urgency=low + + * New upstream release. + + -- Wes McKinney Tue, 12 Sep 2017 22:01:14 -0000 + +apache-arrow (0.6.0-1) unstable; urgency=low + + * New upstream release. + + -- Kouhei Sutou Fri, 11 Aug 2017 21:27:51 -0000 + +apache-arrow (0.6.0.20170802-1) unstable; urgency=low + + * New upstream release. + + -- Kouhei Sutou Wed, 02 Aug 2017 22:28:18 -0000 diff --git a/cd/linux-packages/debian.ubuntu-trusty/compat b/cd/linux-packages/debian.ubuntu-trusty/compat new file mode 100644 index 000000000000..ec635144f600 --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/compat @@ -0,0 +1 @@ +9 diff --git a/cd/linux-packages/debian.ubuntu-trusty/control b/cd/linux-packages/debian.ubuntu-trusty/control new file mode 100644 index 000000000000..9732ebdcae88 --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/control @@ -0,0 +1,93 @@ +Source: apache-arrow +Section: devel +Priority: optional +Maintainer: Kouhei Sutou +Build-Depends: + debhelper (>= 9), + pkg-config, + cmake, + git, + libboost-system-dev, + libboost-filesystem-dev, + libboost-regex-dev, + libjemalloc-dev, + libgirepository1.0-dev, + gtk-doc-tools, + gobject-introspection +Build-Depends-Indep: libglib2.0-doc +Standards-Version: 3.9.6 +Homepage: https://arrow.apache.org/ + +Package: libarrow0 +Section: libs +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + libjemalloc1 +Description: Apache Arrow is a data processing library for analysis + . + This package provides library files. + +Package: libarrow-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + libarrow0 (= ${binary:Version}) +Description: Apache Arrow is a data processing library for analysis + . + This package provides header files. + +Package: libarrow-glib0 +Section: libs +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + libarrow0 (= ${binary:Version}) +Description: Apache Arrow is a data processing library for analysis + . + This package provides library files. + +Package: gir1.2-arrow-1.0 +Section: introspection +Architecture: any +Multi-Arch: same +Depends: + ${gir:Depends}, + ${misc:Depends} +Description: Apache Arrow is a data processing library for analysis + . + This package provides GObject Introspection typelib files. + +Package: libarrow-glib-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + libglib2.0-dev, + libarrow-dev (= ${binary:Version}), + libarrow-glib0 (= ${binary:Version}), + gir1.2-arrow-1.0 (= ${binary:Version}) +Suggests: libarrow-glib-doc +Description: Apache Arrow is a data processing library for analysis + . + This package provides header files. + +Package: libarrow-glib-doc +Section: doc +Architecture: all +Multi-Arch: foreign +Depends: + ${misc:Depends} +Recommends: libglib2.0-doc +Description: Apache Arrow is a data processing library for analysis + . + This package provides documentations. diff --git a/cd/linux-packages/debian.ubuntu-trusty/copyright b/cd/linux-packages/debian.ubuntu-trusty/copyright new file mode 100644 index 000000000000..9db0ea76f721 --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/copyright @@ -0,0 +1,193 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Apache Arrow +Upstream-Contact: +Source: https://dist.apache.org/repos/dist/release/arrow/ + +Files: * +Copyright: 2016 The Apache Software Foundation +License: Apache-2.0 + +Files: TODO for "This product includes software from the SFrame project" +Copyright: 2015 Dato, Inc. + 2009 Carnegie Mellon University. +License: BSD-3-clause + +Files: TODO for "This product includes software from the Numpy project" +Copyright: 1995, 1996, 1997 Jim Hugunin, hugunin@mit.edu + 2005 Travis E. Oliphant oliphant@ee.byu.edu Brigham Young University +License: BSD-3-clause + +Files: TODO for "This product includes software from the Feather project" +Copyright: TODO +License: Apache-2.0 + +Files: TODO for "This product includes software from the DyND project" +Copyright: TODO +License: BSD-2-clause + +Files: TODO for "This product includes software from the LLVM project" +Copyright: 2003-2007 University of Illinois at Urbana-Champaign. +License: U-OF-I-BSD-LIKE + +Files: TODO for "This product includes software from the google-lint project" +Copyright: 2009 Google Inc. All rights reserved. +License: BSD-3-clause + +Files: TODO for "This product includes software from the mman-win32 project" +Copyright: 2010 kutuzov.viktor.84 +License: MIT + +Files: TODO for "This product includes software from the LevelDB project" +Copyright: 2011 The LevelDB Authors. All rights reserved. +License: BSD-3-clause + +Files: TODO for "This product includes software from the CMake project" +Copyright: 2001-2009 Kitware, Inc. + 2012-2014 Continuum Analytics, Inc. +License: BSD-3-clause + +Files: TODO for "This product includes software from https://github.com/matthew-brett/multibuild" +Copyright: 2013-2016, Matt Terry and Matthew Brett; all rights reserved. +License: BSD-2-clause + +Files: TODO for "This product includes software from the Ibis project" +Copyright: 2015 Cloudera, Inc. +License: Apache-2.0 + +Files: TODO for "This product includes code from Apache Kudu" +Copyright: 2016 The Apache Software Foundation +License: Apache-2.0 + +License: Apache-2.0 + 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. + . + On Debian systems, the full text of the Apache Software License version 2 can + be found in the file `/usr/share/common-licenses/Apache-2.0'. + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +License: BSD-2-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1) Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2) Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY + WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +License: U-OF-I-BSD-LIKE + ============================================================================== + LLVM Release License + ============================================================================== + University of Illinois/NCSA + Open Source License + . + Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign. + All rights reserved. + . + Developed by: + . + LLVM Team + . + University of Illinois at Urbana-Champaign + . + http://llvm.org + . + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal with + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do + so, subject to the following conditions: + . + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + . + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + . + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE + SOFTWARE. + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/cd/linux-packages/debian.ubuntu-trusty/gir1.2-arrow-1.0.install b/cd/linux-packages/debian.ubuntu-trusty/gir1.2-arrow-1.0.install new file mode 100644 index 000000000000..c395f7aca59a --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/gir1.2-arrow-1.0.install @@ -0,0 +1 @@ +usr/lib/girepository-1.0/ diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-dev.install b/cd/linux-packages/debian.ubuntu-trusty/libarrow-dev.install new file mode 100644 index 000000000000..62de6ce571af --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/libarrow-dev.install @@ -0,0 +1,5 @@ +usr/include/arrow/ +usr/lib/*/libarrow.a +usr/lib/*/libarrow.so +usr/lib/*/pkgconfig/arrow.pc +usr/lib/*/pkgconfig/arrow-compute.pc diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-dev.install b/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-dev.install new file mode 100644 index 000000000000..827e4cf31beb --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-dev.install @@ -0,0 +1,6 @@ +usr/include/arrow-glib/ +usr/lib/*/libarrow-glib.a +usr/lib/*/libarrow-glib.so +usr/lib/*/pkgconfig/arrow-glib.pc +usr/share/gir-1.0/ +usr/share/arrow-glib/example/ diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.doc-base b/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.doc-base new file mode 100644 index 000000000000..42bcf3e3b8f9 --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.doc-base @@ -0,0 +1,9 @@ +Document: arrow-glib +Title: arrow-glib Reference Manual +Author: Kouhei Sutou +Abstract: Apache Arrow is a data processing library for analysis. +Section: Programming + +Format: HTML +Index: /usr/share/doc/libarrow-glib-doc/arrow-glib/index.html +Files: /usr/share/doc/libarrow-glib-doc/arrow-glib/*.html diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.install b/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.install new file mode 100644 index 000000000000..7aa63a98fe8f --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.install @@ -0,0 +1 @@ +usr/share/doc/libarrow-glib-doc/arrow-glib/ diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.links b/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.links new file mode 100644 index 000000000000..0cf945857ea1 --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.links @@ -0,0 +1,3 @@ +usr/share/doc/libglib2.0-doc/glib usr/share/doc/libarrow-glib-doc/glib +usr/share/doc/libglib2.0-doc/gobject usr/share/doc/libarrow-glib-doc/gobject +usr/share/doc/libarrow-glib-doc/arrow-glib usr/share/gtk-doc/html/arrow-glib diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib0.install b/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib0.install new file mode 100644 index 000000000000..ec369d1536b5 --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib0.install @@ -0,0 +1 @@ +usr/lib/*/libarrow-glib.so.* diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-python0.install b/cd/linux-packages/debian.ubuntu-trusty/libarrow-python0.install new file mode 100644 index 000000000000..eef3e6648373 --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/libarrow-python0.install @@ -0,0 +1 @@ +usr/lib/*/libarrow_python.so.* diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow0.install b/cd/linux-packages/debian.ubuntu-trusty/libarrow0.install new file mode 100644 index 000000000000..98ef2139cb16 --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/libarrow0.install @@ -0,0 +1 @@ +usr/lib/*/libarrow.so.* diff --git a/cd/linux-packages/debian.ubuntu-trusty/patches/series b/cd/linux-packages/debian.ubuntu-trusty/patches/series new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/cd/linux-packages/debian.ubuntu-trusty/rules b/cd/linux-packages/debian.ubuntu-trusty/rules new file mode 100755 index 000000000000..783b7a75aafd --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/rules @@ -0,0 +1,52 @@ +#!/usr/bin/make -f +# -*- makefile-gmake -*- +# +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 +# This has to be exported to make some magic below work. +export DH_OPTIONS + +BUILD_TYPE=release + +%: + dh $@ --with gir + +override_dh_auto_configure: + dh_auto_configure \ + --sourcedirectory=cpp \ + --builddirectory=cpp_build \ + -- \ + -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \ + -DARROW_BUILD_TESTS=OFF \ + -DARROW_ORC=ON + dh_auto_configure \ + --sourcedirectory=c_glib \ + --builddirectory=c_glib_build \ + -- \ + --with-arrow-cpp-build-dir=$${PWD}/cpp_build \ + --with-arrow-cpp-build-type=$(BUILD_TYPE) \ + --enable-gtk-doc \ + --with-html-dir=\$${prefix}/share/doc/libarrow-glib-doc + +override_dh_auto_build: + dh_auto_build \ + --sourcedirectory=cpp \ + --builddirectory=cpp_build + env \ + LD_LIBRARY_PATH=$${PWD}/cpp_build/$(BUILD_TYPE) \ + dh_auto_build \ + --sourcedirectory=c_glib \ + --builddirectory=c_glib_build + +override_dh_auto_install: + dh_auto_install \ + --sourcedirectory=cpp \ + --builddirectory=cpp_build + dh_auto_install \ + --sourcedirectory=c_glib \ + --builddirectory=c_glib_build + mv debian/tmp/usr/lib/*/girepository-1.0/ \ + debian/tmp/usr/lib/ + +# disable 'make check'. +override_dh_auto_test: diff --git a/cd/linux-packages/debian.ubuntu-trusty/source/format b/cd/linux-packages/debian.ubuntu-trusty/source/format new file mode 100644 index 000000000000..163aaf8d82b6 --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/cd/linux-packages/debian.ubuntu-trusty/watch b/cd/linux-packages/debian.ubuntu-trusty/watch new file mode 100644 index 000000000000..5cb3f00915f8 --- /dev/null +++ b/cd/linux-packages/debian.ubuntu-trusty/watch @@ -0,0 +1,2 @@ +version=3 +https://dist.apache.org/repos/dist/release/arrow/arrow-(.+)/apache-arrow-(.+).tar.gz diff --git a/cd/linux-packages/debian/changelog b/cd/linux-packages/debian/changelog new file mode 100644 index 000000000000..9e7a2eea361a --- /dev/null +++ b/cd/linux-packages/debian/changelog @@ -0,0 +1,45 @@ +apache-arrow (0.9.0-1) unstable; urgency=low + + * New upstream release. + + -- Kouhei Sutou Fri, 16 Mar 2018 16:56:31 -0000 + +apache-arrow (0.8.0-1) unstable; urgency=low + + * New upstream release. + + * Add libarrow-gpu-glib0, libarrow-gpu-glib-dev and gir1.2-arrow-gpu-1.0. + + -- Uwe L. Korn Sun, 17 Dec 2017 20:24:44 -0000 + +apache-arrow (0.7.1-2) unstable; urgency=low + + * Add libarrow-gpu0 and libarrow-gpu-dev. + + * Add libarrow-python-dev. + + -- Kouhei Sutou Sun, 29 Oct 2017 21:59:13 +0900 + +apache-arrow (0.7.1-1) unstable; urgency=low + + * New upstream release. + + -- Kouhei Sutou Wed, 27 Sep 2017 13:19:05 -0000 + +apache-arrow (0.7.0-1) unstable; urgency=low + + * New upstream release. + + -- Wes McKinney Tue, 12 Sep 2017 22:01:14 -0000 + +apache-arrow (0.6.0-1) unstable; urgency=low + + * New upstream release. + + -- Kouhei Sutou Fri, 11 Aug 2017 21:27:51 -0000 + +apache-arrow (0.6.0.20170802-1) unstable; urgency=low + + * New upstream release. + + -- Kouhei Sutou Wed, 02 Aug 2017 22:28:18 -0000 diff --git a/cd/linux-packages/debian/compat b/cd/linux-packages/debian/compat new file mode 100644 index 000000000000..f599e28b8ab0 --- /dev/null +++ b/cd/linux-packages/debian/compat @@ -0,0 +1 @@ +10 diff --git a/cd/linux-packages/debian/control b/cd/linux-packages/debian/control new file mode 100644 index 000000000000..2534201f6da8 --- /dev/null +++ b/cd/linux-packages/debian/control @@ -0,0 +1,192 @@ +Source: apache-arrow +Section: devel +Priority: optional +Maintainer: Kouhei Sutou +Build-Depends: + debhelper (>= 9.20160115), + dh-autoreconf, + autoconf-archive, + pkg-config, + cmake, + git, + libboost-system-dev, + libboost-filesystem-dev, + libboost-regex-dev, + libjemalloc-dev, + python3-dev, + python3-numpy, + nvidia-cuda-toolkit, + libgirepository1.0-dev, + gtk-doc-tools, + gobject-introspection +Build-Depends-Indep: libglib2.0-doc +Standards-Version: 3.9.6 +Homepage: https://arrow.apache.org/ + +Package: libarrow0 +Section: libs +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + libjemalloc1 +Description: Apache Arrow is a data processing library for analysis + . + This package provides library files. + +Package: libarrow-python0 +Section: libs +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + libarrow0 (= ${binary:Version}), + python3, + python3-numpy +Description: Apache Arrow is a data processing library for analysis + . + This package provides library files for Python support. + +Package: libarrow-gpu0 +Section: libs +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + libarrow0 (= ${binary:Version}), + libnvidia-fatbinaryloader, + libcuda1 +Description: Apache Arrow is a data processing library for analysis + . + This package provides library files for GPU support. + +Package: libarrow-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + libarrow0 (= ${binary:Version}) +Description: Apache Arrow is a data processing library for analysis + . + This package provides header files. + +Package: libarrow-python-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + libarrow-dev (= ${binary:Version}), + libarrow-python0 (= ${binary:Version}) +Description: Apache Arrow is a data processing library for analysis + . + This package provides header files for Python support. + +Package: libarrow-gpu-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + libarrow-dev (= ${binary:Version}), + libarrow-gpu0 (= ${binary:Version}) +Description: Apache Arrow is a data processing library for analysis + . + This package provides header files for GPU support. + +Package: libarrow-glib0 +Section: libs +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + libarrow0 (= ${binary:Version}) +Description: Apache Arrow is a data processing library for analysis + . + This package provides library files. + +Package: gir1.2-arrow-1.0 +Section: introspection +Architecture: any +Multi-Arch: same +Depends: + ${gir:Depends}, + ${misc:Depends} +Description: Apache Arrow is a data processing library for analysis + . + This package provides GObject Introspection typelib files. + +Package: libarrow-glib-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + libglib2.0-dev, + libarrow-dev (= ${binary:Version}), + libarrow-glib0 (= ${binary:Version}), + gir1.2-arrow-1.0 (= ${binary:Version}) +Suggests: libarrow-glib-doc +Description: Apache Arrow is a data processing library for analysis + . + This package provides header files. + +Package: libarrow-glib-doc +Section: doc +Architecture: all +Multi-Arch: foreign +Depends: + ${misc:Depends} +Recommends: libglib2.0-doc +Description: Apache Arrow is a data processing library for analysis + . + This package provides documentations. + +Package: libarrow-gpu-glib0 +Section: libs +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + libarrow-glib0 (= ${binary:Version}), + libarrow-gpu0 (= ${binary:Version}) +Description: Apache Arrow is a data processing library for analysis + . + This package provides library files for GPU support. + +Package: gir1.2-arrow-gpu-1.0 +Section: introspection +Architecture: any +Multi-Arch: same +Depends: + ${gir:Depends}, + ${misc:Depends} +Description: Apache Arrow is a data processing library for analysis + . + This package provides GObject Introspection typelib files for GPU support. + +Package: libarrow-gpu-glib-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + libarrow-dev (= ${binary:Version}), + libarrow-glib-dev (= ${binary:Version}), + libarrow-gpu-dev (= ${binary:Version}), + libarrow-gpu-glib0 (= ${binary:Version}), + gir1.2-arrow-gpu-1.0 (= ${binary:Version}) +Description: Apache Arrow is a data processing library for analysis + . + This package provides header files for GPU support. diff --git a/cd/linux-packages/debian/copyright b/cd/linux-packages/debian/copyright new file mode 100644 index 000000000000..9db0ea76f721 --- /dev/null +++ b/cd/linux-packages/debian/copyright @@ -0,0 +1,193 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Apache Arrow +Upstream-Contact: +Source: https://dist.apache.org/repos/dist/release/arrow/ + +Files: * +Copyright: 2016 The Apache Software Foundation +License: Apache-2.0 + +Files: TODO for "This product includes software from the SFrame project" +Copyright: 2015 Dato, Inc. + 2009 Carnegie Mellon University. +License: BSD-3-clause + +Files: TODO for "This product includes software from the Numpy project" +Copyright: 1995, 1996, 1997 Jim Hugunin, hugunin@mit.edu + 2005 Travis E. Oliphant oliphant@ee.byu.edu Brigham Young University +License: BSD-3-clause + +Files: TODO for "This product includes software from the Feather project" +Copyright: TODO +License: Apache-2.0 + +Files: TODO for "This product includes software from the DyND project" +Copyright: TODO +License: BSD-2-clause + +Files: TODO for "This product includes software from the LLVM project" +Copyright: 2003-2007 University of Illinois at Urbana-Champaign. +License: U-OF-I-BSD-LIKE + +Files: TODO for "This product includes software from the google-lint project" +Copyright: 2009 Google Inc. All rights reserved. +License: BSD-3-clause + +Files: TODO for "This product includes software from the mman-win32 project" +Copyright: 2010 kutuzov.viktor.84 +License: MIT + +Files: TODO for "This product includes software from the LevelDB project" +Copyright: 2011 The LevelDB Authors. All rights reserved. +License: BSD-3-clause + +Files: TODO for "This product includes software from the CMake project" +Copyright: 2001-2009 Kitware, Inc. + 2012-2014 Continuum Analytics, Inc. +License: BSD-3-clause + +Files: TODO for "This product includes software from https://github.com/matthew-brett/multibuild" +Copyright: 2013-2016, Matt Terry and Matthew Brett; all rights reserved. +License: BSD-2-clause + +Files: TODO for "This product includes software from the Ibis project" +Copyright: 2015 Cloudera, Inc. +License: Apache-2.0 + +Files: TODO for "This product includes code from Apache Kudu" +Copyright: 2016 The Apache Software Foundation +License: Apache-2.0 + +License: Apache-2.0 + 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. + . + On Debian systems, the full text of the Apache Software License version 2 can + be found in the file `/usr/share/common-licenses/Apache-2.0'. + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +License: BSD-2-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1) Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2) Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY + WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +License: U-OF-I-BSD-LIKE + ============================================================================== + LLVM Release License + ============================================================================== + University of Illinois/NCSA + Open Source License + . + Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign. + All rights reserved. + . + Developed by: + . + LLVM Team + . + University of Illinois at Urbana-Champaign + . + http://llvm.org + . + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal with + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do + so, subject to the following conditions: + . + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + . + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + . + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE + SOFTWARE. + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/cd/linux-packages/debian/gir1.2-arrow-1.0.install b/cd/linux-packages/debian/gir1.2-arrow-1.0.install new file mode 100644 index 000000000000..e0197fcd327c --- /dev/null +++ b/cd/linux-packages/debian/gir1.2-arrow-1.0.install @@ -0,0 +1 @@ +usr/lib/*/girepository-1.0/Arrow-1.0.typelib diff --git a/cd/linux-packages/debian/gir1.2-arrow-gpu-1.0.install b/cd/linux-packages/debian/gir1.2-arrow-gpu-1.0.install new file mode 100644 index 000000000000..10e0ca983be1 --- /dev/null +++ b/cd/linux-packages/debian/gir1.2-arrow-gpu-1.0.install @@ -0,0 +1 @@ +usr/lib/*/girepository-1.0/ArrowGPU-1.0.typelib diff --git a/cd/linux-packages/debian/libarrow-dev.install b/cd/linux-packages/debian/libarrow-dev.install new file mode 100644 index 000000000000..62de6ce571af --- /dev/null +++ b/cd/linux-packages/debian/libarrow-dev.install @@ -0,0 +1,5 @@ +usr/include/arrow/ +usr/lib/*/libarrow.a +usr/lib/*/libarrow.so +usr/lib/*/pkgconfig/arrow.pc +usr/lib/*/pkgconfig/arrow-compute.pc diff --git a/cd/linux-packages/debian/libarrow-glib-dev.install b/cd/linux-packages/debian/libarrow-glib-dev.install new file mode 100644 index 000000000000..e59a1f94d6e5 --- /dev/null +++ b/cd/linux-packages/debian/libarrow-glib-dev.install @@ -0,0 +1,6 @@ +usr/include/arrow-glib/ +usr/lib/*/libarrow-glib.a +usr/lib/*/libarrow-glib.so +usr/lib/*/pkgconfig/arrow-glib.pc +usr/share/gir-1.0/Arrow-1.0.gir +usr/share/arrow-glib/example/ diff --git a/cd/linux-packages/debian/libarrow-glib-doc.doc-base b/cd/linux-packages/debian/libarrow-glib-doc.doc-base new file mode 100644 index 000000000000..42bcf3e3b8f9 --- /dev/null +++ b/cd/linux-packages/debian/libarrow-glib-doc.doc-base @@ -0,0 +1,9 @@ +Document: arrow-glib +Title: arrow-glib Reference Manual +Author: Kouhei Sutou +Abstract: Apache Arrow is a data processing library for analysis. +Section: Programming + +Format: HTML +Index: /usr/share/doc/libarrow-glib-doc/arrow-glib/index.html +Files: /usr/share/doc/libarrow-glib-doc/arrow-glib/*.html diff --git a/cd/linux-packages/debian/libarrow-glib-doc.install b/cd/linux-packages/debian/libarrow-glib-doc.install new file mode 100644 index 000000000000..7aa63a98fe8f --- /dev/null +++ b/cd/linux-packages/debian/libarrow-glib-doc.install @@ -0,0 +1 @@ +usr/share/doc/libarrow-glib-doc/arrow-glib/ diff --git a/cd/linux-packages/debian/libarrow-glib-doc.links b/cd/linux-packages/debian/libarrow-glib-doc.links new file mode 100644 index 000000000000..0cf945857ea1 --- /dev/null +++ b/cd/linux-packages/debian/libarrow-glib-doc.links @@ -0,0 +1,3 @@ +usr/share/doc/libglib2.0-doc/glib usr/share/doc/libarrow-glib-doc/glib +usr/share/doc/libglib2.0-doc/gobject usr/share/doc/libarrow-glib-doc/gobject +usr/share/doc/libarrow-glib-doc/arrow-glib usr/share/gtk-doc/html/arrow-glib diff --git a/cd/linux-packages/debian/libarrow-glib0.install b/cd/linux-packages/debian/libarrow-glib0.install new file mode 100644 index 000000000000..ec369d1536b5 --- /dev/null +++ b/cd/linux-packages/debian/libarrow-glib0.install @@ -0,0 +1 @@ +usr/lib/*/libarrow-glib.so.* diff --git a/cd/linux-packages/debian/libarrow-gpu-dev.install b/cd/linux-packages/debian/libarrow-gpu-dev.install new file mode 100644 index 000000000000..1892fb851535 --- /dev/null +++ b/cd/linux-packages/debian/libarrow-gpu-dev.install @@ -0,0 +1,3 @@ +usr/lib/*/libarrow_gpu.a +usr/lib/*/libarrow_gpu.so +usr/lib/*/pkgconfig/arrow-gpu.pc diff --git a/cd/linux-packages/debian/libarrow-gpu-glib-dev.install b/cd/linux-packages/debian/libarrow-gpu-glib-dev.install new file mode 100644 index 000000000000..9b3ef8fb25b3 --- /dev/null +++ b/cd/linux-packages/debian/libarrow-gpu-glib-dev.install @@ -0,0 +1,5 @@ +usr/include/arrow-gpu-glib/ +usr/lib/*/libarrow-gpu-glib.a +usr/lib/*/libarrow-gpu-glib.so +usr/lib/*/pkgconfig/arrow-gpu-glib.pc +usr/share/gir-1.0/ArrowGPU-1.0.gir diff --git a/cd/linux-packages/debian/libarrow-gpu-glib0.install b/cd/linux-packages/debian/libarrow-gpu-glib0.install new file mode 100644 index 000000000000..4d97e5a60eb0 --- /dev/null +++ b/cd/linux-packages/debian/libarrow-gpu-glib0.install @@ -0,0 +1 @@ +usr/lib/*/libarrow-gpu-glib.so.* diff --git a/cd/linux-packages/debian/libarrow-gpu0.install b/cd/linux-packages/debian/libarrow-gpu0.install new file mode 100644 index 000000000000..cabd7e47d1e9 --- /dev/null +++ b/cd/linux-packages/debian/libarrow-gpu0.install @@ -0,0 +1 @@ +usr/lib/*/libarrow_gpu.so.* diff --git a/cd/linux-packages/debian/libarrow-python-dev.install b/cd/linux-packages/debian/libarrow-python-dev.install new file mode 100644 index 000000000000..7e978de92023 --- /dev/null +++ b/cd/linux-packages/debian/libarrow-python-dev.install @@ -0,0 +1,3 @@ +usr/lib/*/libarrow_python.a +usr/lib/*/libarrow_python.so +usr/lib/*/pkgconfig/arrow-python.pc diff --git a/cd/linux-packages/debian/libarrow-python0.install b/cd/linux-packages/debian/libarrow-python0.install new file mode 100644 index 000000000000..eef3e6648373 --- /dev/null +++ b/cd/linux-packages/debian/libarrow-python0.install @@ -0,0 +1 @@ +usr/lib/*/libarrow_python.so.* diff --git a/cd/linux-packages/debian/libarrow0.install b/cd/linux-packages/debian/libarrow0.install new file mode 100644 index 000000000000..98ef2139cb16 --- /dev/null +++ b/cd/linux-packages/debian/libarrow0.install @@ -0,0 +1 @@ +usr/lib/*/libarrow.so.* diff --git a/cd/linux-packages/debian/patches/series b/cd/linux-packages/debian/patches/series new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/cd/linux-packages/debian/rules b/cd/linux-packages/debian/rules new file mode 100755 index 000000000000..5a3c0a31b2cd --- /dev/null +++ b/cd/linux-packages/debian/rules @@ -0,0 +1,59 @@ +#!/usr/bin/make -f +# -*- makefile-gmake -*- +# +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 +# This has to be exported to make some magic below work. +export DH_OPTIONS + +BUILD_TYPE=release + +%: + dh $@ --with gir,autoreconf + +override_dh_autoreconf: + dh_autoreconf \ + --sourcedirectory=c_glib + +override_dh_auto_configure: + dh_auto_configure \ + --sourcedirectory=cpp \ + --builddirectory=cpp_build \ + -- \ + -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \ + -DARROW_BUILD_TESTS=OFF \ + -DARROW_PYTHON=ON \ + -DARROW_BOOST_USE_SHARED=ON \ + -DARROW_ORC=ON \ + -DPythonInterp_FIND_VERSION=ON \ + -DPythonInterp_FIND_VERSION_MAJOR=3 \ + -DARROW_GPU=ON + dh_auto_configure \ + --sourcedirectory=c_glib \ + --builddirectory=c_glib_build \ + -- \ + --with-arrow-cpp-build-dir=$${PWD}/cpp_build \ + --with-arrow-cpp-build-type=$(BUILD_TYPE) \ + --enable-gtk-doc \ + --with-html-dir=\$${prefix}/share/doc/libarrow-glib-doc + +override_dh_auto_build: + dh_auto_build \ + --sourcedirectory=cpp \ + --builddirectory=cpp_build + env \ + LD_LIBRARY_PATH=$${PWD}/cpp_build/$(BUILD_TYPE) \ + dh_auto_build \ + --sourcedirectory=c_glib \ + --builddirectory=c_glib_build + +override_dh_auto_install: + dh_auto_install \ + --sourcedirectory=cpp \ + --builddirectory=cpp_build + dh_auto_install \ + --sourcedirectory=c_glib \ + --builddirectory=c_glib_build + +# disable 'make check'. +override_dh_auto_test: diff --git a/cd/linux-packages/debian/source/format b/cd/linux-packages/debian/source/format new file mode 100644 index 000000000000..163aaf8d82b6 --- /dev/null +++ b/cd/linux-packages/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/cd/linux-packages/debian/watch b/cd/linux-packages/debian/watch new file mode 100644 index 000000000000..5cb3f00915f8 --- /dev/null +++ b/cd/linux-packages/debian/watch @@ -0,0 +1,2 @@ +version=3 +https://dist.apache.org/repos/dist/release/arrow/arrow-(.+)/apache-arrow-(.+).tar.gz diff --git a/cd/linux-packages/package-task.rb b/cd/linux-packages/package-task.rb new file mode 100644 index 000000000000..bb01a024d708 --- /dev/null +++ b/cd/linux-packages/package-task.rb @@ -0,0 +1,316 @@ +# 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. + +require "open-uri" +require "time" + +class PackageTask + include Rake::DSL + + def initialize(package, version, release_time) + @package = package + @version = version + @release_time = release_time + + @archive_base_name = "#{@package}-#{@version}" + @archive_name = "#{@archive_base_name}.tar.gz" + @full_archive_name = File.expand_path(@archive_name) + + @rpm_package = @package + end + + def define + define_dist_task + define_yum_task + define_apt_task + define_version_task + end + + private + def env_value(name) + value = ENV[name] + raise "Specify #{name} environment variable" if value.nil? + value + end + + def parallel_build? + ENV["PARALLEL"] == "yes" + end + + def debug_build? + ENV["DEBUG"] != "no" + end + + def latest_commit_time(git_directory) + cd(git_directory) do + return Time.iso8601(`git log -n 1 --format=%aI`.chomp).utc + end + end + + def download(url, download_dir) + base_name = url.split("/").last + absolute_output_path = File.join(download_dir, base_name) + + unless File.exist?(absolute_output_path) + mkdir_p(download_dir) + rake_output_message "Downloading... #{url}" + open(url) do |downloaded_file| + File.open(absolute_output_path, "wb") do |output_file| + output_file.print(downloaded_file.read) + end + end + end + + absolute_output_path + end + + def run_docker(id) + docker_tag = "#{@package}-#{id}" + build_command_line = [ + "docker", + "build", + "--tag", docker_tag, + ] + run_command_line = [ + "docker", + "run", + "--rm", + "--tty", + "--volume", "#{Dir.pwd}:/host:rw", + ] + if debug_build? + build_command_line.concat(["--build-arg", "DEBUG=yes"]) + run_command_line.concat(["--env", "DEBUG=yes"]) + end + build_command_line << id + run_command_line.concat([docker_tag, "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/host/build.sh"]) + + sh(*build_command_line) + sh(*run_command_line) + end + + def define_dist_task + define_archive_task + desc "Create release package" + task :dist => [@archive_name] + end + + def define_yum_task + namespace :yum do + distribution = "centos" + yum_dir = "yum" + repositories_dir = "#{yum_dir}/repositories" + + directory repositories_dir + + desc "Build RPM packages" + task :build => [@archive_name, repositories_dir] do + tmp_dir = "#{yum_dir}/tmp" + rm_rf(tmp_dir) + mkdir_p(tmp_dir) + cp(@archive_name, tmp_dir) + + env_sh = "#{yum_dir}/env.sh" + File.open(env_sh, "w") do |file| + file.puts(<<-ENV) +SOURCE_ARCHIVE=#{@archive_name} +PACKAGE=#{@rpm_package} +VERSION=#{@version} + ENV + end + + tmp_distribution_dir = "#{tmp_dir}/#{distribution}" + mkdir_p(tmp_distribution_dir) + spec = "#{tmp_distribution_dir}/#{@rpm_package}.spec" + spec_in = "#{yum_dir}/#{@rpm_package}.spec.in" + spec_in_data = File.read(spec_in) + spec_data = spec_in_data.gsub(/@(.+?)@/) do |matched| + case $1 + when "PACKAGE" + @rpm_package + when "VERSION" + @version + else + matched + end + end + File.open(spec, "w") do |spec_file| + spec_file.print(spec_data) + end + + cd(yum_dir) do + distribution_versions = (ENV["CENTOS_VERSIONS"] || "6,7").split(",") + threads = [] + distribution_versions.each do |version| + id = "#{distribution}-#{version}" + if parallel_build? + threads << Thread.new(id) do |local_id| + run_docker(local_id) + end + else + run_docker(id) + end + end + threads.each(&:join) + end + end + end + + desc "Release Yum packages" + yum_tasks = [ + "yum:build", + ] + task :yum => yum_tasks + end + + def define_apt_task + namespace :apt do + apt_dir = "apt" + repositories_dir = "#{apt_dir}/repositories" + + directory repositories_dir + + desc "Build deb packages" + task :build => [@archive_name, repositories_dir] do + tmp_dir = "#{apt_dir}/tmp" + rm_rf(tmp_dir) + mkdir_p(tmp_dir) + cp(@archive_name, tmp_dir) + Dir.glob("debian*") do |debian_dir| + cp_r(debian_dir, "#{tmp_dir}/#{debian_dir}") + end + + env_sh = "#{apt_dir}/env.sh" + File.open(env_sh, "w") do |file| + file.puts(<<-ENV) +PACKAGE=#{@package} +VERSION=#{@version} + ENV + end + + cd(apt_dir) do + threads = [] + targets = (ENV["APT_TARGETS"] || "").split(",") + if targets.empty? + targets = [ + "debian-stretch", + "ubuntu-trusty", + "ubuntu-xenial", + "ubuntu-artful", + ] + end + targets.each do |target| + id = target + if parallel_build? + threads << Thread.new(id) do |local_id| + run_docker(local_id) + end + else + run_docker(id) + end + end + threads.each(&:join) + end + end + end + + desc "Release APT repositories" + apt_tasks = [ + "apt:build", + ] + task :apt => apt_tasks + end + + def define_version_task + namespace :version do + desc "Update versions" + task :update do + update_debian_changelog + update_spec + update_descriptor + end + end + end + + def package_version + "#{@version}-1" + end + + def package_changelog_message + "New upstream release." + end + + def packager_name + ENV["DEBFULLNAME"] || ENV["NAME"] || `git config --get user.name`.chomp + end + + def packager_email + ENV["DEBEMAIL"] || ENV["EMAIL"] || `git config --get user.email`.chomp + end + + def update_content(path) + if File.exist?(path) + content = File.read(path) + else + content = "" + end + content = yield(content) + File.open(path, "w") do |file| + file.puts(content) + end + end + + def update_debian_changelog + Dir.glob("debian*") do |debian_dir| + update_content("#{debian_dir}/changelog") do |content| + <<-CHANGELOG.rstrip +#{@package} (#{package_version}) unstable; urgency=low + + * New upstream release. + + -- #{packager_name} <#{packager_email}> #{@release_time.rfc2822} + +#{content} + CHANGELOG + end + end + end + + def update_spec + release_time = @release_time.strftime("%a %b %d %Y") + update_content("yum/#{@rpm_package}.spec.in") do |content| + content = content.sub(/^(%changelog\n)/, <<-CHANGELOG) +%changelog +* #{release_time} #{packager_name} <#{packager_email}> - #{package_version} +- #{package_changelog_message} + + CHANGELOG + content = content.sub(/^(Release:\s+)\d+/, "\\11") + content.rstrip + end + end + + def update_descriptor + Dir.glob("**/descriptor.json") do |descriptor_json| + update_content(descriptor_json) do |content| + content = content.sub(/"name": "\d+\.\d+\.\d+.*?"/) do + "\"name\": \"#{@version}\"" + end + end + end + end +end diff --git a/cd/linux-packages/yum/arrow.spec.in b/cd/linux-packages/yum/arrow.spec.in new file mode 100644 index 000000000000..65c357efb1ff --- /dev/null +++ b/cd/linux-packages/yum/arrow.spec.in @@ -0,0 +1,244 @@ +# -*- rpm -*- +# +# 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. + +%define _centos_ver %{?centos_ver:%{centos_ver}}%{!?centos_ver:7} + +%define use_python %{_centos_ver} >= 6 +%define use_glib %{_centos_ver} >= 7 + +Name: @PACKAGE@ +Version: @VERSION@ +Release: 1%{?dist} +Summary: Apache Arrow is a data processing library for analysis + +Group: Development/Libraries +License: Apache-2.0 +URL: https://arrow.apache.org/ +Source0: https://dist.apache.org/repos/dist/release/arrow/arrow-%{version}/apache-@PACKAGE@-%{version}.tar.gz + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) +BuildRequires: pkgconfig +BuildRequires: gcc-c++ +BuildRequires: cmake3 +BuildRequires: boost-devel +BuildRequires: git +BuildRequires: jemalloc-devel +%if %{use_python} +BuildRequires: python34-devel +BuildRequires: python34-numpy +%endif +%if %{use_glib} +BuildRequires: gtk-doc +BuildRequires: gobject-introspection-devel +%endif + +%description +Apache Arrow is a data processing library for analysis. + +%prep +%setup -q -n apache-@PACKAGE@-%{version} + +%build +build_type=release +mkdir cpp/build +cd cpp/build +%cmake3 .. \ + -DCMAKE_BUILD_TYPE=$build_type \ + -DARROW_ORC=ON \ +%if %{use_python} + -DARROW_PYTHON=ON \ + -DPythonInterp_FIND_VERSION=ON \ + -DPythonInterp_FIND_VERSION_MAJOR=3 \ +%endif +%if %{_centos_ver} == 6 + -DARROW_BOOST_VENDORED=ON \ +%endif + -DARROW_ORC=ON \ + -DARROW_BUILD_TESTS=OFF +make %{?_smp_mflags} +cd - + +%if %{use_glib} +cd c_glib +%configure \ + --with-arrow-cpp-build-dir=$PWD/../cpp/build \ + --with-arrow-cpp-build-type=$build_type +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +LD_LIBRARY_PATH=$PWD/arrow-glib/.libs/:$PWD/../cpp/build/$build_type \ + make %{?_smp_mflags} +cd - +%endif + +%install +cd cpp/build +make install DESTDIR=$RPM_BUILD_ROOT +cd - + +%if %{use_glib} +cd c_glib +make install DESTDIR=$RPM_BUILD_ROOT +rm $RPM_BUILD_ROOT%{_libdir}/*.la +cd - +%endif + +%package libs +Summary: Runtime libraries for Apache Arrow C++ +Group: System Environment/Libraries +License: Apache-2.0 +Requires: boost-system +Requires: boost-filesystem +Requires: boost-regex +Requires: jemalloc + +%description libs +This package contains the libraries for Apache Arrow C++. + +%files libs +%defattr(-,root,root,-) +%doc README.md LICENSE.txt NOTICE.txt +%{_libdir}/libarrow.so.* + +%package devel +Summary: Libraries and header files for Apache Arrow C++ +Group: Development/Libraries +License: Apache-2.0 +Requires: %{name}-libs = %{version}-%{release} + +%description devel +Libraries and header files for Apache Arrow C++. + +%files devel +%defattr(-,root,root,-) +%doc README.md LICENSE.txt NOTICE.txt +%{_includedir}/arrow/ +%{_libdir}/libarrow.a +%{_libdir}/libarrow.so +%{_libdir}/pkgconfig/arrow.pc +%{_libdir}/pkgconfig/arrow-compute.pc + +%if %{use_python} +%package python-libs +Summary: Apache Arrow CPython extensions +Group: System Environment/Libraries +License: Apache-2.0 +Requires: arrow-libs = %{version}-%{release} +Requires: python34-numpy + +%description python-libs +This package contains the Apache Arrow CPython extensions. + +%files python-libs +%defattr(-,root,root,-) +%doc README.md LICENSE.txt NOTICE.txt +%{_libdir}/libarrow_python.so.* + +%package python-devel +Summary: Libraries and header files for Apache Arrow CPython extensions +Group: Development/Libraries +License: Apache-2.0 +Requires: arrow-devel = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} +Requires: python34-devel + +%description python-devel +Libraries and header files for Apache Arrow CPython extensions. + +%files python-devel +%defattr(-,root,root,-) +%doc README.md LICENSE.txt NOTICE.txt +%{_libdir}/libarrow_python.a +%{_libdir}/libarrow_python.so +%{_libdir}/pkgconfig/arrow-python.pc +%endif + +%if %{use_glib} +%package glib-libs +Summary: Runtime libraries for Apache Arrow GLib +Group: System Environment/Libraries +License: Apache-2.0 +Requires: arrow-libs = %{version}-%{release} +Requires: glib2 + +%description glib-libs +This package contains the libraries for Apache Arrow GLib. + +%files glib-libs +%defattr(-,root,root,-) +%doc README.md LICENSE.txt NOTICE.txt +%{_libdir}/libarrow-glib.so.* +%{_datadir}/gir-1.0/*.gir + +%package glib-devel +Summary: Libraries and header files for Apache Arrow GLib +Group: Development/Libraries +License: Apache-2.0 +Requires: arrow-devel = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} +Requires: glib2-devel +Requires: gobject-introspection-devel + +%description glib-devel +Libraries and header files for Apache Arrow GLib. + +%files glib-devel +%defattr(-,root,root,-) +%doc README.md LICENSE.txt NOTICE.txt +%{_includedir}/arrow-glib/ +%{_libdir}/libarrow-glib.a +%{_libdir}/libarrow-glib.so +%{_libdir}/pkgconfig/arrow-glib.pc +%{_libdir}/girepository-1.0/*.typelib +%{_datadir}/arrow-glib/example/ + +%package glib-doc +Summary: Documentation for Apache Arrow GLib +Group: Documentation +License: Apache-2.0 +Requires: arrow-devel = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} + +%description glib-doc +Documentation for Apache Arrow GLib. + +%files glib-doc +%defattr(-,root,root,-) +%doc README.md LICENSE.txt NOTICE.txt +%{_docdir}/arrow-glib/ +%{_datadir}/gtk-doc/html/arrow-glib/ +%endif + +%changelog +* Fri Mar 16 2018 Kouhei Sutou - 0.9.0-1 +- New upstream release. + +* Sun Dec 17 2017 Uwe Korn - 0.8.0-1 +- New upstream release. + +* Wed Sep 27 2017 Kouhei Sutou - 0.7.1-1 +- New upstream release. + +* Tue Sep 12 2017 Wes McKinney - 0.7.0-1 +- New upstream release. + +* Fri Aug 11 2017 Kouhei Sutou - 0.6.0-1 +- New upstream release. + +* Wed Aug 02 2017 Kouhei Sutou - 0.6.0.20170802-1 +- New upstream release. diff --git a/cd/linux-packages/yum/build.sh b/cd/linux-packages/yum/build.sh new file mode 100755 index 000000000000..fea748be0aa9 --- /dev/null +++ b/cd/linux-packages/yum/build.sh @@ -0,0 +1,103 @@ +#!/bin/sh +# -*- sh-indentation: 2; sh-basic-offset: 2 -*- +# +# 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. + +run() +{ + "$@" + if test $? -ne 0; then + echo "Failed $@" + exit 1 + fi +} + +rpmbuild_options= + +. /host/env.sh + +distribution=$(cut -d " " -f 1 /etc/redhat-release | tr "A-Z" "a-z") +if grep -q Linux /etc/redhat-release; then + distribution_version=$(cut -d " " -f 4 /etc/redhat-release) +else + distribution_version=$(cut -d " " -f 3 /etc/redhat-release) +fi +distribution_version=$(echo ${distribution_version} | sed -e 's/\..*$//g') + +architecture="$(arch)" +case "${architecture}" in + i*86) + architecture=i386 + ;; +esac + +if [ -x /usr/bin/rpmdev-setuptree ]; then + rm -rf .rpmmacros + run rpmdev-setuptree +else + run cat < ~/.rpmmacros +%_topdir ${HOME}/rpmbuild +EOM + run mkdir -p ~/rpmbuild/SOURCES + run mkdir -p ~/rpmbuild/SPECS + run mkdir -p ~/rpmbuild/BUILD + run mkdir -p ~/rpmbuild/RPMS + run mkdir -p ~/rpmbuild/SRPMS +fi + +repository="/host/repositories/${distribution}/${distribution_version}" +rpm_dir="${repository}/${architecture}/Packages" +srpm_dir="${repository}/source/SRPMS" +run mkdir -p "${rpm_dir}" "${srpm_dir}" + +# for debug +# rpmbuild_options="$rpmbuild_options --define 'optflags -O0 -g3'" + +cd + +if [ -n "${SOURCE_ARCHIVE}" ]; then + run cp /host/tmp/${SOURCE_ARCHIVE} rpmbuild/SOURCES/ +else + run cp /host/tmp/${PACKAGE}-${VERSION}.* rpmbuild/SOURCES/ +fi +run cp \ + /host/tmp/${distribution}/${PACKAGE}.spec \ + rpmbuild/SPECS/ + +cat < build.sh +#!/bin/bash + +rpmbuild -ba ${rpmbuild_options} rpmbuild/SPECS/${PACKAGE}.spec +BUILD +run chmod +x build.sh +if [ "${distribution_version}" = 6 ]; then + if [ "${DEBUG:-no}" = "yes" ]; then + run scl enable devtoolset-6 ./build.sh + else + run scl enable devtoolset-6 ./build.sh > /dev/null + fi +else + if [ "${DEBUG:-no}" = "yes" ]; then + run ./build.sh + else + run ./build.sh > /dev/null + fi +fi + +run mv rpmbuild/RPMS/*/* "${rpm_dir}/" +run mv rpmbuild/SRPMS/* "${srpm_dir}/" diff --git a/cd/linux-packages/yum/centos-6/Dockerfile b/cd/linux-packages/yum/centos-6/Dockerfile new file mode 100644 index 000000000000..90bd710963c6 --- /dev/null +++ b/cd/linux-packages/yum/centos-6/Dockerfile @@ -0,0 +1,62 @@ +# 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. + +FROM centos:6 + +ARG DEBUG + +ENV \ + SRPM_DOWNLOAD_URL=http://vault.centos.org/7.4.1708/os/Source/SPackages \ + LIBARCHIVE_SRPM_BASE=libarchive-3.1.2-10.el7_2.src.rpm + +RUN \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "--quiet") && \ + yum update -y ${quiet} && \ + yum install -y ${quiet} \ + centos-release-scl \ + epel-release && \ + yum install -y \ + autoconf268 \ + wget \ + yum-utils && \ + yum groupinstall -y ${quiet} "Development Tools" && \ + wget ${quiet} ${SRPM_DOWNLOAD_URL}/${LIBARCHIVE_SRPM_BASE} && \ + yum-builddep -y ${quiet} --nogpgcheck ${LIBARCHIVE_SRPM_BASE} && \ + rpm -i ${quiet} ${LIBARCHIVE_SRPM_BASE} && \ + sed -i'' -e 's/^run_testsuite$/:/g' ~/rpmbuild/SPECS/libarchive.spec && \ + AUTOM4TE=autom4te268 \ + rpmbuild -bb ${quiet} \ + ~/rpmbuild/SPECS/libarchive.spec && \ + yum install -y ${quiet} ~/rpmbuild/RPMS/*/libarchive-3.*.rpm && \ + rm -rf ${LIBARCHIVE_SRPM_BASE} ~/rpmbuild/ && \ + yum install -y ${quiet} \ + boost-devel \ + centos-release-scl \ + cmake3 \ + devtoolset-6 \ + git \ + gobject-introspection-devel \ + gtk-doc \ + jemalloc-devel \ + pkg-config \ + python34 \ + python34-devel \ + python34-numpy \ + rpm-build \ + rpmdevtools \ + tar && \ + yum clean ${quiet} all diff --git a/cd/linux-packages/yum/centos-7/Dockerfile b/cd/linux-packages/yum/centos-7/Dockerfile new file mode 100644 index 000000000000..58058ee20ec1 --- /dev/null +++ b/cd/linux-packages/yum/centos-7/Dockerfile @@ -0,0 +1,41 @@ +# 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. + +FROM centos:7 + +ARG DEBUG + +RUN \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "--quiet") && \ + yum update -y ${quiet} && \ + yum install -y ${quiet} epel-release && \ + yum groupinstall -y ${quiet} "Development Tools" && \ + yum install -y ${quiet} \ + boost-devel \ + cmake3 \ + git \ + gobject-introspection-devel \ + gtk-doc \ + jemalloc-devel \ + pkg-config \ + python34 \ + python34-devel \ + python34-numpy \ + rpm-build \ + rpmdevtools \ + tar && \ + yum clean ${quiet} all diff --git a/cd/linux-packages/yum/descriptor.json b/cd/linux-packages/yum/descriptor.json new file mode 100644 index 000000000000..f59ef856acff --- /dev/null +++ b/cd/linux-packages/yum/descriptor.json @@ -0,0 +1,22 @@ +{ + "package": { + "name": "Yum", + "repo": "apache-arrow-yum", + "subject": "kou", + "licenses": ["Apache-2.0"], + "vcs_url": "htttps://github.com/apache/arrow.git" + }, + "version": { + "name": "0.9.0" + }, + "files": [ + { + "includePattern": "cpp-linux/yum/repositories/(centos)/([^/]+)/([^/]+)/[^/]+/([^/]+\\.rpm)", + "uploadPattern": "$1/$2/$3/$4", + "matrixParams": { + "override": 1 + } + } + ], + "publish": true +} diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index 5b3c9d42ce34..28826d27582c 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -10,4 +10,6 @@ env: - PYARROW_VERSION=0.9.0 script: - - cd cpp-linux && travis_wait 40 && rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no + - git clone -b {ARROW_BRANCH} {ARROW_REPO} + - pushd arrow/linux-packages + - travis_wait 40 && rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no From 56991a6a0b4f4f47ae963e3fa02b364c69cd48f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 6 Apr 2018 16:45:07 +0200 Subject: [PATCH 05/60] configuration fixes --- cd/linux-packages/Rakefile | 2 +- cd/travis-linux-packages.yml | 4 ++-- cd/travis-linux-wheel.yml | 8 ++++---- cd/travis-osx-wheel.yml | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cd/linux-packages/Rakefile b/cd/linux-packages/Rakefile index af575c09301a..ae82ee939b1d 100644 --- a/cd/linux-packages/Rakefile +++ b/cd/linux-packages/Rakefile @@ -28,7 +28,7 @@ class ApacheArrowPackageTask < PackageTask private def arrow_source_dir - File.join(File.dirname(__FILE__), "..", "arrow") + File.join(File.dirname(__FILE__), "..", "..", "arrow") end def detect_version(release_time) diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index 28826d27582c..2e2c883cc216 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -10,6 +10,6 @@ env: - PYARROW_VERSION=0.9.0 script: - - git clone -b {ARROW_BRANCH} {ARROW_REPO} - - pushd arrow/linux-packages + - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow + - pushd arrow/cd/linux-packages - travis_wait 40 && rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no diff --git a/cd/travis-linux-wheel.yml b/cd/travis-linux-wheel.yml index d88a0931cf8b..dc4084e44c53 100644 --- a/cd/travis-linux-wheel.yml +++ b/cd/travis-linux-wheel.yml @@ -16,12 +16,12 @@ before_script: before_install: install: script: - - git clone https://github.com/apache/arrow arrow + - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow - mkdir -p arrow/dist - - pushd arrow/python/manylinux1 - - docker build -t arrow-base-x86_64 -f Dockerfile-x86_64 . + + - docker build -t arrow-base-x86_64 -f arrow/python/manylinux1/Dockerfile-x86_64 . - docker run --shm-size=2g --rm -e PYARROW_PARALLEL=3 -e SETUPTOOLS_SCM_PRETEND_VERSION=$PYARROW_VERSION -v $PWD:/io arrow-base-x86_64 /io/build_arrow.sh - - popd + - sudo mv arrow/python/manylinux1/dist/* dist/ diff --git a/cd/travis-osx-wheel.yml b/cd/travis-osx-wheel.yml index 9117644d3030..711db6950488 100644 --- a/cd/travis-osx-wheel.yml +++ b/cd/travis-osx-wheel.yml @@ -30,7 +30,7 @@ matrix: before_install: - git clone https://github.com/matthew-brett/multibuild - - git clone https://github.com/apache/arrow + - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow # TODO pin it # Also remove artifacts that depend on Boost - brew uninstall boost cgal postgis sfcgal @@ -38,11 +38,11 @@ before_install: - brew upgrade cmake - brew install bison flex - - pushd arrow/cd/osx-wheel + - export CONFIG_PATH=`pwd`/arrow/cd/osx-wheel/config.sh - source multibuild/common_utils.sh - source multibuild/travis_osx_steps.sh + - before_install - - popd install: - BUILD_DEPENDS="numpy==$NP_BUILD_DEP six cython" From f0e0dcddf68102e7116ac9175c2325ca65ec5d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 6 Apr 2018 16:47:54 +0200 Subject: [PATCH 06/60] rakefile source path --- cd/linux-packages/Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cd/linux-packages/Rakefile b/cd/linux-packages/Rakefile index ae82ee939b1d..0279e891b43d 100644 --- a/cd/linux-packages/Rakefile +++ b/cd/linux-packages/Rakefile @@ -28,7 +28,7 @@ class ApacheArrowPackageTask < PackageTask private def arrow_source_dir - File.join(File.dirname(__FILE__), "..", "..", "arrow") + File.join(File.dirname(__FILE__), "..", "..") end def detect_version(release_time) From 75fc775b37985c6f5a4b81cacc0e93b2463686ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 6 Apr 2018 19:12:12 +0200 Subject: [PATCH 07/60] update templates --- cd/appveyor-win-wheel.yml | 31 +++++++++++++++++++++++++++++-- cd/travis-linux-wheel.yml | 7 +++++-- cd/travis-osx-wheel.yml | 2 +- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index c9f92fd4c41e..85e53d6577b7 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -1,5 +1,32 @@ os: Visual Studio 2015 +environment: + matrix: + - GENERATOR: Visual Studio 14 2015 Win64 + NUMPY: "1.13" + PYTHON: "3.5" + ARCH: "64" + - GENERATOR: Visual Studio 14 2015 Win64 + NUMPY: "1.13" + PYTHON: "3.6" + ARCH: "64" + MSVC_DEFAULT_OPTIONS: ON + BOOST_ROOT: C:\Libraries\boost_1_63_0 + BOOST_LIBRARYDIR: C:\Libraries\boost_1_63_0\lib64-msvc-14.0 + pyarrow_version: 0.9.0 + pyarrow_ref: 7b2c79765cf92760e1f8cca079159d9613b86412 + parquet_cpp_ref: apache-parquet-cpp-1.4.0 + +init: + - set MINICONDA=C:\Miniconda35-x64 + - set PATH=%MINICONDA%;%MINICONDA%/Scripts;%MINICONDA%/Library/bin;%PATH% + build_script: - - git clone https://github.com/apache/arrow - - cmd: "echo Hello, world!" + - cmd: mkdir wheels + - call scripts\python-wheels-windows.bat + +after_build: + xcopy C:\apache-arrow\python\dist\* wheels\ + +artifacts: + - path: wheels\*.whl diff --git a/cd/travis-linux-wheel.yml b/cd/travis-linux-wheel.yml index dc4084e44c53..762b2dfd105a 100644 --- a/cd/travis-linux-wheel.yml +++ b/cd/travis-linux-wheel.yml @@ -17,11 +17,14 @@ before_install: install: script: - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow - - mkdir -p arrow/dist + - mkdir -p dist - - docker build -t arrow-base-x86_64 -f arrow/python/manylinux1/Dockerfile-x86_64 . + - pushd arrow/python/manylinux1 + - git clone ../../ arrow + - docker build -t arrow-base-x86_64 -f Dockerfile-x86_64 . - docker run --shm-size=2g --rm -e PYARROW_PARALLEL=3 -e SETUPTOOLS_SCM_PRETEND_VERSION=$PYARROW_VERSION -v $PWD:/io arrow-base-x86_64 /io/build_arrow.sh + - popd - sudo mv arrow/python/manylinux1/dist/* dist/ diff --git a/cd/travis-osx-wheel.yml b/cd/travis-osx-wheel.yml index 711db6950488..8e1c6cd22831 100644 --- a/cd/travis-osx-wheel.yml +++ b/cd/travis-osx-wheel.yml @@ -48,7 +48,7 @@ install: - BUILD_DEPENDS="numpy==$NP_BUILD_DEP six cython" - TEST_DEPENDS="numpy==$NP_TEST_DEP six pandas==$PANDAS_DEP" - - mkdir -p arrow/dist + - mkdir -p dist - clean_code arrow $BUILD_REF - build_wheel arrow $PLAT - mv -v arrow/python/dist/* dist/ From 228b829d51e3cde18193b45c9135c30559915f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 6 Apr 2018 19:17:47 +0200 Subject: [PATCH 08/60] ported appveyor build script --- cd/appveyor-win-wheel.yml | 12 ++- cd/win-wheel/python-wheels-windows.bat | 102 +++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 cd/win-wheel/python-wheels-windows.bat diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index 85e53d6577b7..17b1a20f8f1e 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -22,11 +22,17 @@ init: - set PATH=%MINICONDA%;%MINICONDA%/Scripts;%MINICONDA%/Library/bin;%PATH% build_script: - - cmd: mkdir wheels - - call scripts\python-wheels-windows.bat + - set ARROW_SRC=C:\apache-arrow + + - mkdir %ARROW_SRC% + - git clone -b {ARROW_BRANCH} {ARROW_REPO} %ARROW_SRC% || exit /B + - pushd %ARROW_SRC% + + - mkdir wheels + - call %ARROW_SRC%\cd\win-wheel\python-wheels-windows.bat after_build: - xcopy C:\apache-arrow\python\dist\* wheels\ + xcopy %ARROW_SRC%\python\dist\* wheels\ artifacts: - path: wheels\*.whl diff --git a/cd/win-wheel/python-wheels-windows.bat b/cd/win-wheel/python-wheels-windows.bat new file mode 100644 index 000000000000..f525af6155ab --- /dev/null +++ b/cd/win-wheel/python-wheels-windows.bat @@ -0,0 +1,102 @@ +@rem Licensed to the Apache Software Foundation (ASF) under one +@rem or more contributor license agreements. See the NOTICE file +@rem distributed with this work for additional information +@rem regarding copyright ownership. The ASF licenses this file +@rem to you under the Apache License, Version 2.0 (the +@rem "License"); you may not use this file except in compliance +@rem with the License. You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, +@rem software distributed under the License is distributed on an +@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@rem KIND, either express or implied. See the License for the +@rem specific language governing permissions and limitations +@rem under the License. + +@echo on + +conda update --yes --quiet conda + +conda create -n arrow -q -y python=%PYTHON% ^ + six pytest setuptools numpy=%NUMPY% pandas cython + +conda install -n arrow -q -y -c conda-forge ^ + git flatbuffers rapidjson ^ + cmake ^ + boost-cpp thrift-cpp ^ + gflags snappy zlib brotli zstd lz4-c + +call activate arrow + +@rem fix up symlinks +git config core.symlinks true +git reset --hard || exit /B +git checkout "%pyarrow_ref%" || exit /B + +popd + +set ARROW_HOME=%CONDA_PREFIX%\Library +set PARQUET_HOME=%CONDA_PREFIX%\Library +set ARROW_BUILD_TOOLCHAIN=%CONDA_PREFIX%\Library +set PARQUET_BUILD_TOOLCHAIN=%CONDA_PREFIX%\Library + +@rem Build and test Arrow C++ libraries +mkdir %ARROW_SRC%\cpp\build +pushd %ARROW_SRC%\cpp\build + +cmake -G "%GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%ARROW_HOME% ^ + -DARROW_BOOST_USE_SHARED=OFF ^ + -DARROW_BUILD_TESTS=OFF ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DARROW_CXXFLAGS="/MP" ^ + -DARROW_PYTHON=ON ^ + .. || exit /B +cmake --build . --target INSTALL --config Release || exit /B + +@rem Needed so python-test.exe works +set PYTHONPATH=%CONDA_PREFIX%\Lib;%CONDA_PREFIX%\Lib\site-packages;%CONDA_PREFIX%\python35.zip;%CONDA_PREFIX%\DLLs;%CONDA_PREFIX% +ctest -VV || exit /B +popd + +@rem Build parquet-cpp +git clone https://github.com/apache/parquet-cpp.git || exit /B +pushd parquet-cpp +git checkout "%parquet_cpp_ref%" +popd + +mkdir parquet-cpp\build +pushd parquet-cpp\build + +cmake -G "%GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX=%PARQUET_HOME% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DPARQUET_BOOST_USE_SHARED=OFF ^ + -DPARQUET_BUILD_TESTS=OFF .. || exit /B +cmake --build . --target INSTALL --config Release || exit /B +popd + +@rem Build and import pyarrow +set PYTHONPATH= + +pushd %ARROW_SRC%\python +set PYARROW_BUILD_TYPE=Release +set SETUPTOOLS_SCM_PRETEND_VERSION=%pyarrow_version% + +python setup.py build_ext ^ + --with-parquet ^ + --with-static-boost ^ + --bundle-arrow-cpp ^ + bdist_wheel || exit /B +popd + +@rem test the wheel +call deactivate +conda create -n wheel-test -q -y python=%PYTHON% ^ + numpy=%NUMPY% pandas +call activate wheel-test + +pip install --no-index --find-links=%ARROW_SRC%\python\dist\ pyarrow +python -c "import pyarrow; import pyarrow.parquet" From eb0d25fe3835246728b48bde2ece5002ce2009f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 6 Apr 2018 19:59:54 +0200 Subject: [PATCH 09/60] appveyor builds --- cd/appveyor-win-wheel.yml | 4 +--- cd/travis-linux-packages.yml | 2 +- cd/win-wheel/python-wheels-windows.bat | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index 17b1a20f8f1e..6c69ad284b4b 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -24,11 +24,9 @@ init: build_script: - set ARROW_SRC=C:\apache-arrow - - mkdir %ARROW_SRC% + - mkdir wheels - git clone -b {ARROW_BRANCH} {ARROW_REPO} %ARROW_SRC% || exit /B - - pushd %ARROW_SRC% - - mkdir wheels - call %ARROW_SRC%\cd\win-wheel\python-wheels-windows.bat after_build: diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index 2e2c883cc216..5efb2182680d 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -1,7 +1,7 @@ os: linux dist: trusty sudo: required -language: cpp +language: ruby env: global: diff --git a/cd/win-wheel/python-wheels-windows.bat b/cd/win-wheel/python-wheels-windows.bat index f525af6155ab..42ea446ef40e 100644 --- a/cd/win-wheel/python-wheels-windows.bat +++ b/cd/win-wheel/python-wheels-windows.bat @@ -30,6 +30,8 @@ conda install -n arrow -q -y -c conda-forge ^ call activate arrow +pushd %ARROW_SRC% + @rem fix up symlinks git config core.symlinks true git reset --hard || exit /B From 565c72022abdc9e5e540927e06b8d95df4af27d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 6 Apr 2018 20:28:56 +0200 Subject: [PATCH 10/60] appveyor attempts --- cd/appveyor-win-wheel.yml | 4 +--- cd/travis-linux-packages.yml | 10 +++++----- cd/travis-linux-wheel.yml | 6 +++--- cd/travis-osx-wheel.yml | 6 +++--- cd/win-wheel/python-wheels-windows.bat | 2 ++ 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index 6c69ad284b4b..d31a69685d42 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -16,17 +16,15 @@ environment: pyarrow_version: 0.9.0 pyarrow_ref: 7b2c79765cf92760e1f8cca079159d9613b86412 parquet_cpp_ref: apache-parquet-cpp-1.4.0 + ARROW_SRC=C:\apache-arrow init: - set MINICONDA=C:\Miniconda35-x64 - set PATH=%MINICONDA%;%MINICONDA%/Scripts;%MINICONDA%/Library/bin;%PATH% build_script: - - set ARROW_SRC=C:\apache-arrow - - mkdir wheels - git clone -b {ARROW_BRANCH} {ARROW_REPO} %ARROW_SRC% || exit /B - - call %ARROW_SRC%\cd\win-wheel\python-wheels-windows.bat after_build: diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index 5efb2182680d..c36aeaa24595 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -5,11 +5,11 @@ language: ruby env: global: - - PLAT=x86_64 - - BUILD_REF=7b2c79765cf92760e1f8cca079159d9613b86412 - - PYARROW_VERSION=0.9.0 + - PLAT={PLAT} + - BUILD_REF={BUILD_REF} + - PYARROW_VERSION={PYARROW_VERSION} script: - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow - - pushd arrow/cd/linux-packages - - travis_wait 40 && rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no + - (cd cpp-linux && rake yum:build PARALLEL=yes DEBUG=no) + #- (cd arrow/cd/linux-packages && travis_wait 40 rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no) diff --git a/cd/travis-linux-wheel.yml b/cd/travis-linux-wheel.yml index 762b2dfd105a..ff69faf88cac 100644 --- a/cd/travis-linux-wheel.yml +++ b/cd/travis-linux-wheel.yml @@ -1,8 +1,8 @@ env: global: - - PLAT=x86_64 - - BUILD_REF=7b2c79765cf92760e1f8cca079159d9613b86412 - - PYARROW_VERSION=0.9.0 + - PLAT={PLAT} + - BUILD_REF={BUILD_REF} + - PYARROW_VERSION={PYARROW_VERSION} os: linux dist: trusty diff --git a/cd/travis-osx-wheel.yml b/cd/travis-osx-wheel.yml index 8e1c6cd22831..7b18999c378b 100644 --- a/cd/travis-osx-wheel.yml +++ b/cd/travis-osx-wheel.yml @@ -4,9 +4,9 @@ language: objective-c env: global: - - PLAT=x86_64 - - BUILD_REF=7b2c79765cf92760e1f8cca079159d9613b86412 - - PYARROW_VERSION=0.9.0 + - PLAT={PLAT} + - BUILD_REF={BUILD_REF} + - PYARROW_VERSION={PYARROW_VERSION} matrix: exclude: diff --git a/cd/win-wheel/python-wheels-windows.bat b/cd/win-wheel/python-wheels-windows.bat index 42ea446ef40e..d398f8e60b77 100644 --- a/cd/win-wheel/python-wheels-windows.bat +++ b/cd/win-wheel/python-wheels-windows.bat @@ -44,6 +44,8 @@ set PARQUET_HOME=%CONDA_PREFIX%\Library set ARROW_BUILD_TOOLCHAIN=%CONDA_PREFIX%\Library set PARQUET_BUILD_TOOLCHAIN=%CONDA_PREFIX%\Library +echo %ARROW_HOME% + @rem Build and test Arrow C++ libraries mkdir %ARROW_SRC%\cpp\build pushd %ARROW_SRC%\cpp\build From 8d3bb2cde62201dffabf9fd30605fec07dd496be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 6 Apr 2018 20:42:04 +0200 Subject: [PATCH 11/60] path fixes --- cd/appveyor-win-wheel.yml | 2 +- cd/travis-linux-packages.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index d31a69685d42..83424bff7381 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -16,7 +16,7 @@ environment: pyarrow_version: 0.9.0 pyarrow_ref: 7b2c79765cf92760e1f8cca079159d9613b86412 parquet_cpp_ref: apache-parquet-cpp-1.4.0 - ARROW_SRC=C:\apache-arrow + ARROW_SRC: C:\apache-arrow init: - set MINICONDA=C:\Miniconda35-x64 diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index c36aeaa24595..65f4fa477f4e 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -11,5 +11,5 @@ env: script: - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow - - (cd cpp-linux && rake yum:build PARALLEL=yes DEBUG=no) + - (cd arrow/cd/linux-packages && rake yum:build PARALLEL=yes DEBUG=no) #- (cd arrow/cd/linux-packages && travis_wait 40 rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no) From 6164b28d94fe23690aa1060c7a3bb0e75a8dd2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 6 Apr 2018 21:39:24 +0200 Subject: [PATCH 12/60] path fixies again --- cd/appveyor-win-wheel.yml | 4 ++-- cd/linux-packages/Rakefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index 83424bff7381..5c1f676954a6 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -13,8 +13,8 @@ environment: MSVC_DEFAULT_OPTIONS: ON BOOST_ROOT: C:\Libraries\boost_1_63_0 BOOST_LIBRARYDIR: C:\Libraries\boost_1_63_0\lib64-msvc-14.0 - pyarrow_version: 0.9.0 - pyarrow_ref: 7b2c79765cf92760e1f8cca079159d9613b86412 + pyarrow_version: {PYARROW_VERSION} + pyarrow_ref: {BUILD_REF} parquet_cpp_ref: apache-parquet-cpp-1.4.0 ARROW_SRC: C:\apache-arrow diff --git a/cd/linux-packages/Rakefile b/cd/linux-packages/Rakefile index 0279e891b43d..1dec2d7cb39c 100644 --- a/cd/linux-packages/Rakefile +++ b/cd/linux-packages/Rakefile @@ -28,7 +28,7 @@ class ApacheArrowPackageTask < PackageTask private def arrow_source_dir - File.join(File.dirname(__FILE__), "..", "..") + File.join(File.dirname(__FILE__), "..", "..", "..") end def detect_version(release_time) From 5a1115df09bb105d749aa1f39880dd094d204e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 6 Apr 2018 21:41:57 +0200 Subject: [PATCH 13/60] path fixies again --- cd/linux-packages/Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cd/linux-packages/Rakefile b/cd/linux-packages/Rakefile index 1dec2d7cb39c..0279e891b43d 100644 --- a/cd/linux-packages/Rakefile +++ b/cd/linux-packages/Rakefile @@ -28,7 +28,7 @@ class ApacheArrowPackageTask < PackageTask private def arrow_source_dir - File.join(File.dirname(__FILE__), "..", "..", "..") + File.join(File.dirname(__FILE__), "..", "..") end def detect_version(release_time) From 72fa4eb510b29d8597b66bf6ed2e7f53965c1ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 7 Apr 2018 11:05:03 +0200 Subject: [PATCH 14/60] trying to fix linnnux builds --- cd/crossbow.py | 39 ++++++++++++++++++++++++++++++++++-- cd/travis-linux-packages.yml | 4 ++++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/cd/crossbow.py b/cd/crossbow.py index e9a1079415d5..55b07c45ba5d 100644 --- a/cd/crossbow.py +++ b/cd/crossbow.py @@ -1,15 +1,40 @@ #!/usr/bin/env python +# TODO: create a docker container too for this sscript with dependencies pre-installed +# TODO: probably should turn off auto cancellation feature of travis +# TODO: dry-run / render feature + # we might weaken the dependencies later, but a release manager probably # can have these installed +import re +import sys import pygit2 from pygit2 import Signature, Repository, UserPass, RemoteCallbacks from pathlib import Path +if len(sys.argv) > 1: + pattern = sys.argv[1] +else: + pattern = False + ARROW_REPO = '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/kszucs/arrow' ARROW_BRANCH = 'cd' +PLAT = 'x86_64' + +# by default we should query the current build ref +# BUILD_REF = '7b2c79765cf92760e1f8cca079159d9613b86412' +arrow_path = Path(__file__).absolute().parents[1] +print(arrow_path) + +arrow_repo = Repository(str(arrow_path)) + +BUILD_REF = arrow_repo.head.target + +PYARROW_VERSION = '0.9.0' + + # we should handle this later signature = Signature('John Doe', 'jdoe@example.com', 12346, 0) author = committer = signature @@ -35,6 +60,10 @@ for config in cwd.glob('*.yml'): branch_name = config.stem + + if pattern and not re.search(pattern, branch_name): + continue + reference = 'refs/heads/{}'.format(branch_name) refspecs.append(reference) @@ -58,7 +87,13 @@ content = config.read_text() # FANCY templating - content = content.format(ARROW_REPO=ARROW_REPO, ARROW_BRANCH=ARROW_BRANCH) + content = content.format( + ARROW_REPO=ARROW_REPO, + ARROW_BRANCH=ARROW_BRANCH, + PLAT=PLAT, + BUILD_REF=BUILD_REF, + PYARROW_VERSION=PYARROW_VERSION + ) blob_id = repo.create_blob(content) blob = repo[blob_id] @@ -85,7 +120,7 @@ def acquire_credentials_cb(url, username_from_url, allowed_types): print('credentials', url, username_from_url, allowed_types) # its a libgit2 bug, that it infinitly retries the authentication - token = '' + token = 'b713b374ac028e9f1579b5facca6c175f0dd02b5' return UserPass(token, 'x-oauth-basic') diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index 65f4fa477f4e..ec881f41cf2f 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -2,6 +2,7 @@ os: linux dist: trusty sudo: required language: ruby +python: 3.5 env: global: @@ -9,6 +10,9 @@ env: - BUILD_REF={BUILD_REF} - PYARROW_VERSION={PYARROW_VERSION} +install: + - sudo apt-get update -y && sudo apt-get install -y build-essential libboost-dev + script: - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow - (cd arrow/cd/linux-packages && rake yum:build PARALLEL=yes DEBUG=no) From 01d99e9dc5dd499c3a84e6e972bf4ca78ff0a58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 7 Apr 2018 14:58:18 +0200 Subject: [PATCH 15/60] reorganize --- cd/appveyor-win-wheel.yml | 2 +- cd/conda-recipes/arrow-cpp/bld.bat | 18 +++++ cd/conda-recipes/arrow-cpp/build.sh | 28 +++++++ cd/conda-recipes/arrow-cpp/meta.yaml | 74 +++++++++++++++++++ cd/conda-recipes/pyarrow/bld.bat | 20 +++++ cd/conda-recipes/pyarrow/build.sh | 14 ++++ cd/conda-recipes/pyarrow/meta.yaml | 65 ++++++++++++++++ .../config.sh => python-wheels/osx-build.sh} | 0 .../win-build.bat} | 0 cd/travis-osx-wheel.yml | 2 +- 10 files changed, 221 insertions(+), 2 deletions(-) create mode 100644 cd/conda-recipes/arrow-cpp/bld.bat create mode 100644 cd/conda-recipes/arrow-cpp/build.sh create mode 100644 cd/conda-recipes/arrow-cpp/meta.yaml create mode 100644 cd/conda-recipes/pyarrow/bld.bat create mode 100644 cd/conda-recipes/pyarrow/build.sh create mode 100644 cd/conda-recipes/pyarrow/meta.yaml rename cd/{osx-wheel/config.sh => python-wheels/osx-build.sh} (100%) rename cd/{win-wheel/python-wheels-windows.bat => python-wheels/win-build.bat} (100%) diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index 5c1f676954a6..14ddda48e608 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -25,7 +25,7 @@ init: build_script: - mkdir wheels - git clone -b {ARROW_BRANCH} {ARROW_REPO} %ARROW_SRC% || exit /B - - call %ARROW_SRC%\cd\win-wheel\python-wheels-windows.bat + - call %ARROW_SRC%\cd\python-wheels\win-build.bat after_build: xcopy %ARROW_SRC%\python\dist\* wheels\ diff --git a/cd/conda-recipes/arrow-cpp/bld.bat b/cd/conda-recipes/arrow-cpp/bld.bat new file mode 100644 index 000000000000..ad3ac293cb70 --- /dev/null +++ b/cd/conda-recipes/arrow-cpp/bld.bat @@ -0,0 +1,18 @@ +mkdir "%SRC_DIR%"\cpp\build +pushd "%SRC_DIR%"\cpp\build + +set ARROW_BUILD_TOOLCHAIN=%LIBRARY_PREFIX% + +cmake -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ + -DARROW_BOOST_USE_SHARED:BOOL=ON ^ + -DARROW_BUILD_TESTS:BOOL=OFF ^ + -DARROW_BUILD_UTILITIES:BOOL=OFF ^ + -DCMAKE_BUILD_TYPE=release ^ + -DARROW_PYTHON:BOOL=ON ^ + -DARROW_ORC:BOOL=ON ^ + .. + +cmake --build . --target INSTALL --config Release + +popd diff --git a/cd/conda-recipes/arrow-cpp/build.sh b/cd/conda-recipes/arrow-cpp/build.sh new file mode 100644 index 000000000000..c69adfb582a0 --- /dev/null +++ b/cd/conda-recipes/arrow-cpp/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -e +set -x + +# Build dependencies +export ARROW_BUILD_TOOLCHAIN=$PREFIX + +cd cpp +mkdir build-dir +cd build-dir + +cmake \ + -DCMAKE_BUILD_TYPE=release \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=$PREFIX/lib \ + -DARROW_BOOST_USE_SHARED=ON \ + -DARROW_BUILD_BENCHMARKS=OFF \ + -DARROW_BUILD_UTILITIES=OFF \ + -DARROW_BUILD_TESTS=OFF \ + -DARROW_JEMALLOC=OFF \ + -DARROW_PLASMA=ON \ + -DARROW_PYTHON=ON \ + -DARROW_ORC=ON \ + .. + +make -j${CPU_COUNT} +make install diff --git a/cd/conda-recipes/arrow-cpp/meta.yaml b/cd/conda-recipes/arrow-cpp/meta.yaml new file mode 100644 index 000000000000..93daba404c94 --- /dev/null +++ b/cd/conda-recipes/arrow-cpp/meta.yaml @@ -0,0 +1,74 @@ +{% set version = "0.9.0" %} +{% set commit = "f9f8320339692d4134d1ef42c32cb7c8d547593e" %} +{% set checksum = "6fa549d8aa01e457ae6b9962179caec3df9153659d5b3ff82449719d48517dc9" %} + +package: + name: arrow-cpp + version: {{ version }} + + +source: + fn: {{ commit }}.tar.gz + url: https://github.com/apache/arrow/archive/{{ commit }}.tar.gz + sha256: {{ checksum }} + +build: + number: 6 + skip: true # [win32] + skip: true # [win and py<35] + features: + - vc14 # [win and py>=35] + +requirements: + build: + - toolchain + - cmake + - boost-cpp 1.66.0 + - flatbuffers + - rapidjson + - zlib 1.2.* + - snappy + - brotli + - zstd + - lz4-c + - jemalloc 4.4.0 # [unix] + - python + - numpy 1.10.* # [not (win and py>=36)] + - numpy 1.12.* # [win and py>=36] + + run: + - boost-cpp 1.66.0 + - python + - numpy >=1.10 # [not (win and py>=36)] + - numpy >=1.12 # [win and py>=36] + - vc 14.* # [win and py>=35] + - snappy # [win and py>=35] + +test: + commands: + - test -f $PREFIX/lib/libarrow.a # [unix] + - test -f $PREFIX/lib/libarrow.so # [linux] + - test -f $PREFIX/lib/libarrow_python.so # [linux] + - test -f $PREFIX/lib/libplasma.so # [linux] + - test -f $PREFIX/lib/libarrow.dylib # [osx] + - test -f $PREFIX/lib/libarrow_python.dylib # [osx] + - test -f $PREFIX/lib/libplasma.dylib # [osx] + - if not exist %LIBRARY_INC%\\arrow\\api.h exit 1 # [win] + - if not exist %PREFIX%\\Library\\bin\\arrow.dll exit 1 # [win] + - if not exist %PREFIX%\\Library\\bin\\arrow_python.dll exit 1 # [win] + +about: + home: https://github.com/apache/arrow + license: Apache 2.0 + summary: 'C++ libraries for Apache Arrow' + +extra: + recipe-maintainers: + - wesm + - xhochy + - leifwalsh + - jreback + - cpcloud + - pcmoritz + - robertnishihara + - siddharthteotia diff --git a/cd/conda-recipes/pyarrow/bld.bat b/cd/conda-recipes/pyarrow/bld.bat new file mode 100644 index 000000000000..af8d1a62260a --- /dev/null +++ b/cd/conda-recipes/pyarrow/bld.bat @@ -0,0 +1,20 @@ +pushd "%SRC_DIR%"\python + +@rem the symlinks for cmake modules don't work here +del cmake_modules\BuildUtils.cmake +del cmake_modules\SetupCxxFlags.cmake +del cmake_modules\CompilerInfo.cmake +del cmake_modules\FindNumPy.cmake +del cmake_modules\FindPythonLibsNew.cmake +copy /Y "%SRC_DIR%\cpp\cmake_modules\BuildUtils.cmake" cmake_modules\ +copy /Y "%SRC_DIR%\cpp\cmake_modules\SetupCxxFlags.cmake" cmake_modules\ +copy /Y "%SRC_DIR%\cpp\cmake_modules\CompilerInfo.cmake" cmake_modules\ +copy /Y "%SRC_DIR%\cpp\cmake_modules\FindNumPy.cmake" cmake_modules\ +copy /Y "%SRC_DIR%\cpp\cmake_modules\FindPythonLibsNew.cmake" cmake_modules\ + +SET ARROW_HOME=%LIBRARY_PREFIX% +"%PYTHON%" setup.py ^ + build_ext --build-type=release --with-parquet ^ + install --single-version-externally-managed --record=record.txt +if errorlevel 1 exit 1 +popd diff --git a/cd/conda-recipes/pyarrow/build.sh b/cd/conda-recipes/pyarrow/build.sh new file mode 100644 index 000000000000..b6bfba6a41c7 --- /dev/null +++ b/cd/conda-recipes/pyarrow/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e +set -x + +# Build dependencies +export ARROW_HOME=$PREFIX +export PARQUET_HOME=$PREFIX + + +cd python +$PYTHON setup.py \ + build_ext --build-type=release --with-parquet --with-plasma --with-orc \ + install --single-version-externally-managed --record=record.txt diff --git a/cd/conda-recipes/pyarrow/meta.yaml b/cd/conda-recipes/pyarrow/meta.yaml new file mode 100644 index 000000000000..ca9ed848a399 --- /dev/null +++ b/cd/conda-recipes/pyarrow/meta.yaml @@ -0,0 +1,65 @@ +{% set version = "0.9.0" %} +{% set commit = "c695a5ddc8d26c977b5ecd0c55212e900726953e" %} +{% set checksum = "d4cb93d0f63da1ce48f08af05c63cdec82194078221f7f4c5696cb84776f60db" %} + +package: + name: pyarrow + version: {{ version }} + +source: + fn: {{ commit }}.tar.gz + url: https://github.com/apache/arrow/archive/{{ commit }}.tar.gz + sha256: {{ checksum }} + +build: + number: 1 + skip: true # [win32] + skip: true # [win and py<35] + features: + - vc14 # [win and py>=35] + +requirements: + build: + - python + - toolchain + - setuptools + - setuptools_scm + - cython + - cmake + - numpy 1.10.* # [not (win and py>=36)] + - numpy 1.12.* # [win and py>=36] + - six + - arrow-cpp 0.9.0 + - parquet-cpp 1.4.0 + + run: + - python + - setuptools + - numpy >=1.10 # [not (win and py>=36)] + - numpy >=1.12 # [win and py>=36] + - pandas + - six + - arrow-cpp 0.9.0 + - parquet-cpp 1.4.0 + - futures # [py27] + +test: + imports: + - pyarrow + - pyarrow.parquet + - pyarrow.plasma # [unix] + +about: + home: https://github.com/apache/arrow + license: Apache 2.0 + summary: 'Python libraries for Apache Arrow' + +extra: + recipe-maintainers: + - wesm + - xhochy + - jreback + - cpcloud + - pcmoritz + - robertnishihara + - siddharthteotia diff --git a/cd/osx-wheel/config.sh b/cd/python-wheels/osx-build.sh similarity index 100% rename from cd/osx-wheel/config.sh rename to cd/python-wheels/osx-build.sh diff --git a/cd/win-wheel/python-wheels-windows.bat b/cd/python-wheels/win-build.bat similarity index 100% rename from cd/win-wheel/python-wheels-windows.bat rename to cd/python-wheels/win-build.bat diff --git a/cd/travis-osx-wheel.yml b/cd/travis-osx-wheel.yml index 7b18999c378b..c531b2c7cb32 100644 --- a/cd/travis-osx-wheel.yml +++ b/cd/travis-osx-wheel.yml @@ -38,7 +38,7 @@ before_install: - brew upgrade cmake - brew install bison flex - - export CONFIG_PATH=`pwd`/arrow/cd/osx-wheel/config.sh + - export CONFIG_PATH=`pwd`/arrow/cd/python-wheels/osx-build.sh - source multibuild/common_utils.sh - source multibuild/travis_osx_steps.sh From 6d471748ee9f9edffb727b043c4de28276ec79ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 7 Apr 2018 15:32:04 +0200 Subject: [PATCH 16/60] first attempt to build conda recipes on appveyor --- cd/appveyor-win-conda.yml | 34 ++++++++++++++++++++++++---- cd/conda-recipes/arrow-cpp/meta.yaml | 11 ++------- cd/conda-recipes/deploy.py | 0 cd/conda-recipes/pyarrow/meta.yaml | 12 +++------- 4 files changed, 35 insertions(+), 22 deletions(-) create mode 100644 cd/conda-recipes/deploy.py diff --git a/cd/appveyor-win-conda.yml b/cd/appveyor-win-conda.yml index c9f92fd4c41e..748f954a03bc 100644 --- a/cd/appveyor-win-conda.yml +++ b/cd/appveyor-win-conda.yml @@ -1,5 +1,31 @@ -os: Visual Studio 2015 +environment: + matrix: + - TARGET_ARCH: x64 + CONDA_PY: 35 + CONDA_INSTALL_LOCN: C:\\Miniconda35-x64 + + - TARGET_ARCH: x64 + CONDA_PY: 36 + CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 + +install: + - cmd: rmdir C:\cygwin /s /q + # Add path, activate `conda` and update conda. + - cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat + - cmd: conda.exe update --yes --quiet conda + - cmd: set PYTHONUNBUFFERED=1 + # Add our channels. + - cmd: conda.exe config --set show_channel_urls true + - cmd: conda.exe config --remove channels defaults + - cmd: conda.exe config --add channels defaults + - cmd: conda.exe config --add channels conda-forge + # Configure the VM. + - cmd: conda.exe install -n root --quiet --yes conda-forge-build-setup + - cmd: run_conda_forge_build_setup + +# Skip .NET project specific build phase. +build: off + +test_script: + - conda.exe build conda-recipes/arrow-cpp conda-recipes/pyarrow -build_script: - - git clone https://github.com/apache/arrow - - cmd: "echo Hello, world!" diff --git a/cd/conda-recipes/arrow-cpp/meta.yaml b/cd/conda-recipes/arrow-cpp/meta.yaml index 93daba404c94..6263d957a2ed 100644 --- a/cd/conda-recipes/arrow-cpp/meta.yaml +++ b/cd/conda-recipes/arrow-cpp/meta.yaml @@ -1,16 +1,9 @@ -{% set version = "0.9.0" %} -{% set commit = "f9f8320339692d4134d1ef42c32cb7c8d547593e" %} -{% set checksum = "6fa549d8aa01e457ae6b9962179caec3df9153659d5b3ff82449719d48517dc9" %} - package: name: arrow-cpp - version: {{ version }} - + version: '0.9.0' # this should be read from an env variable source: - fn: {{ commit }}.tar.gz - url: https://github.com/apache/arrow/archive/{{ commit }}.tar.gz - sha256: {{ checksum }} + path: ../../../ build: number: 6 diff --git a/cd/conda-recipes/deploy.py b/cd/conda-recipes/deploy.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/cd/conda-recipes/pyarrow/meta.yaml b/cd/conda-recipes/pyarrow/meta.yaml index ca9ed848a399..6a7ba5fa1ef0 100644 --- a/cd/conda-recipes/pyarrow/meta.yaml +++ b/cd/conda-recipes/pyarrow/meta.yaml @@ -1,15 +1,9 @@ -{% set version = "0.9.0" %} -{% set commit = "c695a5ddc8d26c977b5ecd0c55212e900726953e" %} -{% set checksum = "d4cb93d0f63da1ce48f08af05c63cdec82194078221f7f4c5696cb84776f60db" %} - package: - name: pyarrow - version: {{ version }} + name: arrow-cpp + version: '0.9.0' # this should be read from an env variable source: - fn: {{ commit }}.tar.gz - url: https://github.com/apache/arrow/archive/{{ commit }}.tar.gz - sha256: {{ checksum }} + path: ../../../ build: number: 1 From 5eaf55a746f890f81e3320d492d2bbe650700db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 7 Apr 2018 15:35:52 +0200 Subject: [PATCH 17/60] update appveyor script for win-conda --- cd/appveyor-win-conda.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cd/appveyor-win-conda.yml b/cd/appveyor-win-conda.yml index 748f954a03bc..01331b4962cb 100644 --- a/cd/appveyor-win-conda.yml +++ b/cd/appveyor-win-conda.yml @@ -3,10 +3,10 @@ environment: - TARGET_ARCH: x64 CONDA_PY: 35 CONDA_INSTALL_LOCN: C:\\Miniconda35-x64 - - TARGET_ARCH: x64 CONDA_PY: 36 CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 + ARROW_SRC: C:\apache-arrow install: - cmd: rmdir C:\cygwin /s /q @@ -27,5 +27,7 @@ install: build: off test_script: - - conda.exe build conda-recipes/arrow-cpp conda-recipes/pyarrow + - git clone -b {ARROW_BRANCH} {ARROW_REPO} %ARROW_SRC% || exit /B + - pushd %ARROW_SRC%\cd\conda-recipes + - conda.exe build arrow-cpp pyarrow From aaaae6ddc641851aa4bf9a63b250c1fc0d22e13c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 7 Apr 2018 15:45:31 +0200 Subject: [PATCH 18/60] osx conda template --- cd/travis-osx-conda.yml | 49 ++++++++++++++++++++++++++++++++++++----- cd/travis-osx-wheel.yml | 4 ++-- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/cd/travis-osx-conda.yml b/cd/travis-osx-conda.yml index f4ff64d3d796..d5a12d137690 100644 --- a/cd/travis-osx-conda.yml +++ b/cd/travis-osx-conda.yml @@ -1,8 +1,47 @@ +language: generic + os: osx -sudo: required -language: objective-c +osx_image: xcode6.4 -script: - - git clone https://github.com/apache/arrow - - echo "Hello, World" +env: + matrix: + - CONDA_PY=27 + - CONDA_PY=35 + - CONDA_PY=36 + +before_install: + # Remove homebrew. + - | + echo "" + echo "Removing homebrew from Travis CI to avoid conflicts." + curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew + chmod +x ~/uninstall_homebrew + ~/uninstall_homebrew -fq + rm ~/uninstall_homebrew +install: + # Install Miniconda. + - | + echo "" + echo "Installing a fresh version of Miniconda." + MINICONDA_URL="https://repo.continuum.io/miniconda" + MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh" + curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}" + bash $MINICONDA_FILE -b + + # Configure conda. + - | + echo "" + echo "Configuring conda." + source /Users/travis/miniconda3/bin/activate root + conda config --remove channels defaults + conda config --add channels defaults + conda config --add channels conda-forge + conda config --set show_channel_urls true + conda install --yes --quiet conda-forge-build-setup + source run_conda_forge_build_setup + +script: + - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow + - pushd arrow/cd/conda-recipes + - conda build arrow-cpp pyarrow diff --git a/cd/travis-osx-wheel.yml b/cd/travis-osx-wheel.yml index c531b2c7cb32..ba3e91a96690 100644 --- a/cd/travis-osx-wheel.yml +++ b/cd/travis-osx-wheel.yml @@ -29,8 +29,8 @@ matrix: - PANDAS_DEP="0.20.3" before_install: - - git clone https://github.com/matthew-brett/multibuild - - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow # TODO pin it + - git clone https://github.com/matthew-brett/multibuild # TODO pin it + - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow # Also remove artifacts that depend on Boost - brew uninstall boost cgal postgis sfcgal From fdac3fda901b87adddf1233fd8ca4db6ceec983c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 7 Apr 2018 15:57:06 +0200 Subject: [PATCH 19/60] use jinja variables --- cd/appveyor-win-conda.yml | 2 +- cd/appveyor-win-wheel.yml | 3 ++- cd/travis-linux-packages.yml | 8 ++++---- cd/travis-linux-wheel.yml | 8 ++++---- cd/travis-osx-conda.yml | 2 +- cd/travis-osx-wheel.yml | 8 ++++---- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/cd/appveyor-win-conda.yml b/cd/appveyor-win-conda.yml index 01331b4962cb..2b4d8c3a5e58 100644 --- a/cd/appveyor-win-conda.yml +++ b/cd/appveyor-win-conda.yml @@ -27,7 +27,7 @@ install: build: off test_script: - - git clone -b {ARROW_BRANCH} {ARROW_REPO} %ARROW_SRC% || exit /B + - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} %ARROW_SRC% || exit /B - pushd %ARROW_SRC%\cd\conda-recipes - conda.exe build arrow-cpp pyarrow diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index 14ddda48e608..5912d4361695 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -22,9 +22,10 @@ init: - set MINICONDA=C:\Miniconda35-x64 - set PATH=%MINICONDA%;%MINICONDA%/Scripts;%MINICONDA%/Library/bin;%PATH% + build_script: - mkdir wheels - - git clone -b {ARROW_BRANCH} {ARROW_REPO} %ARROW_SRC% || exit /B + - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} %ARROW_SRC% || exit /B - call %ARROW_SRC%\cd\python-wheels\win-build.bat after_build: diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index ec881f41cf2f..01f298531e09 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -6,14 +6,14 @@ python: 3.5 env: global: - - PLAT={PLAT} - - BUILD_REF={BUILD_REF} - - PYARROW_VERSION={PYARROW_VERSION} + - PLAT={{ PLAT }} + - BUILD_REF={{ BUILD_REF }} + - PYARROW_VERSION={{ PYARROW_VERSION }} install: - sudo apt-get update -y && sudo apt-get install -y build-essential libboost-dev script: - - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow + - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - (cd arrow/cd/linux-packages && rake yum:build PARALLEL=yes DEBUG=no) #- (cd arrow/cd/linux-packages && travis_wait 40 rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no) diff --git a/cd/travis-linux-wheel.yml b/cd/travis-linux-wheel.yml index ff69faf88cac..f08230f49c77 100644 --- a/cd/travis-linux-wheel.yml +++ b/cd/travis-linux-wheel.yml @@ -1,8 +1,8 @@ env: global: - - PLAT={PLAT} - - BUILD_REF={BUILD_REF} - - PYARROW_VERSION={PYARROW_VERSION} + - PLAT={{ PLAT }} + - BUILD_REF={{ BUILD_REF }} + - PYARROW_VERSION={{ PYARROW_VERSION }} os: linux dist: trusty @@ -16,7 +16,7 @@ before_script: before_install: install: script: - - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow + - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - mkdir -p dist - pushd arrow/python/manylinux1 diff --git a/cd/travis-osx-conda.yml b/cd/travis-osx-conda.yml index d5a12d137690..fb4550325189 100644 --- a/cd/travis-osx-conda.yml +++ b/cd/travis-osx-conda.yml @@ -42,6 +42,6 @@ install: source run_conda_forge_build_setup script: - - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow + - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - pushd arrow/cd/conda-recipes - conda build arrow-cpp pyarrow diff --git a/cd/travis-osx-wheel.yml b/cd/travis-osx-wheel.yml index ba3e91a96690..c25fd52b40ef 100644 --- a/cd/travis-osx-wheel.yml +++ b/cd/travis-osx-wheel.yml @@ -4,9 +4,9 @@ language: objective-c env: global: - - PLAT={PLAT} - - BUILD_REF={BUILD_REF} - - PYARROW_VERSION={PYARROW_VERSION} + - PLAT={{ PLAT }} + - BUILD_REF={{ BUILD_REF }} + - PYARROW_VERSION={{ PYARROW_VERSION }} matrix: exclude: @@ -30,7 +30,7 @@ matrix: before_install: - git clone https://github.com/matthew-brett/multibuild # TODO pin it - - git clone -b {ARROW_BRANCH} {ARROW_REPO} arrow + - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow # Also remove artifacts that depend on Boost - brew uninstall boost cgal postgis sfcgal From 35f73509e2a19cb6216cf651aebc4120f786edfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 7 Apr 2018 16:19:44 +0200 Subject: [PATCH 20/60] travis conda template --- cd/appveyor-win-wheel.yml | 4 ++-- cd/conda-recipes/deploy.py | 0 cd/travis-linux-conda.yml | 40 +++++++++++++++++++++++++++++++++----- 3 files changed, 37 insertions(+), 7 deletions(-) delete mode 100644 cd/conda-recipes/deploy.py diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index 5912d4361695..8442d1c043c8 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -13,8 +13,8 @@ environment: MSVC_DEFAULT_OPTIONS: ON BOOST_ROOT: C:\Libraries\boost_1_63_0 BOOST_LIBRARYDIR: C:\Libraries\boost_1_63_0\lib64-msvc-14.0 - pyarrow_version: {PYARROW_VERSION} - pyarrow_ref: {BUILD_REF} + pyarrow_version: {{ PYARROW_VERSION }} + pyarrow_ref: {{ BUILD_REF }} parquet_cpp_ref: apache-parquet-cpp-1.4.0 ARROW_SRC: C:\apache-arrow diff --git a/cd/conda-recipes/deploy.py b/cd/conda-recipes/deploy.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/cd/travis-linux-conda.yml b/cd/travis-linux-conda.yml index 968ed799721d..ae9f9a2a0675 100644 --- a/cd/travis-linux-conda.yml +++ b/cd/travis-linux-conda.yml @@ -1,8 +1,38 @@ -language: python -python: 3.5 -sudo: required +language: generic + +os: linux dist: trusty +env: + matrix: + - CONDA_PY=27 + - CONDA_PY=35 + - CONDA_PY=36 + +install: + # Install Miniconda. + - | + echo "" + echo "Installing a fresh version of Miniconda." + MINICONDA_URL="https://repo.continuum.io/miniconda" + MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh" + curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}" + bash $MINICONDA_FILE -b + + # Configure conda. + - | + echo "" + echo "Configuring conda." + source /Users/travis/miniconda3/bin/activate root + conda config --remove channels defaults + conda config --add channels defaults + conda config --add channels conda-forge + conda config --set show_channel_urls true + conda install --yes --quiet conda-forge-build-setup + source run_conda_forge_build_setup + script: - - git clone https://github.com/apache/arrow - - echo "Hello, World" + - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow + - pushd arrow/cd/conda-recipes + - conda build arrow-cpp pyarrow + From 8405cbf730696e5bf79e4bb26a74dd3cc3f81a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 7 Apr 2018 16:33:31 +0200 Subject: [PATCH 21/60] linux config for conda recipes --- cd/conda-recipes/arrow-cpp/meta.yaml | 2 +- cd/conda-recipes/pyarrow/meta.yaml | 2 +- cd/travis-linux-conda.yml | 10 +++++++--- cd/travis-osx-conda.yml | 6 ++++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cd/conda-recipes/arrow-cpp/meta.yaml b/cd/conda-recipes/arrow-cpp/meta.yaml index 6263d957a2ed..0b643b5c8f32 100644 --- a/cd/conda-recipes/arrow-cpp/meta.yaml +++ b/cd/conda-recipes/arrow-cpp/meta.yaml @@ -3,7 +3,7 @@ package: version: '0.9.0' # this should be read from an env variable source: - path: ../../../ + path: arrow build: number: 6 diff --git a/cd/conda-recipes/pyarrow/meta.yaml b/cd/conda-recipes/pyarrow/meta.yaml index 6a7ba5fa1ef0..1fb22e695a6f 100644 --- a/cd/conda-recipes/pyarrow/meta.yaml +++ b/cd/conda-recipes/pyarrow/meta.yaml @@ -3,7 +3,7 @@ package: version: '0.9.0' # this should be read from an env variable source: - path: ../../../ + path: arrow build: number: 1 diff --git a/cd/travis-linux-conda.yml b/cd/travis-linux-conda.yml index ae9f9a2a0675..674fe0417d70 100644 --- a/cd/travis-linux-conda.yml +++ b/cd/travis-linux-conda.yml @@ -11,11 +11,12 @@ env: install: # Install Miniconda. + - echo `pwd` - | echo "" echo "Installing a fresh version of Miniconda." MINICONDA_URL="https://repo.continuum.io/miniconda" - MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh" + MINICONDA_FILE="Miniconda3-latest-Linux-x86_64.sh" curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}" bash $MINICONDA_FILE -b @@ -23,7 +24,7 @@ install: - | echo "" echo "Configuring conda." - source /Users/travis/miniconda3/bin/activate root + source /home/travis/miniconda3/bin/activate root conda config --remove channels defaults conda config --add channels defaults conda config --add channels conda-forge @@ -33,6 +34,9 @@ install: script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - - pushd arrow/cd/conda-recipes + + # move out recipes to not depend on itself + - mv arrow/cd/conda-recipes ./ + - pushd conda-recipes - conda build arrow-cpp pyarrow diff --git a/cd/travis-osx-conda.yml b/cd/travis-osx-conda.yml index fb4550325189..24c19fa6a925 100644 --- a/cd/travis-osx-conda.yml +++ b/cd/travis-osx-conda.yml @@ -43,5 +43,7 @@ install: script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - - pushd arrow/cd/conda-recipes - - conda build arrow-cpp pyarrow + + # move out recipes to not depend on itself + - mv arrow/cd/conda-recipes ./ + - conda build conda-recipes/arrow-cpp conda-recipes/pyarrow From 4b5f642ca0b9ef92558d88fd015e9949dc302905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 7 Apr 2018 16:44:44 +0200 Subject: [PATCH 22/60] fallback to previouse conda paths --- cd/travis-linux-conda.yml | 5 +---- cd/travis-osx-conda.yml | 6 ++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/cd/travis-linux-conda.yml b/cd/travis-linux-conda.yml index 674fe0417d70..f59e4cc83553 100644 --- a/cd/travis-linux-conda.yml +++ b/cd/travis-linux-conda.yml @@ -34,9 +34,6 @@ install: script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - - # move out recipes to not depend on itself - - mv arrow/cd/conda-recipes ./ - - pushd conda-recipes + - pushd arrow/cd/conda-recipes - conda build arrow-cpp pyarrow diff --git a/cd/travis-osx-conda.yml b/cd/travis-osx-conda.yml index 24c19fa6a925..fb4550325189 100644 --- a/cd/travis-osx-conda.yml +++ b/cd/travis-osx-conda.yml @@ -43,7 +43,5 @@ install: script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - - # move out recipes to not depend on itself - - mv arrow/cd/conda-recipes ./ - - conda build conda-recipes/arrow-cpp conda-recipes/pyarrow + - pushd arrow/cd/conda-recipes + - conda build arrow-cpp pyarrow From fa733458da795205421c59a9e38b2dafe782ab74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 7 Apr 2018 19:00:52 +0200 Subject: [PATCH 23/60] fallback to previous arrow path --- cd/conda-recipes/arrow-cpp/meta.yaml | 2 +- cd/conda-recipes/pyarrow/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cd/conda-recipes/arrow-cpp/meta.yaml b/cd/conda-recipes/arrow-cpp/meta.yaml index 0b643b5c8f32..6263d957a2ed 100644 --- a/cd/conda-recipes/arrow-cpp/meta.yaml +++ b/cd/conda-recipes/arrow-cpp/meta.yaml @@ -3,7 +3,7 @@ package: version: '0.9.0' # this should be read from an env variable source: - path: arrow + path: ../../../ build: number: 6 diff --git a/cd/conda-recipes/pyarrow/meta.yaml b/cd/conda-recipes/pyarrow/meta.yaml index 1fb22e695a6f..6a7ba5fa1ef0 100644 --- a/cd/conda-recipes/pyarrow/meta.yaml +++ b/cd/conda-recipes/pyarrow/meta.yaml @@ -3,7 +3,7 @@ package: version: '0.9.0' # this should be read from an env variable source: - path: arrow + path: ../../../ build: number: 1 From 5b73f35a4f4bce8665f1f9cc14a690b7a6843b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 7 Apr 2018 21:00:49 +0200 Subject: [PATCH 24/60] fix package name --- cd/conda-recipes/pyarrow/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cd/conda-recipes/pyarrow/meta.yaml b/cd/conda-recipes/pyarrow/meta.yaml index 6a7ba5fa1ef0..b579ca6e25a8 100644 --- a/cd/conda-recipes/pyarrow/meta.yaml +++ b/cd/conda-recipes/pyarrow/meta.yaml @@ -1,5 +1,5 @@ package: - name: arrow-cpp + name: pyarrow version: '0.9.0' # this should be read from an env variable source: From 570017df7b76244f5ec03c103e569f76f8006115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sun, 8 Apr 2018 17:16:32 +0200 Subject: [PATCH 25/60] build notifications --- cd/appveyor-win-conda.yml | 5 +++++ cd/appveyor-win-wheel.yml | 5 +++++ cd/travis-linux-conda.yml | 3 +++ cd/travis-linux-packages.yml | 4 ++++ cd/travis-linux-wheel.yml | 9 ++++++--- cd/travis-osx-conda.yml | 4 ++++ cd/travis-osx-wheel.yml | 4 ++++ 7 files changed, 31 insertions(+), 3 deletions(-) diff --git a/cd/appveyor-win-conda.yml b/cd/appveyor-win-conda.yml index 2b4d8c3a5e58..e8e38de599d7 100644 --- a/cd/appveyor-win-conda.yml +++ b/cd/appveyor-win-conda.yml @@ -31,3 +31,8 @@ test_script: - pushd %ARROW_SRC%\cd\conda-recipes - conda.exe build arrow-cpp pyarrow + +notifications: + - provider: Email + to: + - {{ EMAIL }} diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index 8442d1c043c8..25ee53dc8be9 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -33,3 +33,8 @@ after_build: artifacts: - path: wheels\*.whl + +notifications: + - provider: Email + to: + - {{ EMAIL }} diff --git a/cd/travis-linux-conda.yml b/cd/travis-linux-conda.yml index f59e4cc83553..6467722b912e 100644 --- a/cd/travis-linux-conda.yml +++ b/cd/travis-linux-conda.yml @@ -37,3 +37,6 @@ script: - pushd arrow/cd/conda-recipes - conda build arrow-cpp pyarrow +notifications: + email: + - {{ EMAIL }} diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index 01f298531e09..28766ca6247f 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -17,3 +17,7 @@ script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - (cd arrow/cd/linux-packages && rake yum:build PARALLEL=yes DEBUG=no) #- (cd arrow/cd/linux-packages && travis_wait 40 rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no) + +notifications: + email: + - {{ EMAIL }} diff --git a/cd/travis-linux-wheel.yml b/cd/travis-linux-wheel.yml index f08230f49c77..864f9bfa11ef 100644 --- a/cd/travis-linux-wheel.yml +++ b/cd/travis-linux-wheel.yml @@ -8,13 +8,12 @@ os: linux dist: trusty sudo: required language: cpp - services: - docker + before_script: - docker pull quay.io/xhochy/arrow_manylinux1_x86_64_base:latest -before_install: -install: + script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - mkdir -p dist @@ -28,3 +27,7 @@ script: - popd - sudo mv arrow/python/manylinux1/dist/* dist/ + +notifications: + email: + - {{ EMAIL }} diff --git a/cd/travis-osx-conda.yml b/cd/travis-osx-conda.yml index fb4550325189..0c42b0ae7b38 100644 --- a/cd/travis-osx-conda.yml +++ b/cd/travis-osx-conda.yml @@ -45,3 +45,7 @@ script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - pushd arrow/cd/conda-recipes - conda build arrow-cpp pyarrow + +notifications: + email: + - {{ EMAIL }} diff --git a/cd/travis-osx-wheel.yml b/cd/travis-osx-wheel.yml index c25fd52b40ef..7bc484a442f5 100644 --- a/cd/travis-osx-wheel.yml +++ b/cd/travis-osx-wheel.yml @@ -60,3 +60,7 @@ script: after_success: - echo "After success" - pwd + +notifications: + email: + - {{ EMAIL }} From e1a62ab50be0d8af691838a8cb7723b7c84ec77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sun, 8 Apr 2018 18:58:52 +0200 Subject: [PATCH 26/60] cleanup of the packaging script --- cd/crossbow.py | 194 ++++++++++++++++++++++++++++--------------------- 1 file changed, 110 insertions(+), 84 deletions(-) diff --git a/cd/crossbow.py b/cd/crossbow.py index 55b07c45ba5d..ab8be83aac74 100644 --- a/cd/crossbow.py +++ b/cd/crossbow.py @@ -4,136 +4,162 @@ # TODO: probably should turn off auto cancellation feature of travis # TODO: dry-run / render feature -# we might weaken the dependencies later, but a release manager probably -# can have these installed import re import sys import pygit2 -from pygit2 import Signature, Repository, UserPass, RemoteCallbacks from pathlib import Path +from datetime import datetime +from jinja2 import FileSystemLoader, Environment +from pygit2 import Signature, Repository, UserPass, RemoteCallbacks -if len(sys.argv) > 1: - pattern = sys.argv[1] -else: - pattern = False -ARROW_REPO = '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/kszucs/arrow' -ARROW_BRANCH = 'cd' +CWD = Path(__file__).parent -PLAT = 'x86_64' -# by default we should query the current build ref -# BUILD_REF = '7b2c79765cf92760e1f8cca079159d9613b86412' -arrow_path = Path(__file__).absolute().parents[1] -print(arrow_path) +def get_sha_version(): + arrow_path = Path(__file__).absolute().parents[1] + repo = Repository(str(arrow_path)) -arrow_repo = Repository(str(arrow_path)) + sha = repo.head.target + version = '0.9.0' # TODO -BUILD_REF = arrow_repo.head.target + return sha, version -PYARROW_VERSION = '0.9.0' +def read_templates(pattern=None): + for template in CWD.glob('*.yml'): + if pattern is None or re.search(pattern, template.stem): + yield template -# we should handle this later -signature = Signature('John Doe', 'jdoe@example.com', 12346, 0) -author = committer = signature -message = 'disco!' +def render_template(path, params): + env = Environment(loader=FileSystemLoader(str(path.parent))) + template = env.get_template(path.name) + return template.render(**params) -# --remote arg when it will clone otherwise locally -repo = Repository('/Users/krisz/Workspace/crossbow') +def create_commit(repo, branch_name, filename, content): + master = repo.branches['master'] + master_head = repo[master.target] + try: + branch = repo.branches[branch_name] + except KeyError: + branch = repo.branches.create(branch_name, master_head) -master = repo.branches['master'] -head = repo[master.target] + # creating the tree we are going to push based on master's tree + builder = repo.TreeBuilder(master_head.tree) + # insert the file and creating the new filetree + blob_id = repo.create_blob(content) + blob = repo[blob_id] -remote = repo.remotes['origin'] -refspecs = [] + builder.insert(filename, blob_id, pygit2.GIT_FILEMODE_BLOB) + tree_id = builder.write() -# create the build variants based on the arguments + # creating the new commit + timestamp = int((datetime.now() - datetime(1970, 1, 1)).total_seconds()) + name = next(repo.config.get_multivar('user.name')) + email = next(repo.config.get_multivar('user.email')) + message = 'disco!' -# iterate over the variants -cwd = Path(__file__).parent + author = Signature('Crossbow', 'mailing@list.com', timestamp) + committer = Signature(name, email, timestamp) + reference = 'refs/heads/{}'.format(branch_name) + commit_id = repo.create_commit(reference, author, committer, message, + tree_id, [branch.target]) -for config in cwd.glob('*.yml'): - branch_name = config.stem + return repo[commit_id] - if pattern and not re.search(pattern, branch_name): - continue - reference = 'refs/heads/{}'.format(branch_name) - refspecs.append(reference) +class GitRemoteCallbacks(pygit2.RemoteCallbacks): + def __init__(self): + self.attempts = 0 + super(GitRemoteCallbacks, self).__init__() - if branch_name in repo.branches: - # choose the appropiate branch - branch = repo.branches[branch_name] - else: - # otherwise we initialize it - branch = repo.branches.create(branch_name, head) + def push_update_reference(self, refname, message): + print(refname, message) - # # do the actual checkout - # repo.checkout(branch) + def update_tips(self, refname, old, new): + print(refname, old, new) - # creating the tree we are going to push - builder = repo.TreeBuilder(head.tree) + def credentials(self, url, username_from_url, allowed_types): + # its a libgit2 bug, that it infinitly retries the authentication + self.attempts += 1 - print('creating blob') + if self.attempts >= 5: + # pygit2 doesn't propagate the exception properly + msg = 'Wrong oauth personal access token' + print(msg) + raise ValueError(msg) - # creating the file inside git object db - content = config.read_text() + if allowed_types & pygit2.credentials.GIT_CREDTYPE_USERPASS_PLAINTEXT: + return UserPass(token, 'x-oauth-basic') + else: + return None - # FANCY templating - content = content.format( - ARROW_REPO=ARROW_REPO, - ARROW_BRANCH=ARROW_BRANCH, - PLAT=PLAT, - BUILD_REF=BUILD_REF, - PYARROW_VERSION=PYARROW_VERSION - ) - blob_id = repo.create_blob(content) - blob = repo[blob_id] +def push_branches(repo, branches, token): + callbacks = GitRemoteCallbacks() - if 'travis' in str(config): - target = '.travis.yml' - elif 'appveyor' in str(config): - target = 'appveyor.yml' - else: - ValueError('raise sommething') + remote = repo.remotes['origin'] + refs = ['refs/heads/{}'.format(branch) for branch in branches] + return remote.push(refs, callbacks=callbacks) - print('adding file {}'.format(target)) - builder.insert(target, blob_id, pygit2.GIT_FILEMODE_BLOB) - tree_id = builder.write() +ARROW_REPO = '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/kszucs/arrow' +ARROW_BRANCH = 'cd' +EMAIL = 'szucs.krisztian@gmail.com' +PLAT = 'x86_64' +BUILD_REF, PYARROW_VERSION = get_sha_version() - commit_id = repo.create_commit(reference, author, committer, message, tree_id, - [branch.target]) - commit = repo[commit_id] - print(commit) +if len(sys.argv) > 1: + pattern = sys.argv[1] +else: + pattern = None -def acquire_credentials_cb(url, username_from_url, allowed_types): - print('credentials', url, username_from_url, allowed_types) - # its a libgit2 bug, that it infinitly retries the authentication - token = 'b713b374ac028e9f1579b5facca6c175f0dd02b5' - return UserPass(token, 'x-oauth-basic') +dry_run = False +for arg in sys.argv: + if arg == '--dry-run': + dry_run = True -class GitRemoteCallbacks(pygit2.RemoteCallbacks): +repo = Repository('/Users/krisz/Workspace/crossbow') +branches = [] +for path in read_templates(pattern): + # TODO create the build variants based on the arguments + branch_name = path.stem + branches.append(branch_name) - def push_update_reference(self, refname, message): - print(refname, message) + params = dict( + ARROW_REPO=ARROW_REPO, + ARROW_BRANCH=ARROW_BRANCH, + PLAT=PLAT, + BUILD_REF=BUILD_REF, + PYARROW_VERSION=PYARROW_VERSION, + EMAIL=EMAIL + ) + content = render_template(path, params) - def update_tips(self, refname, old, new): - print(refname, old, new) + if branch_name.startswith('travis'): + filename = '.travis.yml' + elif branch_name.startswith('appveyor'): + filename = 'appveyor.yml' + else: + ValueError('raise something') + + if dry_run: + print(content) + else: + create_commit(repo, branch_name, filename, content) -callbacks = GitRemoteCallbacks(credentials=acquire_credentials_cb) +token = '' -remote.push(refspecs, callbacks=callbacks) +if not dry_run: + push_branches(repo, branches, token=token) From 27e2b88858d8d94f2f00a2faed947d84c5ad7cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Mon, 9 Apr 2018 11:48:55 +0200 Subject: [PATCH 27/60] travis dependencies for linux packages --- cd/travis-linux-packages.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index 28766ca6247f..85e1c1ab5238 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -11,7 +11,27 @@ env: - PYARROW_VERSION={{ PYARROW_VERSION }} install: - - sudo apt-get update -y && sudo apt-get install -y build-essential libboost-dev + - sed -i'' -e 's/main$/main contrib non-free/g' /etc/apt/sources.list + - apt update -y + - apt install -y \ + autoconf-archive \ + build-essential \ + cmake \ + debhelper\ + devscripts \ + git \ + gtk-doc-tools \ + libboost-filesystem-dev \ + libboost-regex-dev \ + libboost-system-dev \ + libgirepository1.0-dev \ + libglib2.0-doc \ + libjemalloc-dev \ + lsb-release \ + nvidia-cuda-toolkit \ + pkg-config \ + python3-dev \ + python3-numpy script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow From 62cfd421df842f70186e99ab29ce0924ca0ffe19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Mon, 9 Apr 2018 21:34:29 +0200 Subject: [PATCH 28/60] add arguments and cleanup --- cd/crossbow.py | 145 ++++++++++++++++++++++++++++--------------------- 1 file changed, 82 insertions(+), 63 deletions(-) diff --git a/cd/crossbow.py b/cd/crossbow.py index ab8be83aac74..0673d2da425e 100644 --- a/cd/crossbow.py +++ b/cd/crossbow.py @@ -6,28 +6,20 @@ import re import sys +import click import pygit2 +# later we can remove these dependencies if required from pathlib import Path from datetime import datetime from jinja2 import FileSystemLoader, Environment -from pygit2 import Signature, Repository, UserPass, RemoteCallbacks +from setuptools_scm import get_version CWD = Path(__file__).parent -def get_sha_version(): - arrow_path = Path(__file__).absolute().parents[1] - repo = Repository(str(arrow_path)) - - sha = repo.head.target - version = '0.9.0' # TODO - - return sha, version - - -def read_templates(pattern=None): +def list_templates(pattern): for template in CWD.glob('*.yml'): if pattern is None or re.search(pattern, template.stem): yield template @@ -42,6 +34,7 @@ def render_template(path, params): def create_commit(repo, branch_name, filename, content): master = repo.branches['master'] master_head = repo[master.target] + try: branch = repo.branches[branch_name] except KeyError: @@ -63,19 +56,20 @@ def create_commit(repo, branch_name, filename, content): email = next(repo.config.get_multivar('user.email')) message = 'disco!' - author = Signature('Crossbow', 'mailing@list.com', timestamp) - committer = Signature(name, email, timestamp) + author = pygit2.Signature('Crossbow', 'mailing@list.com', timestamp) + committer = pygit2.Signature(name, email, timestamp) reference = 'refs/heads/{}'.format(branch_name) commit_id = repo.create_commit(reference, author, committer, message, tree_id, [branch.target]) - return repo[commit_id] + return branch class GitRemoteCallbacks(pygit2.RemoteCallbacks): - def __init__(self): + def __init__(self, token): + self.token = token self.attempts = 0 super(GitRemoteCallbacks, self).__init__() @@ -96,70 +90,95 @@ def credentials(self, url, username_from_url, allowed_types): raise ValueError(msg) if allowed_types & pygit2.credentials.GIT_CREDTYPE_USERPASS_PLAINTEXT: - return UserPass(token, 'x-oauth-basic') + return pygit2.UserPass(self.token, 'x-oauth-basic') else: return None def push_branches(repo, branches, token): - callbacks = GitRemoteCallbacks() + callbacks = GitRemoteCallbacks(token) remote = repo.remotes['origin'] - refs = ['refs/heads/{}'.format(branch) for branch in branches] + refs = [branch.name for branch in branches] + return remote.push(refs, callbacks=callbacks) -ARROW_REPO = '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/kszucs/arrow' -ARROW_BRANCH = 'cd' +# this should be the mailing list EMAIL = 'szucs.krisztian@gmail.com' -PLAT = 'x86_64' -BUILD_REF, PYARROW_VERSION = get_sha_version() - -if len(sys.argv) > 1: - pattern = sys.argv[1] -else: - pattern = None +@click.command() +@click.argument('pattern', required=False) +@click.option('--dry-run/--push', default=False, + help='Just display the rendered CI configurations without ' + 'submitting them') +@click.option('--queue-repo', default=None, + help='The repository path or url used for scheduling the builds.' + 'Defaults to ../crossbow') +@click.option('--github-token', default=False, envvar='CROSSBOW_GITHUB_TOKEN', + help='Oauth token for Github authentication') +def build(pattern, dry_run, queue_repo, github_token): + # initialize a repo object to interact with arrow's git data + path = Path(__file__).absolute().parents[1] + repo = pygit2.Repository(str(path)) + + # get the currently checked out commit's sha and generate + # the corresponding version number (same as pyarrow's) + sha = repo.head.target + version = get_version(path) -dry_run = False -for arg in sys.argv: - if arg == '--dry-run': - dry_run = True - - -repo = Repository('/Users/krisz/Workspace/crossbow') -branches = [] - -for path in read_templates(pattern): - # TODO create the build variants based on the arguments - branch_name = path.stem - branches.append(branch_name) + origin = repo.remotes['origin'] + branch = repo.branches[repo.head.shorthand] - params = dict( - ARROW_REPO=ARROW_REPO, - ARROW_BRANCH=ARROW_BRANCH, - PLAT=PLAT, - BUILD_REF=BUILD_REF, - PYARROW_VERSION=PYARROW_VERSION, - EMAIL=EMAIL - ) - content = render_template(path, params) + click.echo('Repository: {}@{}'.format(origin.url, branch.branch_name)) + click.echo('Commit SHA: {}'.format(sha)) + click.echo('Version: {}'.format(version)) - if branch_name.startswith('travis'): - filename = '.travis.yml' - elif branch_name.startswith('appveyor'): - filename = 'appveyor.yml' - else: - ValueError('raise something') + # initializing or cloning the scheduling repository + if queue_repo is None: + queue_repo = '/'.join(origin.url.split('/')[:-1] + ['crossbow']) - if dry_run: - print(content) - else: - create_commit(repo, branch_name, filename, content) + try: + queue_repo = pygit2.Repository(queue_repo) + except pygit2.GitError: + queue_repo = pygit2.Repository(str(path.parent / 'crossbow')) + + # reading the build templates and constructing the CI configurations + updated_branches = [] + for template_path in list_templates(pattern): + filename = template_path.name + if filename.startswith('travis'): + target_filename = '.travis.yml' + elif filename.startswith('appveyor'): + target_filename = 'appveyor.yml' + else: + ValueError('Unkown CI service provider for {}'.format(filename)) + + params = { + 'PLAT': 'x86_64', + 'EMAIL': EMAIL, + 'BUILD_REF': sha, + 'ARROW_REPO': origin.url, + 'ARROW_BRANCH': branch.branch_name, + 'PYARROW_VERSION': version, + } + + content = render_template(template_path, params) + + if dry_run: + click.echo('\n') + click.echo('-' * 79) + click.echo(content) + else: + target_branch_name = template_path.stem + updated_branch = create_commit(queue_repo, target_branch_name, + target_filename, content) + updated_branches.append(updated_branch) + if not dry_run: + push_branches(queue_repo, updated_branches, token=github_token) -token = '' -if not dry_run: - push_branches(repo, branches, token=token) +if __name__ == '__main__': + build() From ff9d6d07016cf51c582ec74eedc26260c6ea4796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Mon, 9 Apr 2018 21:49:17 +0200 Subject: [PATCH 29/60] remove todo notes --- cd/crossbow.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cd/crossbow.py b/cd/crossbow.py index 0673d2da425e..c844ac9fa36e 100644 --- a/cd/crossbow.py +++ b/cd/crossbow.py @@ -1,9 +1,5 @@ #!/usr/bin/env python -# TODO: create a docker container too for this sscript with dependencies pre-installed -# TODO: probably should turn off auto cancellation feature of travis -# TODO: dry-run / render feature - import re import sys import click @@ -74,10 +70,10 @@ def __init__(self, token): super(GitRemoteCallbacks, self).__init__() def push_update_reference(self, refname, message): - print(refname, message) + pass def update_tips(self, refname, old, new): - print(refname, old, new) + pass def credentials(self, url, username_from_url, allowed_types): # its a libgit2 bug, that it infinitly retries the authentication @@ -179,6 +175,10 @@ def build(pattern, dry_run, queue_repo, github_token): if not dry_run: push_branches(queue_repo, updated_branches, token=github_token) + click.echo('Pushed branches:') + for updated_branch in updated_branches: + click.echo(' - {}'.format(updated_branch.shorthand)) + if __name__ == '__main__': build() From 6a984b8ec82ed3c76ed9c504b6f49fc3cab493a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Mon, 9 Apr 2018 21:55:33 +0200 Subject: [PATCH 30/60] add license header --- cd/crossbow.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/cd/crossbow.py b/cd/crossbow.py index c844ac9fa36e..f47625e86d60 100644 --- a/cd/crossbow.py +++ b/cd/crossbow.py @@ -1,5 +1,22 @@ #!/usr/bin/env python +# 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. + import re import sys import click From 6c0aec05687c15ea818974cbf9b9e3638c2da547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 14 Apr 2018 13:38:57 +0200 Subject: [PATCH 31/60] format commit msg --- cd/crossbow.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) mode change 100644 => 100755 cd/crossbow.py diff --git a/cd/crossbow.py b/cd/crossbow.py old mode 100644 new mode 100755 index f47625e86d60..562d7379f8e3 --- a/cd/crossbow.py +++ b/cd/crossbow.py @@ -44,7 +44,7 @@ def render_template(path, params): return template.render(**params) -def create_commit(repo, branch_name, filename, content): +def create_commit(repo, branch_name, filename, content, message): master = repo.branches['master'] master_head = repo[master.target] @@ -67,9 +67,8 @@ def create_commit(repo, branch_name, filename, content): timestamp = int((datetime.now() - datetime(1970, 1, 1)).total_seconds()) name = next(repo.config.get_multivar('user.name')) email = next(repo.config.get_multivar('user.email')) - message = 'disco!' - author = pygit2.Signature('Crossbow', 'mailing@list.com', timestamp) + author = pygit2.Signature('crossbow', 'mailing@list.com', timestamp) committer = pygit2.Signature(name, email, timestamp) reference = 'refs/heads/{}'.format(branch_name) @@ -143,6 +142,7 @@ def build(pattern, dry_run, queue_repo, github_token): origin = repo.remotes['origin'] branch = repo.branches[repo.head.shorthand] + ghrepo = origin.url click.echo('Repository: {}@{}'.format(origin.url, branch.branch_name)) click.echo('Commit SHA: {}'.format(sha)) @@ -178,6 +178,8 @@ def build(pattern, dry_run, queue_repo, github_token): } content = render_template(template_path, params) + message = '[BUILD] {} of {}@{}'.format(version, origin.url, + branch.branch_name) if dry_run: click.echo('\n') @@ -186,7 +188,7 @@ def build(pattern, dry_run, queue_repo, github_token): else: target_branch_name = template_path.stem updated_branch = create_commit(queue_repo, target_branch_name, - target_filename, content) + target_filename, content, message) updated_branches.append(updated_branch) if not dry_run: From 4439a93a65f38ad2f7808e4ce214e24aa0b110d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 14 Apr 2018 15:17:42 +0200 Subject: [PATCH 32/60] create readme for crossbow --- cd/README.md | 168 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 cd/README.md diff --git a/cd/README.md b/cd/README.md new file mode 100644 index 000000000000..b02e7a015e38 --- /dev/null +++ b/cd/README.md @@ -0,0 +1,168 @@ +# Arrow Packaging + +Currently Arrow ships the following pre-built binaries: +- C++ and Python [conda-forge packages](conda-recipes) for Linux, Mac and + Windows +- Python [Wheels](python-wheels) for Linux, Mac and Windows +- C++ GLib [Linux packages](linux-packages) for multiple distros + +The content of this directory aims for automatizing the historically error prone +process of Arrow packaging as well as running nightly builds. + + +## Architecture + +### Executors + +Individual builds are executed on public CI services, currently: +- Linux: TravisCI +- Mac: TravisCI +- Windows: AppVeyor + +### Queue + +Because of the nature of how the CI services work, the scheduling of happens +through an additional git repository, which acts like job queue for the builds. +A job is a git commit on a particular git branch, containing only the required +configuration file to run the CI build. + +### Scheduler + +[Crossbow.py](crossbow.py) handles the versioning, configuration rendering, git +commit creation and pushing the changes. + + +## Install + +> The following guide depends on GitHub, but theoretically any git server can be +> used. + +1. [Create the queue repository](https://help.github.com/articles/creating-a-new-repository) +2. Clone the newly created, by default the scripts looks for `crossbow` next to + arrow repository. + + ```bash + git clone https://github.com//crossbow crossbow + ``` + +2. [Create a Personal Access + Token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) +3. Export the token as an environment variable: + + ```bash + export CROSSBOW_GITHUB_TOKEN= + ``` + + > or pass as an argument to the CLI script `--github-token` + +4. Install the python dependencies for the script: + + ```bash + conda install -y jinja2 pygit2 click + ``` +5. Try running it: + ```bash + $ python crossbow.py --help + ``` + + +## Usage + +The script does the following: +1. Detects the current repository, thus supports forks. The following snippet + will build kszucs's fork instead of the upstream apache/arrow repository. + + ```bash + $ git clone https://github.com/kszucs/arrow + $ git clone https://github.com/kszucs/crossbow + + $ cd arrow/cd + $ python crossbow.py + ``` + +2. Gets the HEAD commit of the currently checked out branch and generates + the version number based on [setuptools_scm](https://pypi.python.org/pypi/setuptools_scm). + So to build a particular branch, just check out before running the script: + + ```bash + git checkout ARROW- + python cd/crossbow.py --dry-run + ``` + + > Note that the arrow branch must be pushed beforehand, because the script + > will clone the selected branch. + +3. Reads and renders the required build configurations with the parameters + substituted. +2. Create a commit per build configuration to its own branch. For example + to build `travis-linux-conda.yml` it will place a commit to the tip of + `crossbow@travis-linux-conda` branch. +3. Pushes the modified branches to GitHub which triggers the builds. + For authentication it uses github oauth tokens described in the install + section. + + +### Examples + +The script accepts a pattern as a first argument to narrow the build scope: + +Run all builds: + +```bash +$ python crossbow.py +Repository: https://github.com/kszucs/arrow@cd +Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 +Version: 0.9.1.dev48+g810a7188.d20180414 +Pushed branches: + - travis-osx-wheel + - travis-linux-packages + - travis-linux-wheel + - appveyor-win-wheel + - appveyor-win-conda + - travis-linux-conda + - travis-osx-conda +``` + +Just render but don't commit nor execute: + +```bash +$ python crossbow.py --dry-run +``` + +Run only `conda` package builds but on all platforms: + +```bash +$ python crossbow.py conda +Repository: https://github.com/kszucs/arrow@cd +Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 +Version: 0.9.1.dev48+g810a7188.d20180414 +Pushed branches: + - appveyor-win-conda + - travis-linux-conda + - travis-osx-conda +``` + +Run `wheel` builds: + +```bash +$ python crossbow.py wheel +Repository: https://github.com/kszucs/arrow@cd +Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 +Version: 0.9.1.dev48+g810a7188.d20180414 +Pushed branches: + - travis-osx-wheel + - travis-linux-wheel + - appveyor-win-wheel +``` + +Run only `linux-conda` package build: + +```bash +$ python crossbow.py linux-conda +Repository: https://github.com/kszucs/arrow@cd +Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 +Version: 0.9.1.dev48+g810a7188.d20180414 +Pushed branches: + - travis-linux-conda +``` + From 401cf31f4568cc5daf920c0f17be40735c520d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 14 Apr 2018 15:21:57 +0200 Subject: [PATCH 33/60] little readme modification --- cd/README.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/cd/README.md b/cd/README.md index b02e7a015e38..8c8d33cfe527 100644 --- a/cd/README.md +++ b/cd/README.md @@ -34,27 +34,27 @@ commit creation and pushing the changes. ## Install -> The following guide depends on GitHub, but theoretically any git server can be +> The following guide depends on GitHub, but theoretically any git server can be > used. 1. [Create the queue repository](https://help.github.com/articles/creating-a-new-repository) -2. Clone the newly created, by default the scripts looks for `crossbow` next to +2. Clone the newly created, by default the scripts looks for `crossbow` next to arrow repository. - + ```bash git clone https://github.com//crossbow crossbow - ``` - + ``` + 2. [Create a Personal Access Token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) 3. Export the token as an environment variable: - + ```bash export CROSSBOW_GITHUB_TOKEN= ``` - - > or pass as an argument to the CLI script `--github-token` - + + > or pass as an argument to the CLI script `--github-token` + 4. Install the python dependencies for the script: ```bash @@ -71,11 +71,11 @@ commit creation and pushing the changes. The script does the following: 1. Detects the current repository, thus supports forks. The following snippet will build kszucs's fork instead of the upstream apache/arrow repository. - + ```bash $ git clone https://github.com/kszucs/arrow $ git clone https://github.com/kszucs/crossbow - + $ cd arrow/cd $ python crossbow.py ``` @@ -83,18 +83,18 @@ The script does the following: 2. Gets the HEAD commit of the currently checked out branch and generates the version number based on [setuptools_scm](https://pypi.python.org/pypi/setuptools_scm). So to build a particular branch, just check out before running the script: - + ```bash git checkout ARROW- python cd/crossbow.py --dry-run ``` - + > Note that the arrow branch must be pushed beforehand, because the script > will clone the selected branch. - -3. Reads and renders the required build configurations with the parameters - substituted. -2. Create a commit per build configuration to its own branch. For example + +3. Reads and renders the required build configurations with the parameters + substituted. +2. Create a commit per build configuration to its own branch. For example to build `travis-linux-conda.yml` it will place a commit to the tip of `crossbow@travis-linux-conda` branch. 3. Pushes the modified branches to GitHub which triggers the builds. @@ -123,15 +123,15 @@ Pushed branches: - travis-osx-conda ``` -Just render but don't commit nor execute: +Just render without applying or committing the changes: -```bash +```bash $ python crossbow.py --dry-run ``` Run only `conda` package builds but on all platforms: -```bash +```bash $ python crossbow.py conda Repository: https://github.com/kszucs/arrow@cd Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 @@ -144,7 +144,7 @@ Pushed branches: Run `wheel` builds: -```bash +```bash $ python crossbow.py wheel Repository: https://github.com/kszucs/arrow@cd Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 @@ -157,7 +157,7 @@ Pushed branches: Run only `linux-conda` package build: -```bash +```bash $ python crossbow.py linux-conda Repository: https://github.com/kszucs/arrow@cd Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 From 7b6321d2e1ff3a2464b9f351294084fbffb00f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 14 Apr 2018 15:27:30 +0200 Subject: [PATCH 34/60] build multiple linux distros --- cd/travis-linux-packages.yml | 58 ++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index 85e1c1ab5238..1e26374a1ccf 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -2,7 +2,6 @@ os: linux dist: trusty sudo: required language: ruby -python: 3.5 env: global: @@ -10,33 +9,40 @@ env: - BUILD_REF={{ BUILD_REF }} - PYARROW_VERSION={{ PYARROW_VERSION }} -install: - - sed -i'' -e 's/main$/main contrib non-free/g' /etc/apt/sources.list - - apt update -y - - apt install -y \ - autoconf-archive \ - build-essential \ - cmake \ - debhelper\ - devscripts \ - git \ - gtk-doc-tools \ - libboost-filesystem-dev \ - libboost-regex-dev \ - libboost-system-dev \ - libgirepository1.0-dev \ - libglib2.0-doc \ - libjemalloc-dev \ - lsb-release \ - nvidia-cuda-toolkit \ - pkg-config \ - python3-dev \ - python3-numpy +matrix: + include: + - script: + - (cd arrow/cd/linux-packages && travis_wait 40 rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no) + - script: + - (cd arrow/cd/linux-packages && travis_wait 40 rake apt:build APT_TARGETS=ubuntu-artful PARALLEL=yes DEBUG=no) + - script: + - (cd arrow/cd/linux-packages && rake yum:build PARALLEL=yes DEBUG=no) -script: +before_install: + - sudo apt update -y -qq + - | + sudo apt install -y -qq \ + autoconf-archive \ + build-essential \ + cmake \ + debhelper \ + devscripts \ + git \ + gtk-doc-tools \ + libboost-filesystem-dev \ + libboost-regex-dev \ + libboost-system-dev \ + libgirepository1.0-dev \ + libglib2.0-doc \ + libjemalloc-dev \ + lsb-release \ + nvidia-cuda-toolkit \ + pkg-config \ + python3-dev \ + python3-numpy + +before_script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - - (cd arrow/cd/linux-packages && rake yum:build PARALLEL=yes DEBUG=no) - #- (cd arrow/cd/linux-packages && travis_wait 40 rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no) notifications: email: From a6634af71dd80190e3eb9e64f97ac9f4f5478d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 14 Apr 2018 15:47:50 +0200 Subject: [PATCH 35/60] update README --- cd/README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/cd/README.md b/cd/README.md index 8c8d33cfe527..37f145f37437 100644 --- a/cd/README.md +++ b/cd/README.md @@ -37,17 +37,20 @@ commit creation and pushing the changes. > The following guide depends on GitHub, but theoretically any git server can be > used. -1. [Create the queue repository](https://help.github.com/articles/creating-a-new-repository) -2. Clone the newly created, by default the scripts looks for `crossbow` next to +1. [Create the queue + repository](https://help.github.com/articles/creating-a-new-repository) +2. Enable [TravisCI](https://travis-ci.org/getting_started) and + [Appveyor](https://www.appveyor.com/docs/) integrations on it +3. Clone the newly created, by default the scripts looks for `crossbow` next to arrow repository. ```bash git clone https://github.com//crossbow crossbow ``` -2. [Create a Personal Access +4. [Create a Personal Access Token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) -3. Export the token as an environment variable: +5. Export the token as an environment variable: ```bash export CROSSBOW_GITHUB_TOKEN= @@ -55,12 +58,12 @@ commit creation and pushing the changes. > or pass as an argument to the CLI script `--github-token` -4. Install the python dependencies for the script: +6. Install the python dependencies for the script: ```bash conda install -y jinja2 pygit2 click ``` -5. Try running it: +7. Try running it: ```bash $ python crossbow.py --help ``` @@ -69,6 +72,7 @@ commit creation and pushing the changes. ## Usage The script does the following: + 1. Detects the current repository, thus supports forks. The following snippet will build kszucs's fork instead of the upstream apache/arrow repository. From 9e74ead48ff4f81bde04d18590ae737c39bed27a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 14 Apr 2018 15:56:41 +0200 Subject: [PATCH 36/60] add apache lincense headers --- cd/README.md | 12 ++++++++++++ cd/appveyor-win-conda.yml | 17 +++++++++++++++++ cd/appveyor-win-wheel.yml | 17 +++++++++++++++++ cd/travis-linux-conda.yml | 17 +++++++++++++++++ cd/travis-linux-packages.yml | 17 +++++++++++++++++ cd/travis-linux-wheel.yml | 17 +++++++++++++++++ cd/travis-osx-conda.yml | 17 +++++++++++++++++ cd/travis-osx-wheel.yml | 17 +++++++++++++++++ 8 files changed, 131 insertions(+) diff --git a/cd/README.md b/cd/README.md index 37f145f37437..d7ddfb5c86f3 100644 --- a/cd/README.md +++ b/cd/README.md @@ -159,6 +159,18 @@ Pushed branches: - appveyor-win-wheel ``` +Run `osx` builds: + +```bash +$ python crossbow.py osx +Repository: https://github.com/kszucs/arrow@cd +Commit SHA: cad1df2c7f650ad3434319bbbefed0d4abe45e4a +Version: 0.9.1.dev130+gcad1df2c.d20180414 +Pushed branches: + - travis-osx-wheel + - travis-osx-conda +``` + Run only `linux-conda` package build: ```bash diff --git a/cd/appveyor-win-conda.yml b/cd/appveyor-win-conda.yml index e8e38de599d7..118646286169 100644 --- a/cd/appveyor-win-conda.yml +++ b/cd/appveyor-win-conda.yml @@ -1,3 +1,20 @@ +# 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. + environment: matrix: - TARGET_ARCH: x64 diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index 25ee53dc8be9..0ed12424341c 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -1,3 +1,20 @@ +# 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: Visual Studio 2015 environment: diff --git a/cd/travis-linux-conda.yml b/cd/travis-linux-conda.yml index 6467722b912e..6a2d99b54349 100644 --- a/cd/travis-linux-conda.yml +++ b/cd/travis-linux-conda.yml @@ -1,3 +1,20 @@ +# 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. + language: generic os: linux diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index 1e26374a1ccf..0849b6d05acf 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -1,3 +1,20 @@ +# 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 dist: trusty sudo: required diff --git a/cd/travis-linux-wheel.yml b/cd/travis-linux-wheel.yml index 864f9bfa11ef..76dfa1905336 100644 --- a/cd/travis-linux-wheel.yml +++ b/cd/travis-linux-wheel.yml @@ -1,3 +1,20 @@ +# 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. + env: global: - PLAT={{ PLAT }} diff --git a/cd/travis-osx-conda.yml b/cd/travis-osx-conda.yml index 0c42b0ae7b38..c0e992d2789e 100644 --- a/cd/travis-osx-conda.yml +++ b/cd/travis-osx-conda.yml @@ -1,3 +1,20 @@ +# 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. + language: generic os: osx diff --git a/cd/travis-osx-wheel.yml b/cd/travis-osx-wheel.yml index 7bc484a442f5..001b4d5b0d16 100644 --- a/cd/travis-osx-wheel.yml +++ b/cd/travis-osx-wheel.yml @@ -1,3 +1,20 @@ +# 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: osx sudo: required language: objective-c From 93c86c7549eab0367371f023e4220e74c980d35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sun, 15 Apr 2018 23:14:21 +0200 Subject: [PATCH 37/60] change yum version label to dev --- cd/linux-packages/yum/descriptor.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cd/linux-packages/yum/descriptor.json b/cd/linux-packages/yum/descriptor.json index f59ef856acff..b025b17439dd 100644 --- a/cd/linux-packages/yum/descriptor.json +++ b/cd/linux-packages/yum/descriptor.json @@ -7,7 +7,7 @@ "vcs_url": "htttps://github.com/apache/arrow.git" }, "version": { - "name": "0.9.0" + "name": "dev" }, "files": [ { From 122b0dc6cad71cd39f97df3f6f2645ed7bb3bcd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Mon, 16 Apr 2018 18:09:39 +0200 Subject: [PATCH 38/60] factor out the library code --- cd/README.md | 6 +- cd/crossbow.py | 337 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 223 insertions(+), 120 deletions(-) diff --git a/cd/README.md b/cd/README.md index d7ddfb5c86f3..bda2fc428309 100644 --- a/cd/README.md +++ b/cd/README.md @@ -4,7 +4,7 @@ Currently Arrow ships the following pre-built binaries: - C++ and Python [conda-forge packages](conda-recipes) for Linux, Mac and Windows - Python [Wheels](python-wheels) for Linux, Mac and Windows -- C++ GLib [Linux packages](linux-packages) for multiple distros +- C++ and GLib [Linux packages](linux-packages) for multiple distributions The content of this directory aims for automatizing the historically error prone process of Arrow packaging as well as running nightly builds. @@ -22,9 +22,9 @@ Individual builds are executed on public CI services, currently: ### Queue Because of the nature of how the CI services work, the scheduling of happens -through an additional git repository, which acts like job queue for the builds. +through an additional git repository, which acts like a job queue for the builds. A job is a git commit on a particular git branch, containing only the required -configuration file to run the CI build. +configuration file to run the CI build (currently `.travis.yml` or `appveyor.yml`). ### Scheduler diff --git a/cd/crossbow.py b/cd/crossbow.py index 562d7379f8e3..e2b352ddfbdf 100755 --- a/cd/crossbow.py +++ b/cd/crossbow.py @@ -21,61 +21,22 @@ import sys import click import pygit2 -# later we can remove these dependencies if required +import logging +from enum import Enum from pathlib import Path +from textwrap import dedent from datetime import datetime -from jinja2 import FileSystemLoader, Environment +from jinja2 import Template from setuptools_scm import get_version -CWD = Path(__file__).parent - - -def list_templates(pattern): - for template in CWD.glob('*.yml'): - if pattern is None or re.search(pattern, template.stem): - yield template - - -def render_template(path, params): - env = Environment(loader=FileSystemLoader(str(path.parent))) - template = env.get_template(path.name) - return template.render(**params) - - -def create_commit(repo, branch_name, filename, content, message): - master = repo.branches['master'] - master_head = repo[master.target] - - try: - branch = repo.branches[branch_name] - except KeyError: - branch = repo.branches.create(branch_name, master_head) - - # creating the tree we are going to push based on master's tree - builder = repo.TreeBuilder(master_head.tree) - - # insert the file and creating the new filetree - blob_id = repo.create_blob(content) - blob = repo[blob_id] - - builder.insert(filename, blob_id, pygit2.GIT_FILEMODE_BLOB) - tree_id = builder.write() - - # creating the new commit - timestamp = int((datetime.now() - datetime(1970, 1, 1)).total_seconds()) - name = next(repo.config.get_multivar('user.name')) - email = next(repo.config.get_multivar('user.email')) - - author = pygit2.Signature('crossbow', 'mailing@list.com', timestamp) - committer = pygit2.Signature(name, email, timestamp) - - reference = 'refs/heads/{}'.format(branch_name) - commit_id = repo.create_commit(reference, author, committer, message, - tree_id, [branch.target]) - - return branch +logging.basicConfig( + level=logging.INFO, + format="[%(asctime)s] %(levelname)s Crossbow %(message)s", + datefmt="%H:%M:%S", + stream=sys.stdout +) class GitRemoteCallbacks(pygit2.RemoteCallbacks): @@ -107,19 +68,198 @@ def credentials(self, url, username_from_url, allowed_types): return None -def push_branches(repo, branches, token): - callbacks = GitRemoteCallbacks(token) +class Platform(Enum): + # in alphabetical order + LINUX = 0 + OSX = 1 + WIN = 2 + + @property + def ci(self): + if self is self.WIN: + return 'appveyor' + else: + return 'travis' + + @property + def filename(self): + if self.ci == 'appveyor': + return 'appveyor.yml' + else: + return '.travis.yml' + + +class Target(object): + + def __init__(self, repo_path, template_directory=None): + self.path = Path(repo_path).absolute() + + # relative to repository's path + if template_directory is None: + self.templates = self.path + else: + self.templates = self.path / template_directory + + # initialize a repo object to interact with arrow's git data + self.repo = pygit2.Repository(str(self.path)) + + msg = dedent(''' + Repository: {origin}@{branch} + Commit SHA: {sha} + Version: {version} + ''') + logging.info(msg.format( + origin=self.origin.url, + branch=self.current_branch.branch_name, + sha=self.sha, + version=self.version + )) + + @property + def sha(self): + """Currently checked out commit's sha""" + return self.repo.head.target + + @property + def version(self): + """Generate version number based on version control history""" + return get_version(self.path) + + @property + def origin(self): + return self.repo.remotes['origin'] + + @property + def current_branch(self): + reference = self.repo.head.shorthand + return self.repo.branches[reference] + + @property + def description(self): + return '[BUILD] {} of {}@{}'.format( + self.version, self.origin.url, self.current_branch.branch_name) + + +class Build(object): + + def __init__(self, target, artifact, platform, **params): + assert isinstance(target, Target) + assert isinstance(platform, Platform) + + self.target = target + self.artifact = artifact + self.platform = platform + self.params = params + + def render(self): + path = (self.target.templates / self.name).with_suffix('.yml') + template = Template(path.read_text()) + return template.render(**self.params) + + def config_files(self): + return {self.platform.filename: self.render()} + + @property + def branch(self): + return self.name + + @property + def name(self): + return '-'.join([self.platform.ci, + self.platform.name.lower(), + self.artifact]) - remote = repo.remotes['origin'] - refs = [branch.name for branch in branches] + @property + def description(self): + return self.target.description - return remote.push(refs, callbacks=callbacks) + +class Queue(object): + + def __init__(self, repo_path): + self.path = Path(repo_path).absolute() + self.repo = pygit2.Repository(str(self.path)) + self.updated_branches = [] + + def _get_parent_commit(self): + """Currently this always returns the HEAD of master""" + master = self.repo.branches['master'] + return self.repo[master.target] + + def _get_or_create_branch(self, name): + try: + return self.repo.branches[name] + except KeyError: + parent = self._get_parent_commit() + return self.repo.branches.create(name, parent) + + def _create_tree(self, files): + parent = self._get_parent_commit() + + # creating the tree we are going to push based on master's tree + builder = self.repo.TreeBuilder(parent.tree) + + for filename, content in files.items(): + # insert the file and creating the new filetree + blob_id = self.repo.create_blob(content) + builder.insert(filename, blob_id, pygit2.GIT_FILEMODE_BLOB) + + tree_id = builder.write() + return tree_id + + def put(self, build): + assert isinstance(build, Build) + + branch = self._get_or_create_branch(build.branch) + tree_id = self._create_tree(build.config_files()) + + # creating the new commit + timestamp = (datetime.now() - datetime(1970, 1, 1)).total_seconds() + name = next(self.repo.config.get_multivar('user.name')) + email = next(self.repo.config.get_multivar('user.email')) + + author = pygit2.Signature('crossbow', 'mailing@list.com', + int(timestamp)) + committer = pygit2.Signature(name, email, int(timestamp)) + message = build.description + + reference = 'refs/heads/{}'.format(branch.branch_name) + commit_id = self.repo.create_commit(reference, author, committer, + message, tree_id, [branch.target]) + logging.info('{} created on {}'.format( + commit_id, branch.branch_name)) + + self.updated_branches.append(branch) + + def push(self, token): + callbacks = GitRemoteCallbacks(token) + + remote = self.repo.remotes['origin'] + refs = [branch.name for branch in self.updated_branches] + shorthands = [b.shorthand for b in self.updated_branches] + + remote.push(refs, callbacks=callbacks) + self.updated_branches = [] + + logging.info('\nUpdated branches:{}'.format('\n - '.join(shorthands))) # this should be the mailing list EMAIL = 'szucs.krisztian@gmail.com' +# currently possible builds, let's be explicit for now +BUILDS = [ + ('conda', Platform.LINUX), + ('conda', Platform.OSX), + ('conda', Platform.WIN), + ('wheel', Platform.LINUX), + ('wheel', Platform.OSX), + ('wheel', Platform.WIN), + ('packages', Platform.LINUX) +] + + @click.command() @click.argument('pattern', required=False) @click.option('--dry-run/--push', default=False, @@ -131,72 +271,35 @@ def push_branches(repo, branches, token): @click.option('--github-token', default=False, envvar='CROSSBOW_GITHUB_TOKEN', help='Oauth token for Github authentication') def build(pattern, dry_run, queue_repo, github_token): - # initialize a repo object to interact with arrow's git data - path = Path(__file__).absolute().parents[1] - repo = pygit2.Repository(str(path)) - - # get the currently checked out commit's sha and generate - # the corresponding version number (same as pyarrow's) - sha = repo.head.target - version = get_version(path) - - origin = repo.remotes['origin'] - branch = repo.branches[repo.head.shorthand] - ghrepo = origin.url - - click.echo('Repository: {}@{}'.format(origin.url, branch.branch_name)) - click.echo('Commit SHA: {}'.format(sha)) - click.echo('Version: {}'.format(version)) - - # initializing or cloning the scheduling repository + arrow_repo = Path(__file__).absolute().parents[1] if queue_repo is None: - queue_repo = '/'.join(origin.url.split('/')[:-1] + ['crossbow']) - - try: - queue_repo = pygit2.Repository(queue_repo) - except pygit2.GitError: - queue_repo = pygit2.Repository(str(path.parent / 'crossbow')) - - # reading the build templates and constructing the CI configurations - updated_branches = [] - for template_path in list_templates(pattern): - filename = template_path.name - if filename.startswith('travis'): - target_filename = '.travis.yml' - elif filename.startswith('appveyor'): - target_filename = 'appveyor.yml' - else: - ValueError('Unkown CI service provider for {}'.format(filename)) - - params = { - 'PLAT': 'x86_64', - 'EMAIL': EMAIL, - 'BUILD_REF': sha, - 'ARROW_REPO': origin.url, - 'ARROW_BRANCH': branch.branch_name, - 'PYARROW_VERSION': version, - } - - content = render_template(template_path, params) - message = '[BUILD] {} of {}@{}'.format(version, origin.url, - branch.branch_name) - - if dry_run: - click.echo('\n') - click.echo('-' * 79) - click.echo(content) - else: - target_branch_name = template_path.stem - updated_branch = create_commit(queue_repo, target_branch_name, - target_filename, content, message) - updated_branches.append(updated_branch) + queue_repo = arrow_repo.parent / 'crossbow' + + arrow = Target(arrow_repo, template_directory='cd') + queue = Queue(queue_repo) + + params = { + # these should be renamed + 'PLAT': 'x86_64', + 'EMAIL': EMAIL, + 'BUILD_REF': arrow.sha, + 'ARROW_REPO': arrow.origin.url, + 'ARROW_BRANCH': arrow.current_branch.branch_name, + 'PYARROW_VERSION': arrow.version, + } + + for artifact, platform in BUILDS: + build = Build(arrow, artifact, platform, **params) + + if pattern is None or re.search(pattern, build.name): + if dry_run: + logging.info('{}\n\n{}'.format(build.name, build.render())) + else: + queue.put(build) # create the commit if not dry_run: - push_branches(queue_repo, updated_branches, token=github_token) - - click.echo('Pushed branches:') - for updated_branch in updated_branches: - click.echo(' - {}'.format(updated_branch.shorthand)) + # push the changed branches + queue.push(token=github_token) if __name__ == '__main__': From 4ca19214d9981059a856a9451cded3f6d2e605b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 20 Apr 2018 09:53:30 +0200 Subject: [PATCH 39/60] checkout specific revision; pass version as env variable to conda recipes --- cd/appveyor-win-conda.yml | 1 + cd/appveyor-win-wheel.yml | 1 + cd/conda-recipes/arrow-cpp/meta.yaml | 4 ++-- cd/conda-recipes/pyarrow/meta.yaml | 4 ++-- cd/crossbow.py | 2 ++ cd/travis-linux-conda.yml | 1 + cd/travis-linux-packages.yml | 1 + cd/travis-linux-wheel.yml | 1 + cd/travis-osx-conda.yml | 2 ++ 9 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cd/appveyor-win-conda.yml b/cd/appveyor-win-conda.yml index 118646286169..8063387cb0ef 100644 --- a/cd/appveyor-win-conda.yml +++ b/cd/appveyor-win-conda.yml @@ -45,6 +45,7 @@ build: off test_script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} %ARROW_SRC% || exit /B + - git checkout {{ ARROW_SHA }} || exit /B - pushd %ARROW_SRC%\cd\conda-recipes - conda.exe build arrow-cpp pyarrow diff --git a/cd/appveyor-win-wheel.yml b/cd/appveyor-win-wheel.yml index 0ed12424341c..be60c2ea0d26 100644 --- a/cd/appveyor-win-wheel.yml +++ b/cd/appveyor-win-wheel.yml @@ -43,6 +43,7 @@ init: build_script: - mkdir wheels - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} %ARROW_SRC% || exit /B + - git -C arrow checkout {{ ARROW_SHA }} || exit /B - call %ARROW_SRC%\cd\python-wheels\win-build.bat after_build: diff --git a/cd/conda-recipes/arrow-cpp/meta.yaml b/cd/conda-recipes/arrow-cpp/meta.yaml index 6263d957a2ed..d3855c02f1db 100644 --- a/cd/conda-recipes/arrow-cpp/meta.yaml +++ b/cd/conda-recipes/arrow-cpp/meta.yaml @@ -1,12 +1,12 @@ package: name: arrow-cpp - version: '0.9.0' # this should be read from an env variable + version: {{ ARROW_VERSION }} source: path: ../../../ build: - number: 6 + number: 0 skip: true # [win32] skip: true # [win and py<35] features: diff --git a/cd/conda-recipes/pyarrow/meta.yaml b/cd/conda-recipes/pyarrow/meta.yaml index b579ca6e25a8..8c86e0bbb77f 100644 --- a/cd/conda-recipes/pyarrow/meta.yaml +++ b/cd/conda-recipes/pyarrow/meta.yaml @@ -1,12 +1,12 @@ package: name: pyarrow - version: '0.9.0' # this should be read from an env variable + version: version: {{ ARROW_VERSION }} source: path: ../../../ build: - number: 1 + number: 0 skip: true # [win32] skip: true # [win and py<35] features: diff --git a/cd/crossbow.py b/cd/crossbow.py index e2b352ddfbdf..94707818ace8 100755 --- a/cd/crossbow.py +++ b/cd/crossbow.py @@ -283,8 +283,10 @@ def build(pattern, dry_run, queue_repo, github_token): 'PLAT': 'x86_64', 'EMAIL': EMAIL, 'BUILD_REF': arrow.sha, + 'ARROW_SHA': arrow.sha, 'ARROW_REPO': arrow.origin.url, 'ARROW_BRANCH': arrow.current_branch.branch_name, + 'ARROW_VERSION': arrow.version, 'PYARROW_VERSION': arrow.version, } diff --git a/cd/travis-linux-conda.yml b/cd/travis-linux-conda.yml index 6a2d99b54349..8b9a64719aa1 100644 --- a/cd/travis-linux-conda.yml +++ b/cd/travis-linux-conda.yml @@ -51,6 +51,7 @@ install: script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow + - git -C arrow checkout {{ ARROW_SHA }} - pushd arrow/cd/conda-recipes - conda build arrow-cpp pyarrow diff --git a/cd/travis-linux-packages.yml b/cd/travis-linux-packages.yml index 0849b6d05acf..922808462f4c 100644 --- a/cd/travis-linux-packages.yml +++ b/cd/travis-linux-packages.yml @@ -60,6 +60,7 @@ before_install: before_script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow + - git -C arrow checkout {{ ARROW_SHA }} notifications: email: diff --git a/cd/travis-linux-wheel.yml b/cd/travis-linux-wheel.yml index 76dfa1905336..b7b535ac49cf 100644 --- a/cd/travis-linux-wheel.yml +++ b/cd/travis-linux-wheel.yml @@ -33,6 +33,7 @@ before_script: script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow + - git -C arrow checkout {{ ARROW_SHA }} - mkdir -p dist - pushd arrow/python/manylinux1 diff --git a/cd/travis-osx-conda.yml b/cd/travis-osx-conda.yml index c0e992d2789e..c41c1d147042 100644 --- a/cd/travis-osx-conda.yml +++ b/cd/travis-osx-conda.yml @@ -21,6 +21,7 @@ os: osx osx_image: xcode6.4 env: + - ARROW_VERSION={{ ARROW_VERSION }} matrix: - CONDA_PY=27 - CONDA_PY=35 @@ -60,6 +61,7 @@ install: script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow + - git checkout {{ ARROW_SHA }} - pushd arrow/cd/conda-recipes - conda build arrow-cpp pyarrow From 6aa87cb37f0bb36813b776103d3fb00ba8cd393e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 20 Apr 2018 10:10:58 +0200 Subject: [PATCH 40/60] update versions in pyarrow recipe --- cd/conda-recipes/pyarrow/meta.yaml | 4 ++-- cd/travis-osx-conda.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cd/conda-recipes/pyarrow/meta.yaml b/cd/conda-recipes/pyarrow/meta.yaml index 8c86e0bbb77f..249b14b81066 100644 --- a/cd/conda-recipes/pyarrow/meta.yaml +++ b/cd/conda-recipes/pyarrow/meta.yaml @@ -1,6 +1,6 @@ package: name: pyarrow - version: version: {{ ARROW_VERSION }} + version: {{ ARROW_VERSION }} source: path: ../../../ @@ -33,7 +33,7 @@ requirements: - numpy >=1.12 # [win and py>=36] - pandas - six - - arrow-cpp 0.9.0 + - arrow-cpp {{ ARROW_VERSION }} - parquet-cpp 1.4.0 - futures # [py27] diff --git a/cd/travis-osx-conda.yml b/cd/travis-osx-conda.yml index c41c1d147042..84a01bff7391 100644 --- a/cd/travis-osx-conda.yml +++ b/cd/travis-osx-conda.yml @@ -61,7 +61,7 @@ install: script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - - git checkout {{ ARROW_SHA }} + - git -C arrow checkout {{ ARROW_SHA }} - pushd arrow/cd/conda-recipes - conda build arrow-cpp pyarrow From 351b48ecd13009d96177e99938fac1ccc9094010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 20 Apr 2018 12:18:36 +0200 Subject: [PATCH 41/60] export arrow version on linux and win conda package builds --- cd/appveyor-win-conda.yml | 1 + cd/travis-linux-conda.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/cd/appveyor-win-conda.yml b/cd/appveyor-win-conda.yml index 8063387cb0ef..7e942ec1207c 100644 --- a/cd/appveyor-win-conda.yml +++ b/cd/appveyor-win-conda.yml @@ -24,6 +24,7 @@ environment: CONDA_PY: 36 CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 ARROW_SRC: C:\apache-arrow + ARROW_VERSION={{ ARROW_VERSION }} install: - cmd: rmdir C:\cygwin /s /q diff --git a/cd/travis-linux-conda.yml b/cd/travis-linux-conda.yml index 8b9a64719aa1..d5ab38141ec5 100644 --- a/cd/travis-linux-conda.yml +++ b/cd/travis-linux-conda.yml @@ -21,6 +21,7 @@ os: linux dist: trusty env: + - ARROW_VERSION={{ ARROW_VERSION }} matrix: - CONDA_PY=27 - CONDA_PY=35 From 591baf679e5b99f1abdd342a0dd9ac50ff94c613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 4 May 2018 13:08:32 +0200 Subject: [PATCH 42/60] readme fixes --- cd/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cd/README.md b/cd/README.md index bda2fc428309..a61d4f01f8df 100644 --- a/cd/README.md +++ b/cd/README.md @@ -1,28 +1,28 @@ # Arrow Packaging -Currently Arrow ships the following pre-built binaries: +The content of this directory aims for automating the historically error prone +process of Arrow packaging. + +Packages: - C++ and Python [conda-forge packages](conda-recipes) for Linux, Mac and Windows - Python [Wheels](python-wheels) for Linux, Mac and Windows - C++ and GLib [Linux packages](linux-packages) for multiple distributions - -The content of this directory aims for automatizing the historically error prone -process of Arrow packaging as well as running nightly builds. - +- Java ## Architecture ### Executors -Individual builds are executed on public CI services, currently: +Individual jobs are executed on public CI services, currently: - Linux: TravisCI - Mac: TravisCI - Windows: AppVeyor ### Queue -Because of the nature of how the CI services work, the scheduling of happens -through an additional git repository, which acts like a job queue for the builds. +Because of the nature of how the CI services work, the scheduling of jobs +through an additional git repository, which acts like a job queue for the tasks. A job is a git commit on a particular git branch, containing only the required configuration file to run the CI build (currently `.travis.yml` or `appveyor.yml`). From cea40351906ae4353694f679b03ede5a414b280a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 4 May 2018 13:16:27 +0200 Subject: [PATCH 43/60] explicitly pass arrow's repo path --- cd/crossbow.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cd/crossbow.py b/cd/crossbow.py index 94707818ace8..e90c2c7f283d 100755 --- a/cd/crossbow.py +++ b/cd/crossbow.py @@ -265,13 +265,18 @@ def push(self, token): @click.option('--dry-run/--push', default=False, help='Just display the rendered CI configurations without ' 'submitting them') +@click.option('--arrow-repo', default=None, + help='Arrow\'s repository path. Defaults to the repository of ' + 'this script', envvar='CROSSBOW_ARROW_REPO') @click.option('--queue-repo', default=None, - help='The repository path or url used for scheduling the builds.' - 'Defaults to ../crossbow') + help='The repository path used for scheduling the tasks. ' + 'Defaults to crossbow directory placed next to arrow', + envvar='CROSSBOW_QUEUE_REPO') @click.option('--github-token', default=False, envvar='CROSSBOW_GITHUB_TOKEN', help='Oauth token for Github authentication') -def build(pattern, dry_run, queue_repo, github_token): - arrow_repo = Path(__file__).absolute().parents[1] +def build(pattern, dry_run, arrow_repo, queue_repo, github_token): + if arrow_repo is None: + arrow_repo = Path(__file__).absolute().parents[1] if queue_repo is None: queue_repo = arrow_repo.parent / 'crossbow' From c6ca0f54366b1656be11d62679fdc3653cad541b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 4 May 2018 14:05:23 +0200 Subject: [PATCH 44/60] tasks yml --- cd/README.md | 2 +- cd/crossbow.py | 66 ++++++++++++++++++++++++++------------------------ cd/tasks.yml | 34 ++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 32 deletions(-) create mode 100644 cd/tasks.yml diff --git a/cd/README.md b/cd/README.md index a61d4f01f8df..111b33e02801 100644 --- a/cd/README.md +++ b/cd/README.md @@ -61,7 +61,7 @@ commit creation and pushing the changes. 6. Install the python dependencies for the script: ```bash - conda install -y jinja2 pygit2 click + conda install -y jinja2 pygit2 click pyyaml ``` 7. Try running it: ```bash diff --git a/cd/crossbow.py b/cd/crossbow.py index e90c2c7f283d..75f76801cdd6 100755 --- a/cd/crossbow.py +++ b/cd/crossbow.py @@ -19,6 +19,7 @@ import re import sys +import yaml import click import pygit2 import logging @@ -142,17 +143,18 @@ def description(self): class Build(object): - def __init__(self, target, artifact, platform, **params): + def __init__(self, target, name, platform, template, **params): assert isinstance(target, Target) assert isinstance(platform, Platform) + self.name = name self.target = target - self.artifact = artifact self.platform = platform + self.template = template self.params = params def render(self): - path = (self.target.templates / self.name).with_suffix('.yml') + path = Path(self.template) template = Template(path.read_text()) return template.render(**self.params) @@ -163,12 +165,6 @@ def config_files(self): def branch(self): return self.name - @property - def name(self): - return '-'.join([self.platform.ci, - self.platform.name.lower(), - self.artifact]) - @property def description(self): return self.target.description @@ -241,49 +237,47 @@ def push(self, token): remote.push(refs, callbacks=callbacks) self.updated_branches = [] - logging.info('\nUpdated branches:{}'.format('\n - '.join(shorthands))) + logging.info('\n - '.join(['\nUpdated branches:'] + shorthands)) # this should be the mailing list EMAIL = 'szucs.krisztian@gmail.com' -# currently possible builds, let's be explicit for now -BUILDS = [ - ('conda', Platform.LINUX), - ('conda', Platform.OSX), - ('conda', Platform.WIN), - ('wheel', Platform.LINUX), - ('wheel', Platform.OSX), - ('wheel', Platform.WIN), - ('packages', Platform.LINUX) -] - - @click.command() @click.argument('pattern', required=False) +@click.option('--config', help='Task configuration yml. Defaults to tasks.yml') @click.option('--dry-run/--push', default=False, help='Just display the rendered CI configurations without ' 'submitting them') @click.option('--arrow-repo', default=None, help='Arrow\'s repository path. Defaults to the repository of ' - 'this script', envvar='CROSSBOW_ARROW_REPO') + 'this script') @click.option('--queue-repo', default=None, help='The repository path used for scheduling the tasks. ' - 'Defaults to crossbow directory placed next to arrow', - envvar='CROSSBOW_QUEUE_REPO') -@click.option('--github-token', default=False, envvar='CROSSBOW_GITHUB_TOKEN', + 'Defaults to crossbow directory placed next to arrow') +@click.option('--github-token', default=False, help='Oauth token for Github authentication') -def build(pattern, dry_run, arrow_repo, queue_repo, github_token): +def build(pattern, config, dry_run, arrow_repo, queue_repo, github_token): + if config is None: + config = Path(__file__).absolute().parent / 'tasks.yml' + else: + config = Path(config) + if arrow_repo is None: arrow_repo = Path(__file__).absolute().parents[1] + else: + arrow_repo = Path(arrow_repo) + if queue_repo is None: queue_repo = arrow_repo.parent / 'crossbow' + else: + queue_repo = Path(queue_repo) arrow = Target(arrow_repo, template_directory='cd') queue = Queue(queue_repo) - params = { + variables = { # these should be renamed 'PLAT': 'x86_64', 'EMAIL': EMAIL, @@ -295,8 +289,18 @@ def build(pattern, dry_run, arrow_repo, queue_repo, github_token): 'PYARROW_VERSION': arrow.version, } - for artifact, platform in BUILDS: - build = Build(arrow, artifact, platform, **params) + with config.open() as fp: + tasks = yaml.load(fp)['tasks'] + + for task in tasks: + name = task['name'] + template = config.parent / task['template'] + platform = Platform[task['platform'].upper()] + params = task.get('params') or {} + params.update(variables) + + build = Build(arrow, name=name, platform=platform, template=template, + **params) if pattern is None or re.search(pattern, build.name): if dry_run: @@ -310,4 +314,4 @@ def build(pattern, dry_run, arrow_repo, queue_repo, github_token): if __name__ == '__main__': - build() + build(auto_envvar_prefix='CROSSBOW') diff --git a/cd/tasks.yml b/cd/tasks.yml new file mode 100644 index 000000000000..d94c9425b676 --- /dev/null +++ b/cd/tasks.yml @@ -0,0 +1,34 @@ +tasks: + # conda packages + - name: conda-linux + platform: linux + template: travis-linux-conda.yml + params: + - name: conda-osx + platform: osx + template: travis-osx-conda.yml + params: + - name: conda-win + platform: win + template: appveyor-win-conda.yml + params: + + # python wheels + - name: wheel-linux + platform: linux + template: travis-linux-wheel.yml + params: + - name: wheel-osx + platform: osx + template: travis-osx-wheel.yml + params: + - name: wheel-win + platform: win + template: appveyor-win-wheel.yml + params: + + # linux packages + - name: packages-linux + platform: linux + template: travis-linux-packages.yml + params: From 4ce9e9b89fefc6ce0eb1898b88c93d0e045f9a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 12 May 2018 10:06:45 +0200 Subject: [PATCH 45/60] organize files --- {cd => dev/tasks}/README.md | 6 +++++ .../tasks/conda-recipes/appveyor.yml | 0 .../tasks}/conda-recipes/arrow-cpp/bld.bat | 0 .../tasks}/conda-recipes/arrow-cpp/build.sh | 0 .../tasks}/conda-recipes/arrow-cpp/meta.yaml | 0 .../tasks}/conda-recipes/pyarrow/bld.bat | 0 .../tasks}/conda-recipes/pyarrow/build.sh | 0 .../tasks}/conda-recipes/pyarrow/meta.yaml | 0 .../tasks/conda-recipes/travis.linux.yml | 0 .../tasks/conda-recipes/travis.osx.yml | 0 {cd => dev/tasks}/crossbow.py | 2 +- {cd => dev/tasks}/linux-packages/.gitignore | 0 {cd => dev/tasks}/linux-packages/README.md | 0 {cd => dev/tasks}/linux-packages/Rakefile | 0 {cd => dev/tasks}/linux-packages/apt/build.sh | 0 .../apt/debian-stretch/Dockerfile | 0 .../tasks}/linux-packages/apt/descriptor.json | 0 .../apt/ubuntu-artful/Dockerfile | 0 .../apt/ubuntu-trusty/Dockerfile | 0 .../apt/ubuntu-xenial/Dockerfile | 0 .../debian.ubuntu-trusty/changelog | 0 .../debian.ubuntu-trusty/compat | 0 .../debian.ubuntu-trusty/control | 0 .../debian.ubuntu-trusty/copyright | 0 .../gir1.2-arrow-1.0.install | 0 .../debian.ubuntu-trusty/libarrow-dev.install | 0 .../libarrow-glib-dev.install | 0 .../libarrow-glib-doc.doc-base | 0 .../libarrow-glib-doc.install | 0 .../libarrow-glib-doc.links | 0 .../libarrow-glib0.install | 0 .../libarrow-python0.install | 0 .../debian.ubuntu-trusty/libarrow0.install | 0 .../debian.ubuntu-trusty/patches/series | 0 .../linux-packages/debian.ubuntu-trusty/rules | 0 .../debian.ubuntu-trusty/source/format | 0 .../linux-packages/debian.ubuntu-trusty/watch | 0 .../tasks}/linux-packages/debian/changelog | 0 .../tasks}/linux-packages/debian/compat | 0 .../tasks}/linux-packages/debian/control | 0 .../tasks}/linux-packages/debian/copyright | 0 .../debian/gir1.2-arrow-1.0.install | 0 .../debian/gir1.2-arrow-gpu-1.0.install | 0 .../debian/libarrow-dev.install | 0 .../debian/libarrow-glib-dev.install | 0 .../debian/libarrow-glib-doc.doc-base | 0 .../debian/libarrow-glib-doc.install | 0 .../debian/libarrow-glib-doc.links | 0 .../debian/libarrow-glib0.install | 0 .../debian/libarrow-gpu-dev.install | 0 .../debian/libarrow-gpu-glib-dev.install | 0 .../debian/libarrow-gpu-glib0.install | 0 .../debian/libarrow-gpu0.install | 0 .../debian/libarrow-python-dev.install | 0 .../debian/libarrow-python0.install | 0 .../linux-packages/debian/libarrow0.install | 0 .../linux-packages/debian/patches/series | 0 {cd => dev/tasks}/linux-packages/debian/rules | 0 .../linux-packages/debian/source/format | 0 {cd => dev/tasks}/linux-packages/debian/watch | 0 .../tasks}/linux-packages/package-task.rb | 0 .../tasks/linux-packages/travis.linux.yml | 0 .../tasks}/linux-packages/yum/arrow.spec.in | 0 {cd => dev/tasks}/linux-packages/yum/build.sh | 0 .../linux-packages/yum/centos-6/Dockerfile | 0 .../linux-packages/yum/centos-7/Dockerfile | 0 .../tasks}/linux-packages/yum/descriptor.json | 0 .../tasks/python-wheels/appveyor.yml | 0 {cd => dev/tasks}/python-wheels/osx-build.sh | 0 .../tasks/python-wheels/travis.linux.yml | 0 .../tasks/python-wheels/travis.osx.yml | 0 {cd => dev/tasks}/python-wheels/win-build.bat | 0 {cd => dev/tasks}/tasks.yml | 22 +++++++++---------- 73 files changed, 18 insertions(+), 12 deletions(-) rename {cd => dev/tasks}/README.md (97%) rename cd/appveyor-win-conda.yml => dev/tasks/conda-recipes/appveyor.yml (100%) rename {cd => dev/tasks}/conda-recipes/arrow-cpp/bld.bat (100%) rename {cd => dev/tasks}/conda-recipes/arrow-cpp/build.sh (100%) rename {cd => dev/tasks}/conda-recipes/arrow-cpp/meta.yaml (100%) rename {cd => dev/tasks}/conda-recipes/pyarrow/bld.bat (100%) rename {cd => dev/tasks}/conda-recipes/pyarrow/build.sh (100%) rename {cd => dev/tasks}/conda-recipes/pyarrow/meta.yaml (100%) rename cd/travis-linux-conda.yml => dev/tasks/conda-recipes/travis.linux.yml (100%) rename cd/travis-osx-conda.yml => dev/tasks/conda-recipes/travis.osx.yml (100%) rename {cd => dev/tasks}/crossbow.py (99%) rename {cd => dev/tasks}/linux-packages/.gitignore (100%) rename {cd => dev/tasks}/linux-packages/README.md (100%) rename {cd => dev/tasks}/linux-packages/Rakefile (100%) rename {cd => dev/tasks}/linux-packages/apt/build.sh (100%) rename {cd => dev/tasks}/linux-packages/apt/debian-stretch/Dockerfile (100%) rename {cd => dev/tasks}/linux-packages/apt/descriptor.json (100%) rename {cd => dev/tasks}/linux-packages/apt/ubuntu-artful/Dockerfile (100%) rename {cd => dev/tasks}/linux-packages/apt/ubuntu-trusty/Dockerfile (100%) rename {cd => dev/tasks}/linux-packages/apt/ubuntu-xenial/Dockerfile (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/changelog (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/compat (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/control (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/copyright (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/gir1.2-arrow-1.0.install (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/libarrow-dev.install (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/libarrow-glib-dev.install (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.doc-base (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.install (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.links (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/libarrow-glib0.install (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/libarrow-python0.install (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/libarrow0.install (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/patches/series (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/rules (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/source/format (100%) rename {cd => dev/tasks}/linux-packages/debian.ubuntu-trusty/watch (100%) rename {cd => dev/tasks}/linux-packages/debian/changelog (100%) rename {cd => dev/tasks}/linux-packages/debian/compat (100%) rename {cd => dev/tasks}/linux-packages/debian/control (100%) rename {cd => dev/tasks}/linux-packages/debian/copyright (100%) rename {cd => dev/tasks}/linux-packages/debian/gir1.2-arrow-1.0.install (100%) rename {cd => dev/tasks}/linux-packages/debian/gir1.2-arrow-gpu-1.0.install (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-dev.install (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-glib-dev.install (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-glib-doc.doc-base (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-glib-doc.install (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-glib-doc.links (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-glib0.install (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-gpu-dev.install (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-gpu-glib-dev.install (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-gpu-glib0.install (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-gpu0.install (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-python-dev.install (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow-python0.install (100%) rename {cd => dev/tasks}/linux-packages/debian/libarrow0.install (100%) rename {cd => dev/tasks}/linux-packages/debian/patches/series (100%) rename {cd => dev/tasks}/linux-packages/debian/rules (100%) rename {cd => dev/tasks}/linux-packages/debian/source/format (100%) rename {cd => dev/tasks}/linux-packages/debian/watch (100%) rename {cd => dev/tasks}/linux-packages/package-task.rb (100%) rename cd/travis-linux-packages.yml => dev/tasks/linux-packages/travis.linux.yml (100%) rename {cd => dev/tasks}/linux-packages/yum/arrow.spec.in (100%) rename {cd => dev/tasks}/linux-packages/yum/build.sh (100%) rename {cd => dev/tasks}/linux-packages/yum/centos-6/Dockerfile (100%) rename {cd => dev/tasks}/linux-packages/yum/centos-7/Dockerfile (100%) rename {cd => dev/tasks}/linux-packages/yum/descriptor.json (100%) rename cd/appveyor-win-wheel.yml => dev/tasks/python-wheels/appveyor.yml (100%) rename {cd => dev/tasks}/python-wheels/osx-build.sh (100%) rename cd/travis-linux-wheel.yml => dev/tasks/python-wheels/travis.linux.yml (100%) rename cd/travis-osx-wheel.yml => dev/tasks/python-wheels/travis.osx.yml (100%) rename {cd => dev/tasks}/python-wheels/win-build.bat (100%) rename {cd => dev/tasks}/tasks.yml (50%) diff --git a/cd/README.md b/dev/tasks/README.md similarity index 97% rename from cd/README.md rename to dev/tasks/README.md index 111b33e02801..95b555db320c 100644 --- a/cd/README.md +++ b/dev/tasks/README.md @@ -63,6 +63,12 @@ commit creation and pushing the changes. ```bash conda install -y jinja2 pygit2 click pyyaml ``` + + ```bash + # pygit2 requires libgit2: http://www.pygit2.org/install.html + pip install -y jinja2 pygit2 click pyyaml + ``` + 7. Try running it: ```bash $ python crossbow.py --help diff --git a/cd/appveyor-win-conda.yml b/dev/tasks/conda-recipes/appveyor.yml similarity index 100% rename from cd/appveyor-win-conda.yml rename to dev/tasks/conda-recipes/appveyor.yml diff --git a/cd/conda-recipes/arrow-cpp/bld.bat b/dev/tasks/conda-recipes/arrow-cpp/bld.bat similarity index 100% rename from cd/conda-recipes/arrow-cpp/bld.bat rename to dev/tasks/conda-recipes/arrow-cpp/bld.bat diff --git a/cd/conda-recipes/arrow-cpp/build.sh b/dev/tasks/conda-recipes/arrow-cpp/build.sh similarity index 100% rename from cd/conda-recipes/arrow-cpp/build.sh rename to dev/tasks/conda-recipes/arrow-cpp/build.sh diff --git a/cd/conda-recipes/arrow-cpp/meta.yaml b/dev/tasks/conda-recipes/arrow-cpp/meta.yaml similarity index 100% rename from cd/conda-recipes/arrow-cpp/meta.yaml rename to dev/tasks/conda-recipes/arrow-cpp/meta.yaml diff --git a/cd/conda-recipes/pyarrow/bld.bat b/dev/tasks/conda-recipes/pyarrow/bld.bat similarity index 100% rename from cd/conda-recipes/pyarrow/bld.bat rename to dev/tasks/conda-recipes/pyarrow/bld.bat diff --git a/cd/conda-recipes/pyarrow/build.sh b/dev/tasks/conda-recipes/pyarrow/build.sh similarity index 100% rename from cd/conda-recipes/pyarrow/build.sh rename to dev/tasks/conda-recipes/pyarrow/build.sh diff --git a/cd/conda-recipes/pyarrow/meta.yaml b/dev/tasks/conda-recipes/pyarrow/meta.yaml similarity index 100% rename from cd/conda-recipes/pyarrow/meta.yaml rename to dev/tasks/conda-recipes/pyarrow/meta.yaml diff --git a/cd/travis-linux-conda.yml b/dev/tasks/conda-recipes/travis.linux.yml similarity index 100% rename from cd/travis-linux-conda.yml rename to dev/tasks/conda-recipes/travis.linux.yml diff --git a/cd/travis-osx-conda.yml b/dev/tasks/conda-recipes/travis.osx.yml similarity index 100% rename from cd/travis-osx-conda.yml rename to dev/tasks/conda-recipes/travis.osx.yml diff --git a/cd/crossbow.py b/dev/tasks/crossbow.py similarity index 99% rename from cd/crossbow.py rename to dev/tasks/crossbow.py index 75f76801cdd6..ec4aead17fa6 100755 --- a/cd/crossbow.py +++ b/dev/tasks/crossbow.py @@ -265,7 +265,7 @@ def build(pattern, config, dry_run, arrow_repo, queue_repo, github_token): config = Path(config) if arrow_repo is None: - arrow_repo = Path(__file__).absolute().parents[1] + arrow_repo = Path(__file__).absolute().parents[2] else: arrow_repo = Path(arrow_repo) diff --git a/cd/linux-packages/.gitignore b/dev/tasks/linux-packages/.gitignore similarity index 100% rename from cd/linux-packages/.gitignore rename to dev/tasks/linux-packages/.gitignore diff --git a/cd/linux-packages/README.md b/dev/tasks/linux-packages/README.md similarity index 100% rename from cd/linux-packages/README.md rename to dev/tasks/linux-packages/README.md diff --git a/cd/linux-packages/Rakefile b/dev/tasks/linux-packages/Rakefile similarity index 100% rename from cd/linux-packages/Rakefile rename to dev/tasks/linux-packages/Rakefile diff --git a/cd/linux-packages/apt/build.sh b/dev/tasks/linux-packages/apt/build.sh similarity index 100% rename from cd/linux-packages/apt/build.sh rename to dev/tasks/linux-packages/apt/build.sh diff --git a/cd/linux-packages/apt/debian-stretch/Dockerfile b/dev/tasks/linux-packages/apt/debian-stretch/Dockerfile similarity index 100% rename from cd/linux-packages/apt/debian-stretch/Dockerfile rename to dev/tasks/linux-packages/apt/debian-stretch/Dockerfile diff --git a/cd/linux-packages/apt/descriptor.json b/dev/tasks/linux-packages/apt/descriptor.json similarity index 100% rename from cd/linux-packages/apt/descriptor.json rename to dev/tasks/linux-packages/apt/descriptor.json diff --git a/cd/linux-packages/apt/ubuntu-artful/Dockerfile b/dev/tasks/linux-packages/apt/ubuntu-artful/Dockerfile similarity index 100% rename from cd/linux-packages/apt/ubuntu-artful/Dockerfile rename to dev/tasks/linux-packages/apt/ubuntu-artful/Dockerfile diff --git a/cd/linux-packages/apt/ubuntu-trusty/Dockerfile b/dev/tasks/linux-packages/apt/ubuntu-trusty/Dockerfile similarity index 100% rename from cd/linux-packages/apt/ubuntu-trusty/Dockerfile rename to dev/tasks/linux-packages/apt/ubuntu-trusty/Dockerfile diff --git a/cd/linux-packages/apt/ubuntu-xenial/Dockerfile b/dev/tasks/linux-packages/apt/ubuntu-xenial/Dockerfile similarity index 100% rename from cd/linux-packages/apt/ubuntu-xenial/Dockerfile rename to dev/tasks/linux-packages/apt/ubuntu-xenial/Dockerfile diff --git a/cd/linux-packages/debian.ubuntu-trusty/changelog b/dev/tasks/linux-packages/debian.ubuntu-trusty/changelog similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/changelog rename to dev/tasks/linux-packages/debian.ubuntu-trusty/changelog diff --git a/cd/linux-packages/debian.ubuntu-trusty/compat b/dev/tasks/linux-packages/debian.ubuntu-trusty/compat similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/compat rename to dev/tasks/linux-packages/debian.ubuntu-trusty/compat diff --git a/cd/linux-packages/debian.ubuntu-trusty/control b/dev/tasks/linux-packages/debian.ubuntu-trusty/control similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/control rename to dev/tasks/linux-packages/debian.ubuntu-trusty/control diff --git a/cd/linux-packages/debian.ubuntu-trusty/copyright b/dev/tasks/linux-packages/debian.ubuntu-trusty/copyright similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/copyright rename to dev/tasks/linux-packages/debian.ubuntu-trusty/copyright diff --git a/cd/linux-packages/debian.ubuntu-trusty/gir1.2-arrow-1.0.install b/dev/tasks/linux-packages/debian.ubuntu-trusty/gir1.2-arrow-1.0.install similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/gir1.2-arrow-1.0.install rename to dev/tasks/linux-packages/debian.ubuntu-trusty/gir1.2-arrow-1.0.install diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-dev.install b/dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-dev.install similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/libarrow-dev.install rename to dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-dev.install diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-dev.install b/dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-dev.install similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-dev.install rename to dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-dev.install diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.doc-base b/dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.doc-base similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.doc-base rename to dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.doc-base diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.install b/dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.install similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.install rename to dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.install diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.links b/dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.links similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.links rename to dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.links diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-glib0.install b/dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib0.install similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/libarrow-glib0.install rename to dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib0.install diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow-python0.install b/dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-python0.install similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/libarrow-python0.install rename to dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-python0.install diff --git a/cd/linux-packages/debian.ubuntu-trusty/libarrow0.install b/dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow0.install similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/libarrow0.install rename to dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow0.install diff --git a/cd/linux-packages/debian.ubuntu-trusty/patches/series b/dev/tasks/linux-packages/debian.ubuntu-trusty/patches/series similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/patches/series rename to dev/tasks/linux-packages/debian.ubuntu-trusty/patches/series diff --git a/cd/linux-packages/debian.ubuntu-trusty/rules b/dev/tasks/linux-packages/debian.ubuntu-trusty/rules similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/rules rename to dev/tasks/linux-packages/debian.ubuntu-trusty/rules diff --git a/cd/linux-packages/debian.ubuntu-trusty/source/format b/dev/tasks/linux-packages/debian.ubuntu-trusty/source/format similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/source/format rename to dev/tasks/linux-packages/debian.ubuntu-trusty/source/format diff --git a/cd/linux-packages/debian.ubuntu-trusty/watch b/dev/tasks/linux-packages/debian.ubuntu-trusty/watch similarity index 100% rename from cd/linux-packages/debian.ubuntu-trusty/watch rename to dev/tasks/linux-packages/debian.ubuntu-trusty/watch diff --git a/cd/linux-packages/debian/changelog b/dev/tasks/linux-packages/debian/changelog similarity index 100% rename from cd/linux-packages/debian/changelog rename to dev/tasks/linux-packages/debian/changelog diff --git a/cd/linux-packages/debian/compat b/dev/tasks/linux-packages/debian/compat similarity index 100% rename from cd/linux-packages/debian/compat rename to dev/tasks/linux-packages/debian/compat diff --git a/cd/linux-packages/debian/control b/dev/tasks/linux-packages/debian/control similarity index 100% rename from cd/linux-packages/debian/control rename to dev/tasks/linux-packages/debian/control diff --git a/cd/linux-packages/debian/copyright b/dev/tasks/linux-packages/debian/copyright similarity index 100% rename from cd/linux-packages/debian/copyright rename to dev/tasks/linux-packages/debian/copyright diff --git a/cd/linux-packages/debian/gir1.2-arrow-1.0.install b/dev/tasks/linux-packages/debian/gir1.2-arrow-1.0.install similarity index 100% rename from cd/linux-packages/debian/gir1.2-arrow-1.0.install rename to dev/tasks/linux-packages/debian/gir1.2-arrow-1.0.install diff --git a/cd/linux-packages/debian/gir1.2-arrow-gpu-1.0.install b/dev/tasks/linux-packages/debian/gir1.2-arrow-gpu-1.0.install similarity index 100% rename from cd/linux-packages/debian/gir1.2-arrow-gpu-1.0.install rename to dev/tasks/linux-packages/debian/gir1.2-arrow-gpu-1.0.install diff --git a/cd/linux-packages/debian/libarrow-dev.install b/dev/tasks/linux-packages/debian/libarrow-dev.install similarity index 100% rename from cd/linux-packages/debian/libarrow-dev.install rename to dev/tasks/linux-packages/debian/libarrow-dev.install diff --git a/cd/linux-packages/debian/libarrow-glib-dev.install b/dev/tasks/linux-packages/debian/libarrow-glib-dev.install similarity index 100% rename from cd/linux-packages/debian/libarrow-glib-dev.install rename to dev/tasks/linux-packages/debian/libarrow-glib-dev.install diff --git a/cd/linux-packages/debian/libarrow-glib-doc.doc-base b/dev/tasks/linux-packages/debian/libarrow-glib-doc.doc-base similarity index 100% rename from cd/linux-packages/debian/libarrow-glib-doc.doc-base rename to dev/tasks/linux-packages/debian/libarrow-glib-doc.doc-base diff --git a/cd/linux-packages/debian/libarrow-glib-doc.install b/dev/tasks/linux-packages/debian/libarrow-glib-doc.install similarity index 100% rename from cd/linux-packages/debian/libarrow-glib-doc.install rename to dev/tasks/linux-packages/debian/libarrow-glib-doc.install diff --git a/cd/linux-packages/debian/libarrow-glib-doc.links b/dev/tasks/linux-packages/debian/libarrow-glib-doc.links similarity index 100% rename from cd/linux-packages/debian/libarrow-glib-doc.links rename to dev/tasks/linux-packages/debian/libarrow-glib-doc.links diff --git a/cd/linux-packages/debian/libarrow-glib0.install b/dev/tasks/linux-packages/debian/libarrow-glib0.install similarity index 100% rename from cd/linux-packages/debian/libarrow-glib0.install rename to dev/tasks/linux-packages/debian/libarrow-glib0.install diff --git a/cd/linux-packages/debian/libarrow-gpu-dev.install b/dev/tasks/linux-packages/debian/libarrow-gpu-dev.install similarity index 100% rename from cd/linux-packages/debian/libarrow-gpu-dev.install rename to dev/tasks/linux-packages/debian/libarrow-gpu-dev.install diff --git a/cd/linux-packages/debian/libarrow-gpu-glib-dev.install b/dev/tasks/linux-packages/debian/libarrow-gpu-glib-dev.install similarity index 100% rename from cd/linux-packages/debian/libarrow-gpu-glib-dev.install rename to dev/tasks/linux-packages/debian/libarrow-gpu-glib-dev.install diff --git a/cd/linux-packages/debian/libarrow-gpu-glib0.install b/dev/tasks/linux-packages/debian/libarrow-gpu-glib0.install similarity index 100% rename from cd/linux-packages/debian/libarrow-gpu-glib0.install rename to dev/tasks/linux-packages/debian/libarrow-gpu-glib0.install diff --git a/cd/linux-packages/debian/libarrow-gpu0.install b/dev/tasks/linux-packages/debian/libarrow-gpu0.install similarity index 100% rename from cd/linux-packages/debian/libarrow-gpu0.install rename to dev/tasks/linux-packages/debian/libarrow-gpu0.install diff --git a/cd/linux-packages/debian/libarrow-python-dev.install b/dev/tasks/linux-packages/debian/libarrow-python-dev.install similarity index 100% rename from cd/linux-packages/debian/libarrow-python-dev.install rename to dev/tasks/linux-packages/debian/libarrow-python-dev.install diff --git a/cd/linux-packages/debian/libarrow-python0.install b/dev/tasks/linux-packages/debian/libarrow-python0.install similarity index 100% rename from cd/linux-packages/debian/libarrow-python0.install rename to dev/tasks/linux-packages/debian/libarrow-python0.install diff --git a/cd/linux-packages/debian/libarrow0.install b/dev/tasks/linux-packages/debian/libarrow0.install similarity index 100% rename from cd/linux-packages/debian/libarrow0.install rename to dev/tasks/linux-packages/debian/libarrow0.install diff --git a/cd/linux-packages/debian/patches/series b/dev/tasks/linux-packages/debian/patches/series similarity index 100% rename from cd/linux-packages/debian/patches/series rename to dev/tasks/linux-packages/debian/patches/series diff --git a/cd/linux-packages/debian/rules b/dev/tasks/linux-packages/debian/rules similarity index 100% rename from cd/linux-packages/debian/rules rename to dev/tasks/linux-packages/debian/rules diff --git a/cd/linux-packages/debian/source/format b/dev/tasks/linux-packages/debian/source/format similarity index 100% rename from cd/linux-packages/debian/source/format rename to dev/tasks/linux-packages/debian/source/format diff --git a/cd/linux-packages/debian/watch b/dev/tasks/linux-packages/debian/watch similarity index 100% rename from cd/linux-packages/debian/watch rename to dev/tasks/linux-packages/debian/watch diff --git a/cd/linux-packages/package-task.rb b/dev/tasks/linux-packages/package-task.rb similarity index 100% rename from cd/linux-packages/package-task.rb rename to dev/tasks/linux-packages/package-task.rb diff --git a/cd/travis-linux-packages.yml b/dev/tasks/linux-packages/travis.linux.yml similarity index 100% rename from cd/travis-linux-packages.yml rename to dev/tasks/linux-packages/travis.linux.yml diff --git a/cd/linux-packages/yum/arrow.spec.in b/dev/tasks/linux-packages/yum/arrow.spec.in similarity index 100% rename from cd/linux-packages/yum/arrow.spec.in rename to dev/tasks/linux-packages/yum/arrow.spec.in diff --git a/cd/linux-packages/yum/build.sh b/dev/tasks/linux-packages/yum/build.sh similarity index 100% rename from cd/linux-packages/yum/build.sh rename to dev/tasks/linux-packages/yum/build.sh diff --git a/cd/linux-packages/yum/centos-6/Dockerfile b/dev/tasks/linux-packages/yum/centos-6/Dockerfile similarity index 100% rename from cd/linux-packages/yum/centos-6/Dockerfile rename to dev/tasks/linux-packages/yum/centos-6/Dockerfile diff --git a/cd/linux-packages/yum/centos-7/Dockerfile b/dev/tasks/linux-packages/yum/centos-7/Dockerfile similarity index 100% rename from cd/linux-packages/yum/centos-7/Dockerfile rename to dev/tasks/linux-packages/yum/centos-7/Dockerfile diff --git a/cd/linux-packages/yum/descriptor.json b/dev/tasks/linux-packages/yum/descriptor.json similarity index 100% rename from cd/linux-packages/yum/descriptor.json rename to dev/tasks/linux-packages/yum/descriptor.json diff --git a/cd/appveyor-win-wheel.yml b/dev/tasks/python-wheels/appveyor.yml similarity index 100% rename from cd/appveyor-win-wheel.yml rename to dev/tasks/python-wheels/appveyor.yml diff --git a/cd/python-wheels/osx-build.sh b/dev/tasks/python-wheels/osx-build.sh similarity index 100% rename from cd/python-wheels/osx-build.sh rename to dev/tasks/python-wheels/osx-build.sh diff --git a/cd/travis-linux-wheel.yml b/dev/tasks/python-wheels/travis.linux.yml similarity index 100% rename from cd/travis-linux-wheel.yml rename to dev/tasks/python-wheels/travis.linux.yml diff --git a/cd/travis-osx-wheel.yml b/dev/tasks/python-wheels/travis.osx.yml similarity index 100% rename from cd/travis-osx-wheel.yml rename to dev/tasks/python-wheels/travis.osx.yml diff --git a/cd/python-wheels/win-build.bat b/dev/tasks/python-wheels/win-build.bat similarity index 100% rename from cd/python-wheels/win-build.bat rename to dev/tasks/python-wheels/win-build.bat diff --git a/cd/tasks.yml b/dev/tasks/tasks.yml similarity index 50% rename from cd/tasks.yml rename to dev/tasks/tasks.yml index d94c9425b676..56699a190fe2 100644 --- a/cd/tasks.yml +++ b/dev/tasks/tasks.yml @@ -2,33 +2,33 @@ tasks: # conda packages - name: conda-linux platform: linux - template: travis-linux-conda.yml + template: conda-recipes/travis.linux.yml params: - name: conda-osx platform: osx - template: travis-osx-conda.yml + template: conda-recipes/travis.osx.yml params: - name: conda-win platform: win - template: appveyor-win-conda.yml + template: conda-recipes/appveyor.yml params: # python wheels - - name: wheel-linux + - name: python-wheel-linux platform: linux - template: travis-linux-wheel.yml + template: python-wheels/travis.linux.yml params: - - name: wheel-osx + - name: python-wheel-osx platform: osx - template: travis-osx-wheel.yml + template: python-wheels/travis.osx.yml params: - - name: wheel-win + - name: python-wheel-win platform: win - template: appveyor-win-wheel.yml + template: python-wheels/appveyor.yml params: # linux packages - - name: packages-linux + - name: linux-packages platform: linux - template: travis-linux-packages.yml + template: linux-packages/travis.linux.yml params: From 3d36fef3a534fb4891b92a5c34672a8fe1af64ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 12 May 2018 11:29:13 +0200 Subject: [PATCH 46/60] fixes paths --- dev/tasks/conda-recipes/appveyor.yml | 2 +- dev/tasks/linux-packages/travis.linux.yml | 6 +++--- dev/tasks/python-wheels/appveyor.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/tasks/conda-recipes/appveyor.yml b/dev/tasks/conda-recipes/appveyor.yml index 7e942ec1207c..61d32d5b3034 100644 --- a/dev/tasks/conda-recipes/appveyor.yml +++ b/dev/tasks/conda-recipes/appveyor.yml @@ -24,7 +24,7 @@ environment: CONDA_PY: 36 CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 ARROW_SRC: C:\apache-arrow - ARROW_VERSION={{ ARROW_VERSION }} + ARROW_VERSION: {{ ARROW_VERSION }} install: - cmd: rmdir C:\cygwin /s /q diff --git a/dev/tasks/linux-packages/travis.linux.yml b/dev/tasks/linux-packages/travis.linux.yml index 922808462f4c..afab39471c92 100644 --- a/dev/tasks/linux-packages/travis.linux.yml +++ b/dev/tasks/linux-packages/travis.linux.yml @@ -29,11 +29,11 @@ env: matrix: include: - script: - - (cd arrow/cd/linux-packages && travis_wait 40 rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no) + - (cd arrow/dev/tasks/linux-packages && travis_wait 40 rake apt:build APT_TARGETS=debian-stretch,ubuntu-trusty,ubuntu-xenial PARALLEL=yes DEBUG=no) - script: - - (cd arrow/cd/linux-packages && travis_wait 40 rake apt:build APT_TARGETS=ubuntu-artful PARALLEL=yes DEBUG=no) + - (cd arrow/dev/tasks/linux-packages && travis_wait 40 rake apt:build APT_TARGETS=ubuntu-artful PARALLEL=yes DEBUG=no) - script: - - (cd arrow/cd/linux-packages && rake yum:build PARALLEL=yes DEBUG=no) + - (cd arrow/dev/tasks/linux-packages && rake yum:build PARALLEL=yes DEBUG=no) before_install: - sudo apt update -y -qq diff --git a/dev/tasks/python-wheels/appveyor.yml b/dev/tasks/python-wheels/appveyor.yml index be60c2ea0d26..3bd1804832f6 100644 --- a/dev/tasks/python-wheels/appveyor.yml +++ b/dev/tasks/python-wheels/appveyor.yml @@ -44,7 +44,7 @@ build_script: - mkdir wheels - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} %ARROW_SRC% || exit /B - git -C arrow checkout {{ ARROW_SHA }} || exit /B - - call %ARROW_SRC%\cd\python-wheels\win-build.bat + - call %ARROW_SRC%\dev\tasks\python-wheels\win-build.bat after_build: xcopy %ARROW_SRC%\python\dist\* wheels\ From 5cf971c777fe47605581eb60c615d636967064ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 12 May 2018 12:11:03 +0200 Subject: [PATCH 47/60] resolve review issues --- dev/tasks/README.md | 9 +++++---- dev/tasks/conda-recipes/appveyor.yml | 2 +- dev/tasks/crossbow.py | 18 ++++++++++-------- dev/tasks/linux-packages/Rakefile | 2 +- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/dev/tasks/README.md b/dev/tasks/README.md index 95b555db320c..601b0a3d44f8 100644 --- a/dev/tasks/README.md +++ b/dev/tasks/README.md @@ -21,15 +21,16 @@ Individual jobs are executed on public CI services, currently: ### Queue -Because of the nature of how the CI services work, the scheduling of jobs +Because of the nature of how the CI services work, the scheduling of jobs happens through an additional git repository, which acts like a job queue for the tasks. A job is a git commit on a particular git branch, containing only the required -configuration file to run the CI build (currently `.travis.yml` or `appveyor.yml`). +configuration file to run the requested build (currently `.travis.yml` or +`appveyor.yml`). ### Scheduler -[Crossbow.py](crossbow.py) handles the versioning, configuration rendering, git -commit creation and pushing the changes. +[Crossbow.py](crossbow.py) handles version generation, task rendering and +submission. The tasks are defined in `tasks.yml` ## Install diff --git a/dev/tasks/conda-recipes/appveyor.yml b/dev/tasks/conda-recipes/appveyor.yml index 61d32d5b3034..38c1e96bde99 100644 --- a/dev/tasks/conda-recipes/appveyor.yml +++ b/dev/tasks/conda-recipes/appveyor.yml @@ -47,7 +47,7 @@ build: off test_script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} %ARROW_SRC% || exit /B - git checkout {{ ARROW_SHA }} || exit /B - - pushd %ARROW_SRC%\cd\conda-recipes + - pushd %ARROW_SRC%\dev\tasks\conda-recipes - conda.exe build arrow-cpp pyarrow diff --git a/dev/tasks/crossbow.py b/dev/tasks/crossbow.py index ec4aead17fa6..fb403b9cb9e7 100755 --- a/dev/tasks/crossbow.py +++ b/dev/tasks/crossbow.py @@ -20,6 +20,7 @@ import re import sys import yaml +import time import click import pygit2 import logging @@ -27,7 +28,6 @@ from enum import Enum from pathlib import Path from textwrap import dedent -from datetime import datetime from jinja2 import Template from setuptools_scm import get_version @@ -36,7 +36,7 @@ level=logging.INFO, format="[%(asctime)s] %(levelname)s Crossbow %(message)s", datefmt="%H:%M:%S", - stream=sys.stdout + stream=click.get_text_stream('stdout') ) @@ -210,7 +210,8 @@ def put(self, build): tree_id = self._create_tree(build.config_files()) # creating the new commit - timestamp = (datetime.now() - datetime(1970, 1, 1)).total_seconds() + timestamp = int(time.time()) + name = next(self.repo.config.get_multivar('user.name')) email = next(self.repo.config.get_multivar('user.email')) @@ -241,11 +242,11 @@ def push(self, token): # this should be the mailing list -EMAIL = 'szucs.krisztian@gmail.com' +MESSAGE_EMAIL = 'szucs.krisztian@gmail.com' @click.command() -@click.argument('pattern', required=False) +@click.argument('task-regex', required=False) @click.option('--config', help='Task configuration yml. Defaults to tasks.yml') @click.option('--dry-run/--push', default=False, help='Just display the rendered CI configurations without ' @@ -258,7 +259,7 @@ def push(self, token): 'Defaults to crossbow directory placed next to arrow') @click.option('--github-token', default=False, help='Oauth token for Github authentication') -def build(pattern, config, dry_run, arrow_repo, queue_repo, github_token): +def build(task_regex, config, dry_run, arrow_repo, queue_repo, github_token): if config is None: config = Path(__file__).absolute().parent / 'tasks.yml' else: @@ -280,7 +281,7 @@ def build(pattern, config, dry_run, arrow_repo, queue_repo, github_token): variables = { # these should be renamed 'PLAT': 'x86_64', - 'EMAIL': EMAIL, + 'EMAIL': MESSAGE_EMAIL, 'BUILD_REF': arrow.sha, 'ARROW_SHA': arrow.sha, 'ARROW_REPO': arrow.origin.url, @@ -302,7 +303,8 @@ def build(pattern, config, dry_run, arrow_repo, queue_repo, github_token): build = Build(arrow, name=name, platform=platform, template=template, **params) - if pattern is None or re.search(pattern, build.name): + # Regex pattern the task name is matched against + if task_regex is None or re.search(task_regex, build.name): if dry_run: logging.info('{}\n\n{}'.format(build.name, build.render())) else: diff --git a/dev/tasks/linux-packages/Rakefile b/dev/tasks/linux-packages/Rakefile index 0279e891b43d..1dec2d7cb39c 100644 --- a/dev/tasks/linux-packages/Rakefile +++ b/dev/tasks/linux-packages/Rakefile @@ -28,7 +28,7 @@ class ApacheArrowPackageTask < PackageTask private def arrow_source_dir - File.join(File.dirname(__FILE__), "..", "..") + File.join(File.dirname(__FILE__), "..", "..", "..") end def detect_version(release_time) From 26467349690eb452febb7f7929b6138a31d62e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Wed, 16 May 2018 18:40:19 +0200 Subject: [PATCH 48/60] license headers for conda recipes --- dev/tasks/conda-recipes/arrow-cpp/bld.bat | 52 +++++++++++++------- dev/tasks/conda-recipes/arrow-cpp/build.sh | 16 +++++++ dev/tasks/conda-recipes/pyarrow/bld.bat | 56 ++++++++++++++-------- dev/tasks/conda-recipes/pyarrow/build.sh | 16 +++++++ 4 files changed, 102 insertions(+), 38 deletions(-) diff --git a/dev/tasks/conda-recipes/arrow-cpp/bld.bat b/dev/tasks/conda-recipes/arrow-cpp/bld.bat index ad3ac293cb70..5469491f829e 100644 --- a/dev/tasks/conda-recipes/arrow-cpp/bld.bat +++ b/dev/tasks/conda-recipes/arrow-cpp/bld.bat @@ -1,18 +1,34 @@ -mkdir "%SRC_DIR%"\cpp\build -pushd "%SRC_DIR%"\cpp\build - -set ARROW_BUILD_TOOLCHAIN=%LIBRARY_PREFIX% - -cmake -G "%CMAKE_GENERATOR%" ^ - -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ - -DARROW_BOOST_USE_SHARED:BOOL=ON ^ - -DARROW_BUILD_TESTS:BOOL=OFF ^ - -DARROW_BUILD_UTILITIES:BOOL=OFF ^ - -DCMAKE_BUILD_TYPE=release ^ - -DARROW_PYTHON:BOOL=ON ^ - -DARROW_ORC:BOOL=ON ^ - .. - -cmake --build . --target INSTALL --config Release - -popd +rem Licensed to the Apache Software Foundation (ASF) under one +rem or more contributor license agreements. See the NOTICE file +rem distributed with this work for additional information +rem regarding copyright ownership. The ASF licenses this file +rem to you under the Apache License, Version 2.0 (the +rem "License"); you may not use this file except in compliance +rem with the License. You may obtain a copy of the License at +rem +rem http://www.apache.org/licenses/LICENSE-2.0 +rem +rem Unless required by applicable law or agreed to in writing, +rem software distributed under the License is distributed on an +rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +rem KIND, either express or implied. See the License for the +rem specific language governing permissions and limitations +rem under the License. +mkdir "%SRC_DIR%"\cpp\build +pushd "%SRC_DIR%"\cpp\build + +set ARROW_BUILD_TOOLCHAIN=%LIBRARY_PREFIX% + +cmake -G "%CMAKE_GENERATOR%" ^ + -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ + -DARROW_BOOST_USE_SHARED:BOOL=ON ^ + -DARROW_BUILD_TESTS:BOOL=OFF ^ + -DARROW_BUILD_UTILITIES:BOOL=OFF ^ + -DCMAKE_BUILD_TYPE=release ^ + -DARROW_PYTHON:BOOL=ON ^ + -DARROW_ORC:BOOL=ON ^ + .. + +cmake --build . --target INSTALL --config Release + +popd diff --git a/dev/tasks/conda-recipes/arrow-cpp/build.sh b/dev/tasks/conda-recipes/arrow-cpp/build.sh index c69adfb582a0..af9c57a36e7a 100644 --- a/dev/tasks/conda-recipes/arrow-cpp/build.sh +++ b/dev/tasks/conda-recipes/arrow-cpp/build.sh @@ -1,4 +1,20 @@ #!/bin/bash +# 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. set -e set -x diff --git a/dev/tasks/conda-recipes/pyarrow/bld.bat b/dev/tasks/conda-recipes/pyarrow/bld.bat index af8d1a62260a..e294b489e85d 100644 --- a/dev/tasks/conda-recipes/pyarrow/bld.bat +++ b/dev/tasks/conda-recipes/pyarrow/bld.bat @@ -1,20 +1,36 @@ -pushd "%SRC_DIR%"\python - -@rem the symlinks for cmake modules don't work here -del cmake_modules\BuildUtils.cmake -del cmake_modules\SetupCxxFlags.cmake -del cmake_modules\CompilerInfo.cmake -del cmake_modules\FindNumPy.cmake -del cmake_modules\FindPythonLibsNew.cmake -copy /Y "%SRC_DIR%\cpp\cmake_modules\BuildUtils.cmake" cmake_modules\ -copy /Y "%SRC_DIR%\cpp\cmake_modules\SetupCxxFlags.cmake" cmake_modules\ -copy /Y "%SRC_DIR%\cpp\cmake_modules\CompilerInfo.cmake" cmake_modules\ -copy /Y "%SRC_DIR%\cpp\cmake_modules\FindNumPy.cmake" cmake_modules\ -copy /Y "%SRC_DIR%\cpp\cmake_modules\FindPythonLibsNew.cmake" cmake_modules\ - -SET ARROW_HOME=%LIBRARY_PREFIX% -"%PYTHON%" setup.py ^ - build_ext --build-type=release --with-parquet ^ - install --single-version-externally-managed --record=record.txt -if errorlevel 1 exit 1 -popd +rem Licensed to the Apache Software Foundation (ASF) under one +rem or more contributor license agreements. See the NOTICE file +rem distributed with this work for additional information +rem regarding copyright ownership. The ASF licenses this file +rem to you under the Apache License, Version 2.0 (the +rem "License"); you may not use this file except in compliance +rem with the License. You may obtain a copy of the License at +rem +rem http://www.apache.org/licenses/LICENSE-2.0 +rem +rem Unless required by applicable law or agreed to in writing, +rem software distributed under the License is distributed on an +rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +rem KIND, either express or implied. See the License for the +rem specific language governing permissions and limitations +rem under the License. +pushd "%SRC_DIR%"\python + +@rem the symlinks for cmake modules don't work here +del cmake_modules\BuildUtils.cmake +del cmake_modules\SetupCxxFlags.cmake +del cmake_modules\CompilerInfo.cmake +del cmake_modules\FindNumPy.cmake +del cmake_modules\FindPythonLibsNew.cmake +copy /Y "%SRC_DIR%\cpp\cmake_modules\BuildUtils.cmake" cmake_modules\ +copy /Y "%SRC_DIR%\cpp\cmake_modules\SetupCxxFlags.cmake" cmake_modules\ +copy /Y "%SRC_DIR%\cpp\cmake_modules\CompilerInfo.cmake" cmake_modules\ +copy /Y "%SRC_DIR%\cpp\cmake_modules\FindNumPy.cmake" cmake_modules\ +copy /Y "%SRC_DIR%\cpp\cmake_modules\FindPythonLibsNew.cmake" cmake_modules\ + +SET ARROW_HOME=%LIBRARY_PREFIX% +"%PYTHON%" setup.py ^ + build_ext --build-type=release --with-parquet ^ + install --single-version-externally-managed --record=record.txt +if errorlevel 1 exit 1 +popd diff --git a/dev/tasks/conda-recipes/pyarrow/build.sh b/dev/tasks/conda-recipes/pyarrow/build.sh index b6bfba6a41c7..3a52be9d1b4d 100644 --- a/dev/tasks/conda-recipes/pyarrow/build.sh +++ b/dev/tasks/conda-recipes/pyarrow/build.sh @@ -1,4 +1,20 @@ #!/bin/bash +# 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. set -e set -x From 6a49d51eda3381ef6aa01be7ce2a8175476a220e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Thu, 17 May 2018 12:23:22 +0200 Subject: [PATCH 49/60] license headers --- dev/tasks/README.md | 19 +++++++++++- dev/tasks/conda-recipes/arrow-cpp/bld.bat | 33 +++++++++++---------- dev/tasks/conda-recipes/arrow-cpp/build.sh | 7 +++-- dev/tasks/conda-recipes/arrow-cpp/meta.yaml | 17 +++++++++++ dev/tasks/conda-recipes/pyarrow/bld.bat | 33 +++++++++++---------- dev/tasks/conda-recipes/pyarrow/build.sh | 7 +++-- dev/tasks/conda-recipes/pyarrow/meta.yaml | 17 +++++++++++ dev/tasks/python-wheels/travis.linux.yml | 13 ++++---- dev/tasks/python-wheels/travis.osx.yml | 13 ++++---- dev/tasks/tasks.yml | 17 +++++++++++ 10 files changed, 123 insertions(+), 53 deletions(-) diff --git a/dev/tasks/README.md b/dev/tasks/README.md index 601b0a3d44f8..91c8dcdce1ef 100644 --- a/dev/tasks/README.md +++ b/dev/tasks/README.md @@ -1,3 +1,21 @@ + + # Arrow Packaging The content of this directory aims for automating the historically error prone @@ -188,4 +206,3 @@ Version: 0.9.1.dev48+g810a7188.d20180414 Pushed branches: - travis-linux-conda ``` - diff --git a/dev/tasks/conda-recipes/arrow-cpp/bld.bat b/dev/tasks/conda-recipes/arrow-cpp/bld.bat index 5469491f829e..5356a46f020d 100644 --- a/dev/tasks/conda-recipes/arrow-cpp/bld.bat +++ b/dev/tasks/conda-recipes/arrow-cpp/bld.bat @@ -1,19 +1,20 @@ -rem Licensed to the Apache Software Foundation (ASF) under one -rem or more contributor license agreements. See the NOTICE file -rem distributed with this work for additional information -rem regarding copyright ownership. The ASF licenses this file -rem to you under the Apache License, Version 2.0 (the -rem "License"); you may not use this file except in compliance -rem with the License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, -rem software distributed under the License is distributed on an -rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -rem KIND, either express or implied. See the License for the -rem specific language governing permissions and limitations -rem under the License. +@rem Licensed to the Apache Software Foundation (ASF) under one +@rem or more contributor license agreements. See the NOTICE file +@rem distributed with this work for additional information +@rem regarding copyright ownership. The ASF licenses this file +@rem to you under the Apache License, Version 2.0 (the +@rem "License"); you may not use this file except in compliance +@rem with the License. You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, +@rem software distributed under the License is distributed on an +@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@rem KIND, either express or implied. See the License for the +@rem specific language governing permissions and limitations +@rem under the License. + mkdir "%SRC_DIR%"\cpp\build pushd "%SRC_DIR%"\cpp\build diff --git a/dev/tasks/conda-recipes/arrow-cpp/build.sh b/dev/tasks/conda-recipes/arrow-cpp/build.sh index af9c57a36e7a..7ec43cc7fe8f 100644 --- a/dev/tasks/conda-recipes/arrow-cpp/build.sh +++ b/dev/tasks/conda-recipes/arrow-cpp/build.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/bin/sh + # 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 @@ -6,9 +7,9 @@ # 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 diff --git a/dev/tasks/conda-recipes/arrow-cpp/meta.yaml b/dev/tasks/conda-recipes/arrow-cpp/meta.yaml index d3855c02f1db..43ebd9ab3c85 100644 --- a/dev/tasks/conda-recipes/arrow-cpp/meta.yaml +++ b/dev/tasks/conda-recipes/arrow-cpp/meta.yaml @@ -1,3 +1,20 @@ +# 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. + package: name: arrow-cpp version: {{ ARROW_VERSION }} diff --git a/dev/tasks/conda-recipes/pyarrow/bld.bat b/dev/tasks/conda-recipes/pyarrow/bld.bat index e294b489e85d..8243bb8baa34 100644 --- a/dev/tasks/conda-recipes/pyarrow/bld.bat +++ b/dev/tasks/conda-recipes/pyarrow/bld.bat @@ -1,19 +1,20 @@ -rem Licensed to the Apache Software Foundation (ASF) under one -rem or more contributor license agreements. See the NOTICE file -rem distributed with this work for additional information -rem regarding copyright ownership. The ASF licenses this file -rem to you under the Apache License, Version 2.0 (the -rem "License"); you may not use this file except in compliance -rem with the License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, -rem software distributed under the License is distributed on an -rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -rem KIND, either express or implied. See the License for the -rem specific language governing permissions and limitations -rem under the License. +@rem Licensed to the Apache Software Foundation (ASF) under one +@rem or more contributor license agreements. See the NOTICE file +@rem distributed with this work for additional information +@rem regarding copyright ownership. The ASF licenses this file +@rem to you under the Apache License, Version 2.0 (the +@rem "License"); you may not use this file except in compliance +@rem with the License. You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, +@rem software distributed under the License is distributed on an +@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@rem KIND, either express or implied. See the License for the +@rem specific language governing permissions and limitations +@rem under the License. + pushd "%SRC_DIR%"\python @rem the symlinks for cmake modules don't work here diff --git a/dev/tasks/conda-recipes/pyarrow/build.sh b/dev/tasks/conda-recipes/pyarrow/build.sh index 3a52be9d1b4d..93f155a6cd82 100644 --- a/dev/tasks/conda-recipes/pyarrow/build.sh +++ b/dev/tasks/conda-recipes/pyarrow/build.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/bin/sh + # 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 @@ -6,9 +7,9 @@ # 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 diff --git a/dev/tasks/conda-recipes/pyarrow/meta.yaml b/dev/tasks/conda-recipes/pyarrow/meta.yaml index 249b14b81066..3f229617435b 100644 --- a/dev/tasks/conda-recipes/pyarrow/meta.yaml +++ b/dev/tasks/conda-recipes/pyarrow/meta.yaml @@ -1,3 +1,20 @@ +# 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. + package: name: pyarrow version: {{ ARROW_VERSION }} diff --git a/dev/tasks/python-wheels/travis.linux.yml b/dev/tasks/python-wheels/travis.linux.yml index b7b535ac49cf..8f2435cec4e3 100644 --- a/dev/tasks/python-wheels/travis.linux.yml +++ b/dev/tasks/python-wheels/travis.linux.yml @@ -6,14 +6,13 @@ # "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 +# 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. +# 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. env: global: diff --git a/dev/tasks/python-wheels/travis.osx.yml b/dev/tasks/python-wheels/travis.osx.yml index 001b4d5b0d16..2b6b52884c5a 100644 --- a/dev/tasks/python-wheels/travis.osx.yml +++ b/dev/tasks/python-wheels/travis.osx.yml @@ -6,14 +6,13 @@ # "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 +# 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. +# 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: osx sudo: required diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 56699a190fe2..890c00edd3e8 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -1,3 +1,20 @@ +# 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. + tasks: # conda packages - name: conda-linux From 45a713874a7524db68d5e60497281ed242cf1c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Thu, 24 May 2018 13:14:24 +0200 Subject: [PATCH 50/60] fix review issues --- dev/tasks/README.md | 14 +++++++------- dev/tasks/crossbow.py | 16 +++++++++------- dev/tasks/python-wheels/travis.osx.yml | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/dev/tasks/README.md b/dev/tasks/README.md index 91c8dcdce1ef..f1f0128f03b6 100644 --- a/dev/tasks/README.md +++ b/dev/tasks/README.md @@ -105,7 +105,7 @@ The script does the following: $ git clone https://github.com/kszucs/arrow $ git clone https://github.com/kszucs/crossbow - $ cd arrow/cd + $ cd arrow/dev/tasks $ python crossbow.py ``` @@ -115,7 +115,7 @@ The script does the following: ```bash git checkout ARROW- - python cd/crossbow.py --dry-run + python dev/tasks/crossbow.py --dry-run ``` > Note that the arrow branch must be pushed beforehand, because the script @@ -139,7 +139,7 @@ Run all builds: ```bash $ python crossbow.py -Repository: https://github.com/kszucs/arrow@cd +Repository: https://github.com/kszucs/arrow@tasks Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 Version: 0.9.1.dev48+g810a7188.d20180414 Pushed branches: @@ -162,7 +162,7 @@ Run only `conda` package builds but on all platforms: ```bash $ python crossbow.py conda -Repository: https://github.com/kszucs/arrow@cd +Repository: https://github.com/kszucs/arrow@tasks Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 Version: 0.9.1.dev48+g810a7188.d20180414 Pushed branches: @@ -175,7 +175,7 @@ Run `wheel` builds: ```bash $ python crossbow.py wheel -Repository: https://github.com/kszucs/arrow@cd +Repository: https://github.com/kszucs/arrow@tasks Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 Version: 0.9.1.dev48+g810a7188.d20180414 Pushed branches: @@ -188,7 +188,7 @@ Run `osx` builds: ```bash $ python crossbow.py osx -Repository: https://github.com/kszucs/arrow@cd +Repository: https://github.com/kszucs/arrow@tasks Commit SHA: cad1df2c7f650ad3434319bbbefed0d4abe45e4a Version: 0.9.1.dev130+gcad1df2c.d20180414 Pushed branches: @@ -200,7 +200,7 @@ Run only `linux-conda` package build: ```bash $ python crossbow.py linux-conda -Repository: https://github.com/kszucs/arrow@cd +Repository: https://github.com/kszucs/arrow@tasks Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702 Version: 0.9.1.dev48+g810a7188.d20180414 Pushed branches: diff --git a/dev/tasks/crossbow.py b/dev/tasks/crossbow.py index fb403b9cb9e7..f9ae0cbff2cd 100755 --- a/dev/tasks/crossbow.py +++ b/dev/tasks/crossbow.py @@ -105,12 +105,12 @@ def __init__(self, repo_path, template_directory=None): self.repo = pygit2.Repository(str(self.path)) msg = dedent(''' - Repository: {origin}@{branch} + Repository: {remote}@{branch} Commit SHA: {sha} Version: {version} ''') logging.info(msg.format( - origin=self.origin.url, + remote=self.current_remote.url, branch=self.current_branch.branch_name, sha=self.sha, version=self.version @@ -127,8 +127,9 @@ def version(self): return get_version(self.path) @property - def origin(self): - return self.repo.remotes['origin'] + def current_remote(self): + remote_name = self.current_branch.upstream.remote_name + return self.repo.remotes[remote_name] @property def current_branch(self): @@ -137,8 +138,9 @@ def current_branch(self): @property def description(self): - return '[BUILD] {} of {}@{}'.format( - self.version, self.origin.url, self.current_branch.branch_name) + return '[BUILD] {} of {}@{}'.format(self.version, + self.current_remote.url, + self.current_branch.branch_name) class Build(object): @@ -284,7 +286,7 @@ def build(task_regex, config, dry_run, arrow_repo, queue_repo, github_token): 'EMAIL': MESSAGE_EMAIL, 'BUILD_REF': arrow.sha, 'ARROW_SHA': arrow.sha, - 'ARROW_REPO': arrow.origin.url, + 'ARROW_REPO': arrow.current_remote.url, 'ARROW_BRANCH': arrow.current_branch.branch_name, 'ARROW_VERSION': arrow.version, 'PYARROW_VERSION': arrow.version, diff --git a/dev/tasks/python-wheels/travis.osx.yml b/dev/tasks/python-wheels/travis.osx.yml index 2b6b52884c5a..a92e274fabb8 100644 --- a/dev/tasks/python-wheels/travis.osx.yml +++ b/dev/tasks/python-wheels/travis.osx.yml @@ -54,7 +54,7 @@ before_install: - brew upgrade cmake - brew install bison flex - - export CONFIG_PATH=`pwd`/arrow/cd/python-wheels/osx-build.sh + - export CONFIG_PATH=`pwd`/arrow/dev/tasks/python-wheels/osx-build.sh - source multibuild/common_utils.sh - source multibuild/travis_osx_steps.sh From e48a63d6657fa0ee6f797a28db49fefeeb674712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Thu, 24 May 2018 13:21:15 +0200 Subject: [PATCH 51/60] add debian specific files to rat exlusion list --- dev/release/rat_exclude_files.txt | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt index eb735604fd76..29ec19209449 100644 --- a/dev/release/rat_exclude_files.txt +++ b/dev/release/rat_exclude_files.txt @@ -39,6 +39,42 @@ cpp/src/plasma/thirdparty/dlmalloc.c cpp/src/plasma/thirdparty/xxhash.cc cpp/src/plasma/thirdparty/xxhash.h dev/release/rat_exclude_files.txt +dev/tasks/linux-packages/debian.ubuntu-trusty/compat +dev/tasks/linux-packages/debian.ubuntu-trusty/control +dev/tasks/linux-packages/debian.ubuntu-trusty/gir1.2-arrow-1.0.install +dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-dev.install +dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-dev.install +dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.doc-base +dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.install +dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib-doc.links +dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-glib0.install +dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow-python0.install +dev/tasks/linux-packages/debian.ubuntu-trusty/libarrow0.install +dev/tasks/linux-packages/debian.ubuntu-trusty/patches/series +dev/tasks/linux-packages/debian.ubuntu-trusty/rules +dev/tasks/linux-packages/debian.ubuntu-trusty/source/format +dev/tasks/linux-packages/debian.ubuntu-trusty/watch +dev/tasks/linux-packages/debian/compat +dev/tasks/linux-packages/debian/control +dev/tasks/linux-packages/debian/gir1.2-arrow-1.0.install +dev/tasks/linux-packages/debian/gir1.2-arrow-gpu-1.0.install +dev/tasks/linux-packages/debian/libarrow-dev.install +dev/tasks/linux-packages/debian/libarrow-glib-dev.install +dev/tasks/linux-packages/debian/libarrow-glib-doc.doc-base +dev/tasks/linux-packages/debian/libarrow-glib-doc.install +dev/tasks/linux-packages/debian/libarrow-glib-doc.links +dev/tasks/linux-packages/debian/libarrow-glib0.install +dev/tasks/linux-packages/debian/libarrow-gpu-dev.install +dev/tasks/linux-packages/debian/libarrow-gpu-glib-dev.install +dev/tasks/linux-packages/debian/libarrow-gpu-glib0.install +dev/tasks/linux-packages/debian/libarrow-gpu0.install +dev/tasks/linux-packages/debian/libarrow-python-dev.install +dev/tasks/linux-packages/debian/libarrow-python0.install +dev/tasks/linux-packages/debian/libarrow0.install +dev/tasks/linux-packages/debian/patches/series +dev/tasks/linux-packages/debian/rules +dev/tasks/linux-packages/debian/source/format +dev/tasks/linux-packages/debian/watch go/arrow/Gopkg.lock go/arrow/internal/cpu/* go/arrow/type_string.go From 81b31d5e4550a340a316cfd5fd5d59aa322d07be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Thu, 24 May 2018 16:08:14 +0200 Subject: [PATCH 52/60] yaml and path fixes for conda recipes --- dev/tasks/conda-recipes/appveyor.yml | 2 +- dev/tasks/conda-recipes/travis.linux.yml | 4 ++-- dev/tasks/conda-recipes/travis.osx.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/tasks/conda-recipes/appveyor.yml b/dev/tasks/conda-recipes/appveyor.yml index 38c1e96bde99..bc1e37902dc4 100644 --- a/dev/tasks/conda-recipes/appveyor.yml +++ b/dev/tasks/conda-recipes/appveyor.yml @@ -24,7 +24,7 @@ environment: CONDA_PY: 36 CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 ARROW_SRC: C:\apache-arrow - ARROW_VERSION: {{ ARROW_VERSION }} + ARROW_VERSION: "{{ ARROW_VERSION }}" install: - cmd: rmdir C:\cygwin /s /q diff --git a/dev/tasks/conda-recipes/travis.linux.yml b/dev/tasks/conda-recipes/travis.linux.yml index d5ab38141ec5..fd4b686072c5 100644 --- a/dev/tasks/conda-recipes/travis.linux.yml +++ b/dev/tasks/conda-recipes/travis.linux.yml @@ -22,7 +22,7 @@ dist: trusty env: - ARROW_VERSION={{ ARROW_VERSION }} - matrix: + - matrix: - CONDA_PY=27 - CONDA_PY=35 - CONDA_PY=36 @@ -53,7 +53,7 @@ install: script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - git -C arrow checkout {{ ARROW_SHA }} - - pushd arrow/cd/conda-recipes + - pushd arrow/dev/tasks/conda-recipes - conda build arrow-cpp pyarrow notifications: diff --git a/dev/tasks/conda-recipes/travis.osx.yml b/dev/tasks/conda-recipes/travis.osx.yml index 84a01bff7391..4963c874b846 100644 --- a/dev/tasks/conda-recipes/travis.osx.yml +++ b/dev/tasks/conda-recipes/travis.osx.yml @@ -22,7 +22,7 @@ osx_image: xcode6.4 env: - ARROW_VERSION={{ ARROW_VERSION }} - matrix: + - matrix: - CONDA_PY=27 - CONDA_PY=35 - CONDA_PY=36 @@ -62,7 +62,7 @@ install: script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - git -C arrow checkout {{ ARROW_SHA }} - - pushd arrow/cd/conda-recipes + - pushd arrow/dev/tasks/conda-recipes - conda build arrow-cpp pyarrow notifications: From 2510786f26eafd2ec22f90bf6399e0ab6f1226e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Thu, 24 May 2018 18:09:24 +0200 Subject: [PATCH 53/60] path fixis again --- dev/tasks/conda-recipes/arrow-cpp/meta.yaml | 2 +- dev/tasks/conda-recipes/pyarrow/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tasks/conda-recipes/arrow-cpp/meta.yaml b/dev/tasks/conda-recipes/arrow-cpp/meta.yaml index 43ebd9ab3c85..ae9f87dda670 100644 --- a/dev/tasks/conda-recipes/arrow-cpp/meta.yaml +++ b/dev/tasks/conda-recipes/arrow-cpp/meta.yaml @@ -20,7 +20,7 @@ package: version: {{ ARROW_VERSION }} source: - path: ../../../ + path: ../../../../ build: number: 0 diff --git a/dev/tasks/conda-recipes/pyarrow/meta.yaml b/dev/tasks/conda-recipes/pyarrow/meta.yaml index 3f229617435b..d950c8528cc3 100644 --- a/dev/tasks/conda-recipes/pyarrow/meta.yaml +++ b/dev/tasks/conda-recipes/pyarrow/meta.yaml @@ -20,7 +20,7 @@ package: version: {{ ARROW_VERSION }} source: - path: ../../../ + path: ../../../../ build: number: 0 From 514914397cf1b7a96f502318c64a77bdb9f3b1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 25 May 2018 09:19:29 +0200 Subject: [PATCH 54/60] fix apt descriptor --- dev/tasks/linux-packages/apt/descriptor.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/tasks/linux-packages/apt/descriptor.json b/dev/tasks/linux-packages/apt/descriptor.json index 27a1eae30fe5..943b00d85306 100644 --- a/dev/tasks/linux-packages/apt/descriptor.json +++ b/dev/tasks/linux-packages/apt/descriptor.json @@ -7,11 +7,11 @@ "vcs_url": "htttps://github.com/apache/arrow.git" }, "version": { - "name": "0.9.0" + "name": "dev" }, "files": [ { - "includePattern": "cpp-linux/apt/repositories/([^/]+)/pool/stretch/main/a/apache-arrow/([^/]+\\.deb)\\z", + "includePattern": "dev/tasks/linux-packages/apt/repositories/([^/]+)/pool/stretch/main/a/apache-arrow/([^/]+\\.deb)\\z", "uploadPattern": "pool/stretch/main/$2", "matrixParams": { "deb_distribution": "stretch", @@ -21,7 +21,7 @@ } }, { - "includePattern": "cpp-linux/apt/repositories/([^/]+)/pool/trusty/universe/a/apache-arrow/([^/]+\\.deb)\\z", + "includePattern": "dev/tasks/linux-packages/apt/repositories/([^/]+)/pool/trusty/universe/a/apache-arrow/([^/]+\\.deb)\\z", "uploadPattern": "pool/trusty/universe/$2", "matrixParams": { "deb_distribution": "trusty", @@ -31,7 +31,7 @@ } }, { - "includePattern": "cpp-linux/apt/repositories/([^/]+)/pool/xenial/universe/a/apache-arrow/([^/]+\\.deb)\\z", + "includePattern": "dev/tasks/linux-packages/apt/repositories/([^/]+)/pool/xenial/universe/a/apache-arrow/([^/]+\\.deb)\\z", "uploadPattern": "pool/xenial/universe/$2", "matrixParams": { "deb_distribution": "xenial", @@ -41,7 +41,7 @@ } }, { - "includePattern": "cpp-linux/apt/repositories/([^/]+)/pool/artful/universe/a/apache-arrow/([^/]+\\.deb)\\z", + "includePattern": "dev/tasks/linux-packages/apt/repositories/([^/]+)/pool/artful/universe/a/apache-arrow/([^/]+\\.deb)\\z", "uploadPattern": "pool/artful/universe/$2", "matrixParams": { "deb_distribution": "artful", From 80f97d33723b3ec579376c102edb47b24d7b1ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 25 May 2018 12:47:13 +0200 Subject: [PATCH 55/60] attempt to fix conda builds --- dev/tasks/conda-recipes/appveyor.yml | 2 +- dev/tasks/conda-recipes/travis.linux.yml | 3 ++- dev/tasks/conda-recipes/travis.osx.yml | 3 ++- dev/tasks/crossbow.py | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dev/tasks/conda-recipes/appveyor.yml b/dev/tasks/conda-recipes/appveyor.yml index bc1e37902dc4..38c1e96bde99 100644 --- a/dev/tasks/conda-recipes/appveyor.yml +++ b/dev/tasks/conda-recipes/appveyor.yml @@ -24,7 +24,7 @@ environment: CONDA_PY: 36 CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 ARROW_SRC: C:\apache-arrow - ARROW_VERSION: "{{ ARROW_VERSION }}" + ARROW_VERSION: {{ ARROW_VERSION }} install: - cmd: rmdir C:\cygwin /s /q diff --git a/dev/tasks/conda-recipes/travis.linux.yml b/dev/tasks/conda-recipes/travis.linux.yml index fd4b686072c5..5de7baf41bbe 100644 --- a/dev/tasks/conda-recipes/travis.linux.yml +++ b/dev/tasks/conda-recipes/travis.linux.yml @@ -21,7 +21,8 @@ os: linux dist: trusty env: - - ARROW_VERSION={{ ARROW_VERSION }} + - global: + - ARROW_VERSION={{ ARROW_VERSION }} - matrix: - CONDA_PY=27 - CONDA_PY=35 diff --git a/dev/tasks/conda-recipes/travis.osx.yml b/dev/tasks/conda-recipes/travis.osx.yml index 4963c874b846..134e1228b184 100644 --- a/dev/tasks/conda-recipes/travis.osx.yml +++ b/dev/tasks/conda-recipes/travis.osx.yml @@ -21,7 +21,8 @@ os: osx osx_image: xcode6.4 env: - - ARROW_VERSION={{ ARROW_VERSION }} + - global: + - ARROW_VERSION={{ ARROW_VERSION }} - matrix: - CONDA_PY=27 - CONDA_PY=35 diff --git a/dev/tasks/crossbow.py b/dev/tasks/crossbow.py index f9ae0cbff2cd..fd4f732ea823 100755 --- a/dev/tasks/crossbow.py +++ b/dev/tasks/crossbow.py @@ -30,6 +30,7 @@ from textwrap import dedent from jinja2 import Template from setuptools_scm import get_version +from setuptools_scm.version import simplified_semver_version, meta logging.basicConfig( @@ -124,6 +125,7 @@ def sha(self): @property def version(self): """Generate version number based on version control history""" + # TODO(kszucs) use self.repo.describe() instead return get_version(self.path) @property From 23642a832b8dcd56907838819ed96caf98670cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 25 May 2018 14:18:52 +0200 Subject: [PATCH 56/60] fix conda travis env matrix --- dev/tasks/conda-recipes/travis.linux.yml | 6 +++--- dev/tasks/conda-recipes/travis.osx.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dev/tasks/conda-recipes/travis.linux.yml b/dev/tasks/conda-recipes/travis.linux.yml index 5de7baf41bbe..5aae5965b0dc 100644 --- a/dev/tasks/conda-recipes/travis.linux.yml +++ b/dev/tasks/conda-recipes/travis.linux.yml @@ -21,12 +21,12 @@ os: linux dist: trusty env: - - global: - - ARROW_VERSION={{ ARROW_VERSION }} - - matrix: + matrix: - CONDA_PY=27 - CONDA_PY=35 - CONDA_PY=36 + global: + - ARROW_VERSION={{ ARROW_VERSION }} install: # Install Miniconda. diff --git a/dev/tasks/conda-recipes/travis.osx.yml b/dev/tasks/conda-recipes/travis.osx.yml index 134e1228b184..27a80cb90859 100644 --- a/dev/tasks/conda-recipes/travis.osx.yml +++ b/dev/tasks/conda-recipes/travis.osx.yml @@ -21,12 +21,12 @@ os: osx osx_image: xcode6.4 env: - - global: - - ARROW_VERSION={{ ARROW_VERSION }} - - matrix: + matrix: - CONDA_PY=27 - CONDA_PY=35 - CONDA_PY=36 + global: + - ARROW_VERSION={{ ARROW_VERSION }} before_install: # Remove homebrew. From a0ae5c3157f2c079113ab9c3b0737c073f054e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Fri, 25 May 2018 14:29:53 +0200 Subject: [PATCH 57/60] update pyarrow's arrow-cpp dependency --- dev/tasks/conda-recipes/pyarrow/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/conda-recipes/pyarrow/meta.yaml b/dev/tasks/conda-recipes/pyarrow/meta.yaml index d950c8528cc3..2d797e5aefe9 100644 --- a/dev/tasks/conda-recipes/pyarrow/meta.yaml +++ b/dev/tasks/conda-recipes/pyarrow/meta.yaml @@ -40,7 +40,7 @@ requirements: - numpy 1.10.* # [not (win and py>=36)] - numpy 1.12.* # [win and py>=36] - six - - arrow-cpp 0.9.0 + - arrow-cpp {{ ARROW_VERSION }} - parquet-cpp 1.4.0 run: From 7280d90e62341e9768208dda3f59fe56eb323646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 26 May 2018 13:58:28 +0200 Subject: [PATCH 58/60] add parquet-cpp recipe --- dev/tasks/conda-recipes/parquet-cpp/bld.bat | 15 +++++ dev/tasks/conda-recipes/parquet-cpp/build.sh | 22 +++++++ dev/tasks/conda-recipes/parquet-cpp/meta.yaml | 63 +++++++++++++++++++ dev/tasks/conda-recipes/travis.linux.yml | 2 +- dev/tasks/conda-recipes/travis.osx.yml | 2 +- 5 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 dev/tasks/conda-recipes/parquet-cpp/bld.bat create mode 100644 dev/tasks/conda-recipes/parquet-cpp/build.sh create mode 100644 dev/tasks/conda-recipes/parquet-cpp/meta.yaml diff --git a/dev/tasks/conda-recipes/parquet-cpp/bld.bat b/dev/tasks/conda-recipes/parquet-cpp/bld.bat new file mode 100644 index 000000000000..41c692ebcf57 --- /dev/null +++ b/dev/tasks/conda-recipes/parquet-cpp/bld.bat @@ -0,0 +1,15 @@ +set PARQUET_BUILD_TOOLCHAIN=%LIBRARY_PREFIX% + +REM Set short build path to not overcome max obj files path length of 150 characters on Windows +mkdir C:\bld\build +pushd C:\bld\build + +cmake -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ + -DPARQUET_BOOST_USE_SHARED=ON ^ + -DPARQUET_BUILD_TESTS=OFF ^ + "%SRC_DIR%" + +cmake --build . --target install --config Release + +popd diff --git a/dev/tasks/conda-recipes/parquet-cpp/build.sh b/dev/tasks/conda-recipes/parquet-cpp/build.sh new file mode 100644 index 000000000000..0a4765c805c2 --- /dev/null +++ b/dev/tasks/conda-recipes/parquet-cpp/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e +set -x + +export PARQUET_BUILD_TOOLCHAIN=$PREFIX + +mkdir build-dir +cd build-dir + +cmake \ + -DCMAKE_BUILD_TYPE=release \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=$PREFIX/lib \ + -DPARQUET_BOOST_USE_SHARED=ON \ + -DPARQUET_BUILD_BENCHMARKS=OFF \ + -DPARQUET_BUILD_EXECUTABLES=OFF \ + -DPARQUET_BUILD_TESTS=OFF \ + .. + +make -j${CPU_COUNT} +make install diff --git a/dev/tasks/conda-recipes/parquet-cpp/meta.yaml b/dev/tasks/conda-recipes/parquet-cpp/meta.yaml new file mode 100644 index 000000000000..4392f122dcc9 --- /dev/null +++ b/dev/tasks/conda-recipes/parquet-cpp/meta.yaml @@ -0,0 +1,63 @@ +{% set version = "1.4.0" %} +{% set commit = "b62c22e52d37fa9580d85c5a2a2d73bd8e268364" %} +{% set sha256sum = "2fa5704fc1164f68508e3050d30a6436dd56434e1a592d8ddf4afd68f62a7c01" %} + +# NOTE(wesm): When updating the build, please remember also to update the +# pinned Arrow version. We are letting parquet-cpp build its own Apache Arrow +# so that we do not have to update conda-packages for Arrow before we can +# update this package. So if there is an ABI change in Arrow, we can update +# this package faster + +package: + name: parquet-cpp + version: {{ version }} + +source: + fn: apache-parquet-cpp-{{ version }}.tar.gz + url: https://github.com/apache/parquet-cpp/archive/{{ commit }}.tar.gz + sha256: {{ sha256sum }} + +build: + number: 0 + skip: true # [win and not (py35 and win64)] + features: + - vc14 # [win and py35] + +requirements: + build: + - toolchain + - boost-cpp 1.66.0 + - cmake + - thrift-cpp >=0.11 + - python # [win] + - arrow-cpp {{ ARROW_VERSION }} + + run: + - arrow-cpp {{ ARROW_VERSION }} + +test: + requires: + - python {{ environ['PY_VER'] + '*' }} # [win] + + commands: + - test -f $PREFIX/lib/libparquet.so # [linux] + - test -f $PREFIX/lib/libparquet.dylib # [osx] + - test -f $PREFIX/include/parquet/api/reader.h # [unix] + - if not exist %PREFIX%\\Library\\include\\parquet\\api\\reader.h exit 1 # [win] + - if not exist %PREFIX%\\Library\\bin\\parquet.dll exit 1 # [win] + - if not exist %PREFIX%\\Library\\lib\\parquet.lib exit 1 # [win] + - if not exist %PREFIX%\\Library\\lib\\parquet_static.lib exit 1 # [win] + +about: + home: https://github.com/apache/parquet-cpp + license: Apache 2.0 + summary: 'C++ libraries for the Apache Parquet file format' + +extra: + recipe-maintainers: + - wesm + - xhochy + - leifwalsh + - jreback + - cpcloud + - siddharthteotia diff --git a/dev/tasks/conda-recipes/travis.linux.yml b/dev/tasks/conda-recipes/travis.linux.yml index 5aae5965b0dc..c5266810c6df 100644 --- a/dev/tasks/conda-recipes/travis.linux.yml +++ b/dev/tasks/conda-recipes/travis.linux.yml @@ -55,7 +55,7 @@ script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - git -C arrow checkout {{ ARROW_SHA }} - pushd arrow/dev/tasks/conda-recipes - - conda build arrow-cpp pyarrow + - conda build parquet-cpp arrow-cpp pyarrow notifications: email: diff --git a/dev/tasks/conda-recipes/travis.osx.yml b/dev/tasks/conda-recipes/travis.osx.yml index 27a80cb90859..8a38d333489c 100644 --- a/dev/tasks/conda-recipes/travis.osx.yml +++ b/dev/tasks/conda-recipes/travis.osx.yml @@ -64,7 +64,7 @@ script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} arrow - git -C arrow checkout {{ ARROW_SHA }} - pushd arrow/dev/tasks/conda-recipes - - conda build arrow-cpp pyarrow + - conda build parquet-cpp arrow-cpp pyarrow notifications: email: From a8f26de9150ca82494bd86e755d68a6f74ace160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 26 May 2018 14:26:22 +0200 Subject: [PATCH 59/60] license headers for parquet recipe --- dev/tasks/conda-recipes/parquet-cpp/bld.bat | 17 +++++++++++++++++ dev/tasks/conda-recipes/parquet-cpp/build.sh | 19 ++++++++++++++++++- dev/tasks/conda-recipes/parquet-cpp/meta.yaml | 17 +++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/dev/tasks/conda-recipes/parquet-cpp/bld.bat b/dev/tasks/conda-recipes/parquet-cpp/bld.bat index 41c692ebcf57..8b88eb577099 100644 --- a/dev/tasks/conda-recipes/parquet-cpp/bld.bat +++ b/dev/tasks/conda-recipes/parquet-cpp/bld.bat @@ -1,3 +1,20 @@ +@rem Licensed to the Apache Software Foundation (ASF) under one +@rem or more contributor license agreements. See the NOTICE file +@rem distributed with this work for additional information +@rem regarding copyright ownership. The ASF licenses this file +@rem to you under the Apache License, Version 2.0 (the +@rem "License"); you may not use this file except in compliance +@rem with the License. You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, +@rem software distributed under the License is distributed on an +@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@rem KIND, either express or implied. See the License for the +@rem specific language governing permissions and limitations +@rem under the License. + set PARQUET_BUILD_TOOLCHAIN=%LIBRARY_PREFIX% REM Set short build path to not overcome max obj files path length of 150 characters on Windows diff --git a/dev/tasks/conda-recipes/parquet-cpp/build.sh b/dev/tasks/conda-recipes/parquet-cpp/build.sh index 0a4765c805c2..14a93c3450dd 100644 --- a/dev/tasks/conda-recipes/parquet-cpp/build.sh +++ b/dev/tasks/conda-recipes/parquet-cpp/build.sh @@ -1,4 +1,21 @@ -#!/bin/bash +#!/bin/sh + +# 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. set -e set -x diff --git a/dev/tasks/conda-recipes/parquet-cpp/meta.yaml b/dev/tasks/conda-recipes/parquet-cpp/meta.yaml index 4392f122dcc9..0f5a619010a7 100644 --- a/dev/tasks/conda-recipes/parquet-cpp/meta.yaml +++ b/dev/tasks/conda-recipes/parquet-cpp/meta.yaml @@ -1,3 +1,20 @@ +# 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. + {% set version = "1.4.0" %} {% set commit = "b62c22e52d37fa9580d85c5a2a2d73bd8e268364" %} {% set sha256sum = "2fa5704fc1164f68508e3050d30a6436dd56434e1a592d8ddf4afd68f62a7c01" %} From da6374b8b81fd7ce7a8b6b8fc2972f8d8d45cd4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Sat, 26 May 2018 16:44:36 +0200 Subject: [PATCH 60/60] build parquet-cpp conda recipe on windows too --- dev/tasks/conda-recipes/appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/conda-recipes/appveyor.yml b/dev/tasks/conda-recipes/appveyor.yml index 38c1e96bde99..10ef7044cebb 100644 --- a/dev/tasks/conda-recipes/appveyor.yml +++ b/dev/tasks/conda-recipes/appveyor.yml @@ -48,7 +48,7 @@ test_script: - git clone -b {{ ARROW_BRANCH }} {{ ARROW_REPO }} %ARROW_SRC% || exit /B - git checkout {{ ARROW_SHA }} || exit /B - pushd %ARROW_SRC%\dev\tasks\conda-recipes - - conda.exe build arrow-cpp pyarrow + - conda.exe build parquet-cpp arrow-cpp pyarrow notifications: