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