Skip to content

Commit 978de1a

Browse files
committed
ARROW-204: Add Travis CI builds that post conda artifacts for Linux and OS X
I tested this on my fork of Arrow, but ultimately we'll see if it works when the commit hits master. I've arranged so that packaging issues won't fail the build. Author: Wes McKinney <wesm@apache.org> Closes #79 from wesm/ARROW-204 and squashes the following commits: afd0582 [Wes McKinney] Change encrypted token to apache/arrow, only upload on commits to master 58955e5 [Wes McKinney] Draft of automated conda builds for libarrow, pyarrow. Remove unneeded thrift-cpp build dependency
1 parent 9c59158 commit 978de1a

File tree

4 files changed

+95
-5
lines changed

4 files changed

+95
-5
lines changed

.travis.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
sudo: required
2-
dist: precise
2+
dist: precise
33
addons:
44
apt:
55
sources:
@@ -18,6 +18,9 @@ addons:
1818
- valgrind
1919

2020
matrix:
21+
fast_finish: true
22+
allow_failures:
23+
- env: ARROW_TEST_GROUP=packaging
2124
include:
2225
- compiler: gcc
2326
language: cpp
@@ -39,6 +42,24 @@ matrix:
3942
script:
4043
- $TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh
4144
- $TRAVIS_BUILD_DIR/ci/travis_script_python.sh
45+
- compiler: gcc
46+
env: ARROW_TEST_GROUP=packaging
47+
os: linux
48+
before_script:
49+
- export CC="gcc-4.9"
50+
- export CXX="g++-4.9"
51+
script:
52+
- $TRAVIS_BUILD_DIR/ci/travis_conda_build.sh
53+
- os: osx
54+
env: ARROW_TEST_GROUP=packaging
55+
language: objective-c
56+
osx_image: xcode6.4
57+
compiler: clang
58+
addons:
59+
before_script:
60+
before_install:
61+
script:
62+
- $TRAVIS_BUILD_DIR/ci/travis_conda_build.sh
4263

4364
before_install:
4465
- ulimit -c unlimited -S
@@ -51,3 +72,7 @@ after_script:
5172
after_failure:
5273
- COREFILE=$(find . -maxdepth 2 -name "core*" | head -n 1)
5374
- if [[ -f "$COREFILE" ]]; then gdb -c "$COREFILE" example -ex "thread apply all bt" -ex "set pagination 0" -batch; fi
75+
76+
env:
77+
global:
78+
- secure: "GcrPtsKUCgNY7HKYjWlHQo8SiFrShDvdZSU8t1m1FJrE+UfK0Dgh9zXmAausM8GmhqSwkF0q4UbLQf2uCnSITWKeEPAL8Mo9eu4ib+ikJx/b3Sk81frgW5ADoHfW1Eyqd8xJNIMwMegJOtRLSDqiXh1CvMlKnY8PyTOGM2DgN9ona/v6p9OFH9Qs0JhBRVXAn0S4ztjumck8E56+01hqRfxbZ88pTfpKghBxYp9PJaMjtGdomjVWlqPaWaWJj+KptT8inV9NK+TVYKx0dXWD+S1Vgr1PytQnLdILOYV23gsOBYqn33ByF/yADl4m3hUjU/qeT0Fi7aWxmVpj+oTJISOSH5N8nIsuNH8mQk2ZzzXHfV7btFvP+cOPRczadoKkT6D6cHA8nQ7b0dphC6bl6SAeSfc/cbhRT+fYnIjg8jFXC8jlyWBr7LR6GXVpc0bND7i300ITo0FuRJhy2OxqPtGo3dKLE7eAcv78tuO0OYJ/kol1PEqFdFkbYbNVbg/cFpbGqiCXDsOtPDbAGBv69YnXdVowSxxs8cRGjSkDydv6ZSytb/Zd4lH/KAomcFNk8adx12O1Lk4sbmVav1cGig5P6OcQKS0jC5IiRb4THcQzVzAkXXbaafKm5sru/NoYxhzmkyhkOc11nTYHKVng+XKWzLCNn7pTTSLitp5+xa4="

