You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2017/08/27 09:55:49 UTC
[arrow-dist] branch master updated: ARROW-1404: Build .deb and .rpm
on Travis CI
This is an automated email from the ASF dual-hosted git repository.
uwe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-dist.git
The following commit(s) were added to refs/heads/master by this push:
new 472fc14 ARROW-1404: Build .deb and .rpm on Travis CI
472fc14 is described below
commit 472fc14360ab060d8591b8ba82a50628b2c1e055
Author: Kouhei Sutou <ko...@cozmixng.org>
AuthorDate: Sun Aug 27 18:55:48 2017 +0900
ARROW-1404: Build .deb and .rpm on Travis CI
---
.travis.yml | 45 +++++++++++++++++++++++++++++++++
cpp-linux/apt/build.sh | 6 ++++-
cpp-linux/apt/debian-stretch/Dockerfile | 7 +++--
cpp-linux/apt/descriptor.json | 23 +++++++++++++++++
cpp-linux/apt/ubuntu-16.04/Dockerfile | 7 +++--
cpp-linux/apt/ubuntu-17.04/Dockerfile | 7 +++--
cpp-linux/package-task.rb | 41 +++++++++++++++++++-----------
cpp-linux/yum/arrow.spec.in | 3 +--
cpp-linux/yum/build.sh | 12 +++++++--
cpp-linux/yum/centos-6/Dockerfile | 25 ++++++++++--------
cpp-linux/yum/centos-6/descriptor.json | 20 +++++++++++++++
cpp-linux/yum/centos-7/Dockerfile | 13 ++++++----
cpp-linux/yum/centos-7/descriptor.json | 20 +++++++++++++++
13 files changed, 188 insertions(+), 41 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index c0af82e..345e8d8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,6 +48,51 @@ matrix:
/io/build_arrow.sh
- popd
- sudo mv arrow/python/manylinux1/dist/* dist/
+ - language: ruby
+ os: linux
+ before_script:
+ before_install:
+ install:
+ script:
+ - (cd cpp-linux && travis_wait 30 rake apt:build PARALLEL=yes DEBUG=no)
+ deploy:
+ provider: bintray
+ file: cpp-linux/apt/descriptor.json
+ user: wesm
+ on:
+ all_branches: true
+ key:
+ secure: A4A5y/NqAAMTHynW7G0NsUOcZkWxUU84YGw+2Ltne1zfhxcQW2hFT0JjT1eTxm0nWkWuQZfd6bXc2W2G5W0uEaq2U/u+6oCMLuNxvrjQTbHzWI4CSdEfZHm2EZq/BewYHbRwPmi97uscOkgYhYZRSh8KGJZjcLVGHpzZAoC3D69JA2mynWpFOqXIiaL3rznE2LBz8L0UbttUnxTvgt8/yFJIbaPWzsoeS++T+DaFAm4GesY38uZ2NIq9OR62rlGre/ye/KBXsHkAzSlCbvIJgNvrAxId0GHCP5jEF389r8C5w+nttmLoCvyDvKRV5XcIeIACUlVdl01vcPs65LhBWqKE6wTo+2Vx1Zw+HWrfVsO6fINhbuJ+Uler2Zkq//chRRNtbzjI3so8VCBpQD+12O4Nlsfe6JJjgKgzhPNAQFSuE2cp8p6+Qs5FujKaVkVqYjhN8wH7U5nGuqM51ed8EeI1LuJg [...]
+ - language: ruby
+ os: linux
+ before_script:
+ before_install:
+ install:
+ script:
+ - (cd cpp-linux && travis_wait 30 rake yum:build CENTOS_VERSIONS=6 DEBUG=no)
+ deploy:
+ provider: bintray
+ file: cpp-linux/yum/centos-6/descriptor.json
+ user: wesm
+ on:
+ all_branches: true
+ key:
+ secure: A4A5y/NqAAMTHynW7G0NsUOcZkWxUU84YGw+2Ltne1zfhxcQW2hFT0JjT1eTxm0nWkWuQZfd6bXc2W2G5W0uEaq2U/u+6oCMLuNxvrjQTbHzWI4CSdEfZHm2EZq/BewYHbRwPmi97uscOkgYhYZRSh8KGJZjcLVGHpzZAoC3D69JA2mynWpFOqXIiaL3rznE2LBz8L0UbttUnxTvgt8/yFJIbaPWzsoeS++T+DaFAm4GesY38uZ2NIq9OR62rlGre/ye/KBXsHkAzSlCbvIJgNvrAxId0GHCP5jEF389r8C5w+nttmLoCvyDvKRV5XcIeIACUlVdl01vcPs65LhBWqKE6wTo+2Vx1Zw+HWrfVsO6fINhbuJ+Uler2Zkq//chRRNtbzjI3so8VCBpQD+12O4Nlsfe6JJjgKgzhPNAQFSuE2cp8p6+Qs5FujKaVkVqYjhN8wH7U5nGuqM51ed8EeI1LuJg [...]
+ - language: ruby
+ os: linux
+ before_script:
+ before_install:
+ install:
+ script:
+ - (cd cpp-linux && travis_wait 30 rake yum:build CENTOS_VERSIONS=7 DEBUG=no)
+ deploy:
+ provider: bintray
+ file: cpp-linux/yum/centos-7/descriptor.json
+ user: wesm
+ on:
+ all_branches: true
+ key:
+ secure: A4A5y/NqAAMTHynW7G0NsUOcZkWxUU84YGw+2Ltne1zfhxcQW2hFT0JjT1eTxm0nWkWuQZfd6bXc2W2G5W0uEaq2U/u+6oCMLuNxvrjQTbHzWI4CSdEfZHm2EZq/BewYHbRwPmi97uscOkgYhYZRSh8KGJZjcLVGHpzZAoC3D69JA2mynWpFOqXIiaL3rznE2LBz8L0UbttUnxTvgt8/yFJIbaPWzsoeS++T+DaFAm4GesY38uZ2NIq9OR62rlGre/ye/KBXsHkAzSlCbvIJgNvrAxId0GHCP5jEF389r8C5w+nttmLoCvyDvKRV5XcIeIACUlVdl01vcPs65LhBWqKE6wTo+2Vx1Zw+HWrfVsO6fINhbuJ+Uler2Zkq//chRRNtbzjI3so8VCBpQD+12O4Nlsfe6JJjgKgzhPNAQFSuE2cp8p6+Qs5FujKaVkVqYjhN8wH7U5nGuqM51ed8EeI1LuJg [...]
before_install:
- brew uninstall boost
- brew update
diff --git a/cpp-linux/apt/build.sh b/cpp-linux/apt/build.sh
index 2b40e53..ff0e761 100755
--- a/cpp-linux/apt/build.sh
+++ b/cpp-linux/apt/build.sh
@@ -50,7 +50,11 @@ run tar xfz ${PACKAGE}_${VERSION}.orig.tar.gz
run cd ${PACKAGE}-${VERSION}/
run cp -rp /host/tmp/debian debian
# export DEB_BUILD_OPTIONS=noopt
-run debuild -us -uc
+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/')
diff --git a/cpp-linux/apt/debian-stretch/Dockerfile b/cpp-linux/apt/debian-stretch/Dockerfile
index 92364cf..87c9672 100644
--- a/cpp-linux/apt/debian-stretch/Dockerfile
+++ b/cpp-linux/apt/debian-stretch/Dockerfile
@@ -19,9 +19,12 @@ FROM debian:stretch
ENV DEBIAN_FRONTEND noninteractive
+ARG DEBUG
+
RUN \
- apt update && \
- apt install -y -V \
+ quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \
+ apt update ${quiet} && \
+ apt install -y -V ${quiet} \
build-essential \
cmake \
debhelper\
diff --git a/cpp-linux/apt/descriptor.json b/cpp-linux/apt/descriptor.json
new file mode 100644
index 0000000..c7089ce
--- /dev/null
+++ b/cpp-linux/apt/descriptor.json
@@ -0,0 +1,23 @@
+{
+ "package": {
+ "name": "APT",
+ "repo": "apache-arrow-apt",
+ "subject": "wesm"
+ },
+ "version": {
+ "name": "0.6.0"
+ },
+ "files": [
+ {
+ "includePattern": "cpp-linux/apt/repositories/*/pool/(*)/(*)/a/apache-arrow/(.*\\.deb)",
+ "uploadPattern": "$3",
+ "matrixParams": {
+ "deb_distribution": "$1",
+ "deb_component": "$2",
+ "deb_architecture": "amd64",
+ "override": 1
+ }
+ }
+ ],
+ "publish": true
+}
diff --git a/cpp-linux/apt/ubuntu-16.04/Dockerfile b/cpp-linux/apt/ubuntu-16.04/Dockerfile
index e365088..b61549d 100644
--- a/cpp-linux/apt/ubuntu-16.04/Dockerfile
+++ b/cpp-linux/apt/ubuntu-16.04/Dockerfile
@@ -19,9 +19,12 @@ FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
+ARG DEBUG
+
RUN \
- apt update && \
- apt install -y -V \
+ quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \
+ apt update ${quiet} && \
+ apt install -y -V ${quiet} \
build-essential \
cmake \
debhelper\
diff --git a/cpp-linux/apt/ubuntu-17.04/Dockerfile b/cpp-linux/apt/ubuntu-17.04/Dockerfile
index 8f63f9e..b0f2335 100644
--- a/cpp-linux/apt/ubuntu-17.04/Dockerfile
+++ b/cpp-linux/apt/ubuntu-17.04/Dockerfile
@@ -19,9 +19,12 @@ FROM ubuntu:17.04
ENV DEBIAN_FRONTEND noninteractive
+ARG DEBUG
+
RUN \
- apt update && \
- apt install -y -V \
+ quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \
+ apt update ${quiet} && \
+ apt install -y -V ${quiet} \
build-essential \
cmake \
debhelper\
diff --git a/cpp-linux/package-task.rb b/cpp-linux/package-task.rb
index 9741f1b..c9a0755 100644
--- a/cpp-linux/package-task.rb
+++ b/cpp-linux/package-task.rb
@@ -51,6 +51,10 @@ class PackageTask
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
@@ -76,17 +80,27 @@ class PackageTask
def run_docker(id)
docker_tag = "#{@package}-#{id}"
- sh("docker",
- "build",
- "--tag", docker_tag,
- id)
- sh("docker",
- "run",
- "--rm",
- "--tty",
- "--volume", "#{Dir.pwd}:/host:rw",
- docker_tag,
- "/host/build.sh")
+ 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, "/host/build.sh"])
+
+ sh(*build_command_line)
+ sh(*run_command_line)
end
def define_dist_task
@@ -139,10 +153,7 @@ VERSION=#{@version}
end
cd(yum_dir) do
- distribution_versions = [
- "6",
- "7",
- ]
+ distribution_versions = (ENV["CENTOS_VERSIONS"] || "6,7").split(",")
threads = []
distribution_versions.each do |version|
id = "#{distribution}-#{version}"
diff --git a/cpp-linux/yum/arrow.spec.in b/cpp-linux/yum/arrow.spec.in
index 4dd4587..7717695 100644
--- a/cpp-linux/yum/arrow.spec.in
+++ b/cpp-linux/yum/arrow.spec.in
@@ -74,8 +74,7 @@ cd -
cd c_glib
%configure \
--with-arrow-cpp-build-dir=$PWD/../cpp/build \
- --with-arrow-cpp-build-type=$build_type \
- --enable-gtk-doc
+ --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 \
diff --git a/cpp-linux/yum/build.sh b/cpp-linux/yum/build.sh
index 001caf7..fea748b 100755
--- a/cpp-linux/yum/build.sh
+++ b/cpp-linux/yum/build.sh
@@ -86,9 +86,17 @@ rpmbuild -ba ${rpmbuild_options} rpmbuild/SPECS/${PACKAGE}.spec
BUILD
run chmod +x build.sh
if [ "${distribution_version}" = 6 ]; then
- run scl enable devtoolset-6 ./build.sh
+ if [ "${DEBUG:-no}" = "yes" ]; then
+ run scl enable devtoolset-6 ./build.sh
+ else
+ run scl enable devtoolset-6 ./build.sh > /dev/null
+ fi
else
- run ./build.sh
+ if [ "${DEBUG:-no}" = "yes" ]; then
+ run ./build.sh
+ else
+ run ./build.sh > /dev/null
+ fi
fi
run mv rpmbuild/RPMS/*/* "${rpm_dir}/"
diff --git a/cpp-linux/yum/centos-6/Dockerfile b/cpp-linux/yum/centos-6/Dockerfile
index 1ce5ded..5e83542 100644
--- a/cpp-linux/yum/centos-6/Dockerfile
+++ b/cpp-linux/yum/centos-6/Dockerfile
@@ -17,28 +17,33 @@
FROM centos:6
+ARG DEBUG
+
ENV \
SRPM_DOWNLOAD_URL=http://vault.centos.org/7.3.1611/os/Source/SPackages \
LIBARCHIVE_SRPM_BASE=libarchive-3.1.2-10.el7_2.src.rpm
RUN \
- yum update && \
- yum install -y \
+ quiet=$([ "${DEBUG}" = "yes" ] || echo "--quiet") && \
+ yum update ${quiet} && \
+ yum install -y ${quiet} \
centos-release-scl \
epel-release && \
yum install -y \
autoconf268 \
wget \
yum-utils && \
- yum groupinstall -y "Development Tools" && \
- wget ${SRPM_DOWNLOAD_URL}/${LIBARCHIVE_SRPM_BASE} && \
- yum-builddep -y --nogpgcheck ${LIBARCHIVE_SRPM_BASE} && \
- rpm -i ${LIBARCHIVE_SRPM_BASE} && \
+ 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_autotests$/:/g' ~/rpmbuild/SPECS/libarchive.spec && \
- AUTOM4TE=autom4te268 rpmbuild -bb ~/rpmbuild/SPECS/libarchive.spec && \
- yum install -y ~/rpmbuild/RPMS/*/libarchive-3.*.rpm && \
+ 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 \
+ yum install -y ${quiet} \
boost-devel \
centos-release-scl \
cmake3 \
@@ -54,4 +59,4 @@ RUN \
rpm-build \
rpmdevtools \
tar && \
- yum clean all
+ yum clean ${quiet} all
diff --git a/cpp-linux/yum/centos-6/descriptor.json b/cpp-linux/yum/centos-6/descriptor.json
new file mode 100644
index 0000000..b3833a7
--- /dev/null
+++ b/cpp-linux/yum/centos-6/descriptor.json
@@ -0,0 +1,20 @@
+{
+ "package": {
+ "name": "Yum: CentOS 6",
+ "repo": "apache-arrow-yum-centos-6",
+ "subject": "wesm"
+ },
+ "version": {
+ "name": "0.6.0"
+ },
+ "files": [
+ {
+ "includePattern": "cpp-linux/yum/repositories/centos/6/*/*/(.*\\.rpm)",
+ "uploadPattern": "$1",
+ "matrixParams": {
+ "override": 1
+ }
+ }
+ ],
+ "publish": true
+}
diff --git a/cpp-linux/yum/centos-7/Dockerfile b/cpp-linux/yum/centos-7/Dockerfile
index bd4e8f0..c627699 100644
--- a/cpp-linux/yum/centos-7/Dockerfile
+++ b/cpp-linux/yum/centos-7/Dockerfile
@@ -17,11 +17,14 @@
FROM centos:7
+ARG DEBUG
+
RUN \
- yum update && \
- yum install -y epel-release && \
- yum groupinstall -y "Development Tools" && \
- yum install -y \
+ quiet=$([ "${DEBUG}" = "yes" ] || echo "--quiet") && \
+ yum update ${quiet} && \
+ yum install -y ${quiet} epel-release && \
+ yum groupinstall -y ${quiet} "Development Tools" && \
+ yum install -y ${quiet} \
boost-devel \
cmake3 \
git \
@@ -35,4 +38,4 @@ RUN \
rpm-build \
rpmdevtools \
tar && \
- yum clean all
+ yum clean ${quiet} all
diff --git a/cpp-linux/yum/centos-7/descriptor.json b/cpp-linux/yum/centos-7/descriptor.json
new file mode 100644
index 0000000..7a9459d
--- /dev/null
+++ b/cpp-linux/yum/centos-7/descriptor.json
@@ -0,0 +1,20 @@
+{
+ "package": {
+ "name": "Yum: CentOS 7",
+ "repo": "apache-arrow-yum-centos-7",
+ "subject": "wesm"
+ },
+ "version": {
+ "name": "0.6.0"
+ },
+ "files": [
+ {
+ "includePattern": "cpp-linux/yum/repositories/centos/7/*/*/(.*\\.rpm)",
+ "uploadPattern": "$1",
+ "matrixParams": {
+ "override": 1
+ }
+ }
+ ],
+ "publish": true
+}
--
To stop receiving notification emails like this one, please contact
['"commits@arrow.apache.org" <co...@arrow.apache.org>'].