forked from confluentinc/confluent-kafka-python
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
89 lines (86 loc) · 5.03 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
env:
global:
- LIBRDKAFKA_VERSION=v1.0.1
matrix:
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"
before_install:
- pip install -U pip && pip install virtualenv
- brew update && brew upgrade pyenv
- pyenv install -f 2.7.15
- pip install virtualenv
- virtualenv -p ~/.pyenv/versions/2.7.15/bin/python ./env
- source env/bin/activate
# Source package verification with Python 3.6
- os: osx
python: "3.6"
env: DYLD_LIBRARY_PATH="$PWD/tmp-build/lib"
before_install:
- pip install -U pip && pip install virtualenv
- brew update && brew upgrade pyenv
- pyenv install -f 3.6.5
- pip install virtualenv
- virtualenv -p ~/.pyenv/versions/3.6.5/bin/python ./env
- source env/bin/activate
# cibuildwheel for osx
- os: osx
env: CIBW_BEFORE_BUILD="tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp" CFLAGS="-Itmp/include" LDFLAGS="-Ltmp/lib"
before_install:
- brew update && brew upgrade pyenv
- pip install virtualenv
# cibuildwheel for manylinux
- os: linux
dist: trusty
sudo: required
env: CIBW_BEFORE_BUILD="tools/prepare-cibuildwheel-linux.sh ${LIBRDKAFKA_VERSION}"
language: python
python: "2.7"
services: docker
install:
- tools/install-interceptors.sh
- pip install -U pip && pip install virtualenv
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then python -m ensurepip && virtualenv /tmp/venv && source /tmp/venv/bin/activate ; fi
- if [[ -z $CIBW_BEFORE_BUILD ]]; then pip install pytest-timeout flake8 ; fi
- if [[ -z $CIBW_BEFORE_BUILD ]]; then rm -rf tmp-build ; tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp-build ; fi
- if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then pip install cibuildwheel --force-reinstall; fi
script:
- if [[ -z $CIBW_BEFORE_BUILD ]]; then pip install -v --global-option=build_ext --global-option="-Itmp-build/include/" --global-option="-Ltmp-build/lib" . .[avro] ; fi
- if [[ -z $CIBW_BEFORE_BUILD ]]; then flake8 ; fi
# Make plugins available for tests
- 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 -v --timeout 20 --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 -v --timeout 20 --ignore=tmp-build --import-mode append ; fi
- if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then cibuildwheel --output-dir wheelhouse1 && tools/fixup-wheels.sh wheelhouse1 wheelhouse ; fi
- if [[ -n $TRAVIS_TAG && $TRAVIS_OS_NAME == linux && -n $CIBW_BEFORE_BUILD ]]; then tools/test-manylinux.sh ; fi
- if [[ -n $TRAVIS_TAG && $TRAVIS_OS_NAME == osx && -n $CIBW_BEFORE_BUILD ]]; then tools/test-osx.sh; fi
deploy:
provider: s3
access_key_id:
secure: "Mcp7TRPNt3Eilct5UXRu6dI1NelOtxG0a+y2riKGDCEoWivTDb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nq1blESiCHC6DXmzzcLi1eTBp/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"