ci/travis_conda_build.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [ $TRAVIS_OS_NAME == "linux" ]; then
6+
MINICONDA_URL="https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh"
7+
else
8+
MINICONDA_URL="https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh"
9+
fi
10+
11+
wget -O miniconda.sh $MINICONDA_URL
12+
MINICONDA=$TRAVIS_BUILD_DIR/miniconda
13+
bash miniconda.sh -b -p $MINICONDA
14+
export PATH="$MINICONDA/bin:$PATH"
15+
conda update -y -q conda
16+
conda info -a
17+
18+
conda config --set show_channel_urls yes
19+
conda config --add channels conda-forge
20+
conda config --add channels apache
21+
22+
conda install --yes conda-build jinja2 anaconda-client
23+
24+
# faster builds, please
25+
conda install -y nomkl
26+
27+
# Build libarrow
28+
29+
cd $TRAVIS_BUILD_DIR/cpp
30+
31+
conda build conda.recipe --channel apache/channel/dev
32+
CONDA_PACKAGE=`conda build --output conda.recipe | grep bz2`
33+
34+
if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then
35+
anaconda --token $ANACONDA_TOKEN upload $CONDA_PACKAGE --user apache --channel dev;
36+
fi
37+
38+
# Build pyarrow
39+
40+
cd $TRAVIS_BUILD_DIR/python
41+
42+
build_for_python_version() {
43+
PY_VERSION=$1
44+
conda build conda.recipe --python $PY_VERSION --channel apache/channel/dev
45+
CONDA_PACKAGE=`conda build --python $PY_VERSION --output conda.recipe | grep bz2`
46+
47+
if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then
48+
anaconda --token $ANACONDA_TOKEN upload $CONDA_PACKAGE --user apache --channel dev;
49+
fi
50+
}
51+
52+
build_for_python_version 2.7
53+
build_for_python_version 3.5

cpp/conda.recipe/build.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@ cd $RECIPE_DIR
99
export FLATBUFFERS_HOME=$PREFIX
1010
export PARQUET_HOME=$PREFIX
1111

12+
if [ "$(uname)" == "Darwin" ]; then
13+
# C++11 finagling for Mac OSX
14+
export CC=clang
15+
export CXX=clang++
16+
export MACOSX_VERSION_MIN="10.7"
17+
CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}"
18+
CXXFLAGS="${CXXFLAGS} -stdlib=libc++ -std=c++11"
19+
export LDFLAGS="${LDFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}"
20+
export LDFLAGS="${LDFLAGS} -stdlib=libc++ -std=c++11"
21+
export LINKFLAGS="${LDFLAGS}"
22+
export MACOSX_DEPLOYMENT_TARGET=10.7
23+
fi
24+
1225
cd ..
1326

1427
rm -rf conda-build
@@ -33,7 +46,7 @@ elif [ `uname` == Darwin ]; then
3346
fi
3447

3548
cmake \
36-
-DCMAKE_BUILD_TYPE=debug \
49+
-DCMAKE_BUILD_TYPE=release \
3750
-DCMAKE_INSTALL_PREFIX=$PREFIX \
3851
-DCMAKE_SHARED_LINKER_FLAGS=$SHARED_LINKER_FLAGS \
3952
-DARROW_IPC=on \

cpp/conda.recipe/meta.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ requirements:
1515
- cmake
1616
- flatbuffers
1717
- parquet-cpp
18-
- thrift-cpp
1918

2019
run:
2120
- parquet-cpp
2221

2322
test:
2423
commands:
25-
- test -f $PREFIX/lib/libarrow.so
26-
- test -f $PREFIX/lib/libarrow_parquet.so
24+
- test -f $PREFIX/lib/libarrow.so # [linux]
25+
- test -f $PREFIX/lib/libarrow_parquet.so # [linux]
2726
- test -f $PREFIX/include/arrow/api.h
2827

2928
about:

0 commit comments

Comments
 (0)