1
1
env :
2
2
global :
3
- - LIBRDKAFKA_VERSION=v1.6.0-RC1
3
+ - LIBRDKAFKA_VERSION=v1.6.0-RC2
4
+
4
5
jobs :
5
6
include :
6
7
- name : " Source package verification with Python 2.7 (Linux)"
@@ -10,65 +11,94 @@ jobs:
10
11
python : " 2.7"
11
12
env : LD_LIBRARY_PATH="$PWD/tmp-build/lib"
12
13
services : docker
14
+
13
15
- name : " Source package verification with Python 3.6 (Linux)"
14
16
os : linux
15
17
language : python
16
18
dist : xenial
17
19
python : " 3.6"
18
20
env : LD_LIBRARY_PATH="$PWD/tmp-build/lib"
19
21
services : docker
22
+
20
23
- name : " Source package verification with Python 2.7 (OSX)"
21
24
os : osx
22
25
python : " 2.7"
23
26
env : DYLD_LIBRARY_PATH="$PWD/tmp-build/lib" INTERPRETER_VERSION="2.7.17"
27
+
24
28
- name : " Source package verification with Python 3.6 (OSX) +docs"
25
29
os : osx
26
30
python : " 3.6"
27
31
env : DYLD_LIBRARY_PATH="$PWD/tmp-build/lib" MK_DOCS="y" INTERPRETER_VERSION="3.6.5"
28
- - name : " cibuildwheel (OSX)"
29
- os : osx
30
- env : CIBW_BEFORE_BUILD="tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp" CFLAGS="-Itmp/include" LDFLAGS="-Ltmp/lib" INTERPRETER_VERSION="2.7.17"
31
- - name : " cibuildwheel (manylinux)"
32
- os : linux
33
- dist : xenial
34
- env :
35
- - CIBW_BEFORE_BUILD="tools/prepare-cibuildwheel-linux.sh ${LIBRDKAFKA_VERSION}"
36
- - PYTHON_CONFIGURE_OPTS="--enable-unicode=ucs4 --with-wide-unicode"
37
- - CIBW_MANYLINUX_X86_64_IMAGE="manylinux2010"
38
- - CIBW_MANYLINUX_I686_IMAGE="manylinux2010"
39
- language : python
40
- python : " 2.7"
32
+
33
+ - name : " Wheels: Windows x64"
34
+ if : tag is present
35
+ os : windows
36
+ language : shell
37
+ env : BUILD_WHEELS=1
38
+ before_install :
39
+ - choco install python --version 3.8.0
40
+ - export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
41
+ # make sure it's on PATH as 'python3'
42
+ - ln -s /c/Python38/python.exe /c/Python38/python3.exe
43
+ install :
44
+ - bash tools/wheels/install-librdkafka.sh ${LIBRDKAFKA_VERSION#v} dest
45
+ script :
46
+ - tools/wheels/build-wheels.bat x64 win_amd64 dest wheelhouse
47
+
48
+ - name : " Wheels: Windows x86"
49
+ if : tag is present
50
+ os : windows
51
+ language : shell
52
+ env : BUILD_WHEELS=1
53
+ before_install :
54
+ - choco install python --version 3.8.0
55
+ - export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
56
+ # make sure it's on PATH as 'python3'
57
+ - ln -s /c/Python38/python.exe /c/Python38/python3.exe
58
+ install :
59
+ - bash tools/wheels/install-librdkafka.sh ${LIBRDKAFKA_VERSION#v} dest
60
+ script :
61
+ - tools/wheels/build-wheels.bat x86 win32 dest wheelhouse
62
+
63
+ - name : " Wheels: Linux x64"
64
+ if : tag is present
41
65
services : docker
66
+ env : BUILD_WHEELS=1
67
+ script : tools/wheels/build-wheels.sh ${LIBRDKAFKA_VERSION#v} wheelhouse
68
+
69
+ - name : " Wheels: MacOSX x64"
70
+ if : tag is present
71
+ os : osx
72
+ language : shell
73
+ env : BUILD_WHEELS=1
74
+ script : tools/wheels/build-wheels.sh ${LIBRDKAFKA_VERSION#v} wheelhouse
42
75
43
- # See https://cibuildwheel.readthedocs.io/en/latest/options/ for CIBW* vars
44
76
45
77
# Install test dependencies unconditionally
46
78
# Travis OSX envs requires some setup; see tools/prepare-osx.sh
47
79
# Install cibuildwheel if this is a tagged PR
48
80
before_install :
49
- - if [[ $TRAVIS_OS_NAME == "osx" ]]; then tools/prepare-osx.sh ${INTERPRETER_VERSION} /tmp/venv && source /tmp/venv/bin/activate; fi
50
- - if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then pip install -U -r tools/requirements-manylinux.txt --force-reinstall ; fi
81
+ - if [[ $TRAVIS_OS_NAME == "osx" && $BUILD_WHEELS != 1 ]]; then tools/prepare-osx.sh ${INTERPRETER_VERSION} /tmp/venv && source /tmp/venv/bin/activate; fi
51
82
52
- # Install interceptors
53
- # Install librdkafka if not CIBW_BEFORE_BUILD
54
- # Install confluent_kafka[avro] if not CIBW_BEFORE_BUILD
55
83
install :
84
+ # Install interceptors
56
85
- tools/install-interceptors.sh
57
- - pip install -r tests/requirements.txt
58
- - flake8
86
+ - if [[ $BUILD_WHEELS != 1 ]]; then pip install -r tests/requirements.txt ; fi
59
87
- if [[ $MK_DOCS == y ]]; then pip install -r docs/requirements.txt; fi
60
- - if [[ -z $CIBW_BEFORE_BUILD ]]; then pip install -U protobuf && 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] .[schema-registry] .[json] .[protobuf] ; fi
88
+ # Install librdkafka and confluent_kafka[avro] if not building wheels
89
+ - if [[ $BUILD_WHEELS != 1 ]]; then pip install -U protobuf && tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp-build ; fi
90
+
61
91
62
- # Build wheels
63
- # Make plugins available for tests
64
- # Execute tests if not CIBW_BEFORE_BUILD [osx, linux]
65
- # Execute integration tests if CIBW_BEFORE_BUILD
66
- # Build docs if MK_DOCS
92
+
93
+ # Note: Will not be run for wheel builds.
67
94
script :
68
- - if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then cibuildwheel --output-dir wheelhouse1 && tools/fixup-wheels.sh wheelhouse1 wheelhouse; fi
95
+ - flake8
96
+ # Build package
97
+ - pip install --global-option=build_ext --global-option="-Itmp-build/include/" --global-option="-Ltmp-build/lib" . .[avro] .[schema-registry] .[json] .[protobuf]
69
98
- ldd staging/libs/* || otool -L staging/libs/* || true
70
- - if [[ -z $CIBW_BEFORE_BUILD && $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
71
- - if [[ -n $TRAVIS_TAG && $TRAVIS_OS_NAME == osx && -n $CIBW_BEFORE_BUILD ]]; then tools/test-wheels.sh wheelhouse; fi
99
+ # Run tests
100
+ - 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
101
+ # Build docs
72
102
- if [[ $MK_DOCS == y ]]; then make docs; fi
73
103
74
104
deploy :
0 commit comments