forked from confluentinc/confluent-kafka-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
98 lines (88 loc) · 4.49 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
env:
global:
- LIBRDKAFKA_VERSION=v1.9.2
jobs:
include:
- name: "Source package verification with Python 3.8 (Linux)"
os: linux
language: python
dist: xenial
python: "3.8"
env: LD_LIBRARY_PATH="$PWD/tmp-build/lib"
services: docker
- 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:
# 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
# Checksum artifacts to build log
- sha256sum wheelhouse/* || true
deploy:
provider: s3
edge: true
access_key_id:
secure: "HGz8fJ0DLM0T7BddjuSBpPw+mRAmp1vP1xbl+gfhPsPTmXfjeAczj1YekfH6yrro7I3JwwNfXtUIofgRSeVW3Hl6rCI+ODnF82TFdjo/7yA3owUaVc4rx1qau6oMBCYWFCoHrQo+qHJ+bMpG1ppZvRR+pgaY+YBCTkki4p3q0MKYppnZmC89pvJkOBZatNUxzhZLcyMykShN+cdp3z7o2oED9/IJ8m30g0mkt/jIUZFdTiK/mQ2NxcZn667AAsSnyOud1pdXeg+UMvjR6U2thESw7DJpKyWJqv2eU/8SWGQyzvom+W44ZWdgjtqHo1ObTcKR2PHB3yYx6kixo5Wp9PUP/c0jAj78k+BURs/XXKj5fk/mM9FDlJpFv4FUDbhl1tTLdKNEltRYfjPfNApb963QEx0VyXWSxnBEVdOoi3SSdlx80EnYxPX3OfMKvIeYFTIURow7E1YMHl4kvBuYxRAUPjiuNn43jfqkgRhkdY7YaofJvu2hDw/togD1uUemP49QoCP9aC0TJ3aF/qfpcpoc8g8K6sF0cu5uOGyU2LGtYK0uYVZzkMKTX6QBP8I8SJU0Zw2Xprtwl7/qtZri47N83f5/WrWMNIVLOKdbLxPC2piT6N3M3aBt5l07dkEDmnzen585mQrNNbuXg/Din3D1XpGPWUxAZjw/LfcOR+A="
secret_access_key:
secure: "YBAWciQ0WIhFJw/V72iERmukozz1hxd3HVbrhedHiNotYa53kQMd9qz9p6c4aJUF/y6xPrctCRVK1fUYlKVFJzCyPp5TOdqHcv56q9X9ip4Mt+oVwzbtdeHxGX+AYkr6sSn6xNlE6uNFaTVPzQ1EAL9WfhVkcuYDdponr8yc/HnCOIjafa7LZmtefnEpwhU1sAlyJFVeJkQfagZlmrz7cMiDpsvI10GXydJGWmwLoUTEKQiUf1ZKSlVd92bAWmALyCXmUZ0aS7SisO54580AsOR1TdWNIKZJ21n7PYY08GtoJtb9593CLgK0Z3FtTo2GZQbd2jehWA7ag8ku4e8rYNb78dSalKcN86kFH7GR6UJL+pL1c8O4LIJMzKALFcqpHYlxmyhPIzCCfVlCIWxwk/qTloa7dNBODb0vqAJJEbZ3q950Ig93gyU1kxiE8dwHkrQzlJCyufNtPY51Kv8MGa7n+/tI9z4LK4VVz+w4CrCzzl8T7SpWV4w+BKMKkymR4hL4JrpLnB8egpRqIL/V3E61qA1x9ik5Ck2AP+wEshiou3oJZ7BU0cGmp0ttVidwZ96sp2wxStulouQDwuT1A6jkvcCt5s3pM3eYIrucYk/mtBwHoz8DyYZH1Ds1JmTffCe4ZeEfFzIC5RIzpbj90t03aTd4oYVgYETPPyfdqhU="
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}__
cleanup: false
on:
repo: confluentinc/confluent-kafka-python
tags: true
condition: "$BUILD_WHEELS == 1"