11env :
22 global :
3- - LIBRDKAFKA_VERSION=v1.6.0-RC1
3+ - LIBRDKAFKA_VERSION=v1.6.0-RC2
4+
45jobs :
56 include :
67 - name : " Source package verification with Python 2.7 (Linux)"
@@ -10,65 +11,96 @@ jobs:
1011 python : " 2.7"
1112 env : LD_LIBRARY_PATH="$PWD/tmp-build/lib"
1213 services : docker
14+
1315 - name : " Source package verification with Python 3.6 (Linux)"
1416 os : linux
1517 language : python
1618 dist : xenial
1719 python : " 3.6"
1820 env : LD_LIBRARY_PATH="$PWD/tmp-build/lib"
1921 services : docker
22+
2023 - name : " Source package verification with Python 2.7 (OSX)"
2124 os : osx
2225 python : " 2.7"
2326 env : DYLD_LIBRARY_PATH="$PWD/tmp-build/lib" INTERPRETER_VERSION="2.7.17"
27+
2428 - name : " Source package verification with Python 3.6 (OSX) +docs"
2529 os : osx
2630 python : " 3.6"
2731 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"
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
3965 language : python
40- python : " 2.7 "
66+ python : " 3.8 "
4167 services : docker
68+ env : BUILD_WHEELS=1
69+ script : tools/wheels/build-wheels.sh ${LIBRDKAFKA_VERSION#v} wheelhouse
70+
71+ - name : " Wheels: MacOSX x64"
72+ if : tag is present
73+ os : osx
74+ language : shell
75+ env : BUILD_WHEELS=1
76+ script : tools/wheels/build-wheels.sh ${LIBRDKAFKA_VERSION#v} wheelhouse
4277
43- # See https://cibuildwheel.readthedocs.io/en/latest/options/ for CIBW* vars
4478
4579# Install test dependencies unconditionally
4680# Travis OSX envs requires some setup; see tools/prepare-osx.sh
4781# Install cibuildwheel if this is a tagged PR
4882before_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
83+ - if [[ $TRAVIS_OS_NAME == "osx" && $BUILD_WHEELS != 1 ]]; then tools/prepare-osx.sh ${INTERPRETER_VERSION} /tmp/venv && source /tmp/venv/bin/activate; fi
5184
52- # Install interceptors
53- # Install librdkafka if not CIBW_BEFORE_BUILD
54- # Install confluent_kafka[avro] if not CIBW_BEFORE_BUILD
5585install :
86+ # Install interceptors
5687 - tools/install-interceptors.sh
57- - pip install -r tests/requirements.txt
58- - flake8
88+ - if [[ $BUILD_WHEELS != 1 ]]; then pip install -r tests/requirements.txt ; fi
5989 - 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
90+ # Install librdkafka and confluent_kafka[avro] if not building wheels
91+ - if [[ $BUILD_WHEELS != 1 ]]; then pip install -U protobuf && tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp-build ; fi
92+
6193
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
94+
95+ # Note: Will not be run for wheel builds.
6796script :
68- - if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then cibuildwheel --output-dir wheelhouse1 && tools/fixup-wheels.sh wheelhouse1 wheelhouse; fi
97+ - flake8
98+ # Build package
99+ - pip install --global-option=build_ext --global-option="-Itmp-build/include/" --global-option="-Ltmp-build/lib" . .[avro] .[schema-registry] .[json] .[protobuf]
69100 - 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
101+ # Run tests
102+ - 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
103+ # Build docs
72104 - if [[ $MK_DOCS == y ]]; then make docs; fi
73105
74106deploy :
@@ -87,4 +119,4 @@ deploy:
87119 on :
88120 repo : confluentinc/confluent-kafka-python
89121 tags : true
90- condition : " -n $CIBW_BEFORE_BUILD "
122+ condition : " $BUILD_WHEELS == 1 "
0 commit comments