forked from confluentinc/confluent-kafka-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (85 loc) · 5.01 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
env:
global:
- LIBRDKAFKA_VERSION=v1.5.0
jobs:
include:
# Source package verification with Python 2.7
- os: linux
language: python
dist: trusty
python: "2.7"
env: LD_LIBRARY_PATH="$PWD/tmp-build/lib"
# Source package verification with Python 3.6
- os: linux
language: python
dist: trusty
python: "3.6"
env: LD_LIBRARY_PATH="$PWD/tmp-build/lib"
# Source package verification with Python 2.7
- os: osx
python: "2.7"
env: DYLD_LIBRARY_PATH="$PWD/tmp-build/lib" INTERPRETER_VERSION="2.7.17"
# Source package verification with Python 3.6
- os: osx
python: "3.6"
env: DYLD_LIBRARY_PATH="$PWD/tmp-build/lib" MK_DOCS="y" INTERPRETER_VERSION="3.6.5"
# cibuildwheel for osx
- os: osx
env: CIBW_BEFORE_BUILD="tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp" CFLAGS="-Itmp/include" LDFLAGS="-Ltmp/lib" INTERPRETER_VERSION="2.7.17"
# cibuildwheel for manylinux
- os: linux
dist: trusty
env:
- CIBW_BEFORE_BUILD="tools/prepare-cibuildwheel-linux.sh ${LIBRDKAFKA_VERSION}"
- PYTHON_CONFIGURE_OPTS="--enable-unicode=ucs4 --with-wide-unicode"
- CIBW_MANYLINUX_X86_64_IMAGE="manylinux1"
- CIBW_MANYLINUX_I686_IMAGE="manylinux1"
language: python
python: "2.7"
services: docker
# See https://cibuildwheel.readthedocs.io/en/latest/options/ for CIBW* vars
# Install test dependencies unconditionally
# Travis OSX envs requires some setup; see tools/prepare-osx.sh
# Install cibuildwheel if this is a tagged PR
before_install:
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then tools/prepare-osx.sh ${INTERPRETER_VERSION} /tmp/venv && source /tmp/venv/bin/activate; fi
- if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then pip install -U -r tools/requirements-manylinux.txt --force-reinstall ; fi
# Install interceptors
# Install librdkafka if not CIBW_BEFORE_BUILD
# Install confluent_kafka[avro] if not CIBW_BEFORE_BUILD
install:
- tools/install-interceptors.sh
- pip install -r tests/requirements.txt
- flake8
- if [[ $MK_DOCS == y ]]; then pip install -r docs/requirements.txt; fi
- if [[ -z $CIBW_BEFORE_BUILD ]]; then tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp-build && pip install --global-option=build_ext --global-option="-Itmp-build/include/" --global-option="-Ltmp-build/lib" . .[avro]; fi
# Build wheels
script:
- if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then cibuildwheel --output-dir wheelhouse1 && tools/fixup-wheels.sh wheelhouse1 wheelhouse; fi
# Make plugins available for tests
# Execute tests if not CIBW_BEFORE_BUILD [osx, linux]
# Execute integration tests if CIBW_BEFORE_BUILD
# Build docs if MK_DOCS
after_script:
- ldd staging/libs/* || otool -L staging/libs/* || true
- if [[ -z $CIBW_BEFORE_BUILD && $TRAVIS_OS_NAME == "osx" ]]; then DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:staging/libs py.test --timeout=60 --ignore=tmp-build --import-mode append; fi
- if [[ -z $CIBW_BEFORE_BUILD && $TRAVIS_OS_NAME == "linux" ]]; then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:staging/libs py.test --timeout=60 --ignore=tmp-build --import-mode append; fi
- if [[ -n $TRAVIS_TAG && $TRAVIS_OS_NAME == osx && -n $CIBW_BEFORE_BUILD ]]; then tools/test-wheel.sh wheelhouse; fi
- if [[ $MK_DOCS == y ]]; then make docs; fi
deploy:
provider: s3
edge: true
access_key_id:
secure: "Mcp7TRPNt3Eilct5UXRu6dI1NelOtxG0a+y2riKGDCEoWivTDbkcFdYFFnV8xOZPZzgTr2W4vNpXNa6SoJar1zs7moVFi0nUweb7EWNuAJZo1JRmzAvoCf3Wvsn2solEHo7jYNsIwm8LHaR9XCypPcFIEyzKEjiPd7wGZucogQEdPIaCC7sCkUcG1y69CtfY+55/68w93JBAQs2uTltF/sue4nQOPAs/urlR6Qy4Sek0BtkzTj3YN7gIB3/7zz/0lNAhx1mkPUJTnCdTWLQKj0BnQmFL4eP1jHbo0BLlHTFrHaiFGkF37wnjw532eXLgEGfgtIFpcx+GmNWZZd7MPEf8wLEBetmdoxLIHaat6uaMYEwgBeP1aTfUDR4loTZf0Mrd2ulzBWL5nbxPD+haGzutLuksMReGJTgAB8bZJKC0KRFPTKUEVdQBr4Vobqd7EKj0+VOoPGEPX7PmsT1dQLGonwnrQ47w/RwpkuriGb0zLhJK1uwUAqCV7IjWncPY6uoKfSClpgEwcknJgcIoLy0n6fyYCPfcQQOBQh+oyb/D8dkFvPmXbNwBH9r6rNJFrA0lx9WhJpIvd4j+amGk5rmGrMEJMSB71QgmujR315qvJE1xasL+RaLJwJLn9Q0fImX8LLROdx5Eb+/N7hyxZkFZ9F43WKkcBLLBEBP/mEY="
secret_access_key:
secure: "Bl7hB0J56ZBt9gJBiiVYiVW0mVwK4Y3oOEqARyVXt5M0OcKb176NI6u5d02LdS575ITdvWAxqarQuV1sr31KNjr4MKt85xz4F+Fzf7Yavz1+eG32G+3mxqrvw82T+j3rojVEqjUqNuEQ9st0RAae/z7lJxAsnWUQ27xLFTVZriayojWX8uzvgB77SQut3qkrgODAMPJGv109TpMeOGZROgvi8LY4EXoQIULk8fJV0C67qiTGFVRwarspdznDrTs9WzKYo84UcErg4cWpmxD2U479EfBmI/7hNC06NU0sxhfnkqVKbb1CdhWXx1b0tmn+cM4GwcFL0MHo54jnYunOlL7/ZB7ckmughN+a5wQm6PiHj64aR6gkIyKBtLXUNo+qW3bD43gCgYfILLcKAV+Oag7fDWDyUsQJJvCGkN3KsRHDCWNk7KYS2FQSoOY3Nq1blESiCHC6DXmzzcLi1eTBp/9Eg5QRNielEb7fJkOJOi0XuygRHzgIf2i3c2acP1i2k1drU6Y/pZSNKO3rkXpUKE4nRf2U0n/HxNB7+G2KWn4ZFYH2o6yZdT4JU3oMEQdFIGuBE3AErkaLscZ6d67r2rwIUTGyFnH5UxRNKjDSsrU+a8A2Psyq6a7JsMqTT/V5b2I2/aLuSWmilGRd9x0CrCtyCkNn+WD+/FXCXfmYQ7g="
bucket: librdkafka-ci-packages
region: us-west-1
local-dir: wheelhouse
upload_dir: confluent-kafka-python/p-confluent-kafka-python__bld-travis__plat-${TRAVIS_OS_NAME}__tag-${TRAVIS_TAG}__sha-${TRAVIS_COMMIT}__bid-${TRAVIS_BUILD_ID}__
acl: public_read
skip_cleanup: true
on:
repo: confluentinc/confluent-kafka-python
tags: true
condition: "-n $CIBW_BEFORE_BUILD"