forked from confluentinc/confluent-kafka-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
122 lines (107 loc) · 5.31 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
env:
global:
- LIBRDKAFKA_VERSION=v1.7.0
jobs:
include:
- name: "Source package verification with Python 2.7 (Linux)"
os: linux
language: python
dist: xenial
python: "2.7"
env: LD_LIBRARY_PATH="$PWD/tmp-build/lib"
services: docker
- name: "Source package verification with Python 3.6 (Linux)"
os: linux
language: python
dist: xenial
python: "3.6"
env: LD_LIBRARY_PATH="$PWD/tmp-build/lib"
services: docker
- name: "Source package verification with Python 2.7 (OSX)"
os: osx
python: "2.7"
env: DYLD_LIBRARY_PATH="$PWD/tmp-build/lib" INTERPRETER_VERSION="2.7.17"
- name: "Source package verification with Python 3.6 (OSX) +docs"
os: osx
python: "3.6"
env: DYLD_LIBRARY_PATH="$PWD/tmp-build/lib" MK_DOCS="y" INTERPRETER_VERSION="3.6.5"
- name: "Wheels: Windows x64"
if: tag is present
os: windows
language: shell
env: BUILD_WHEELS=1
before_install:
- choco install python --version 3.8.0
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
# make sure it's on PATH as 'python3'
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
install:
- bash tools/wheels/install-librdkafka.sh ${LIBRDKAFKA_VERSION#v} dest
script:
- tools/wheels/build-wheels.bat x64 win_amd64 dest wheelhouse
- name: "Wheels: Windows x86"
if: tag is present
os: windows
language: shell
env: BUILD_WHEELS=1
before_install:
- choco install python --version 3.8.0
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
# make sure it's on PATH as 'python3'
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
install:
- bash tools/wheels/install-librdkafka.sh ${LIBRDKAFKA_VERSION#v} dest
script:
- tools/wheels/build-wheels.bat x86 win32 dest wheelhouse
- name: "Wheels: Linux x64"
if: tag is present
language: python
python: "3.8"
services: docker
env: BUILD_WHEELS=1
script: tools/wheels/build-wheels.sh ${LIBRDKAFKA_VERSION#v} wheelhouse
- name: "Wheels: MacOSX x64"
if: tag is present
os: osx
language: shell
env: BUILD_WHEELS=1
script: tools/wheels/build-wheels.sh ${LIBRDKAFKA_VERSION#v} wheelhouse
# 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" && $BUILD_WHEELS != 1 ]]; then tools/prepare-osx.sh ${INTERPRETER_VERSION} /tmp/venv && source /tmp/venv/bin/activate; fi
install:
# Install interceptors
- tools/install-interceptors.sh
- if [[ $BUILD_WHEELS != 1 ]]; then pip install -r tests/requirements.txt ; fi
- if [[ $MK_DOCS == y ]]; then pip install -r docs/requirements.txt; fi
# Install librdkafka and confluent_kafka[avro] if not building wheels
- if [[ $BUILD_WHEELS != 1 ]]; then pip install -U protobuf && tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp-build ; fi
# Note: Will not be run for wheel builds.
script:
- flake8
# Build package
- pip install --global-option=build_ext --global-option="-Itmp-build/include/" --global-option="-Ltmp-build/lib" . .[avro] .[schema-registry] .[json] .[protobuf]
- ldd staging/libs/* || otool -L staging/libs/* || true
# Run tests
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:staging/libs DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:staging/libs python -m pytest --timeout 600 --ignore=tmp-build || travis_terminate 1; fi
# Build docs
- 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
cleanup: false
on:
repo: confluentinc/confluent-kafka-python
tags: true
condition: "$BUILD_WHEELS == 1"