@@ -18,28 +18,14 @@ matrix:
18
18
# Source package verification with Python 2.7
19
19
- os : osx
20
20
python : " 2.7"
21
- env : DYLD_LIBRARY_PATH="$PWD/tmp-build/lib"
22
- before_install :
23
- - pip install -U pip && pip install virtualenv
24
- - pyenv install -f 2.7.15
25
- - pip install virtualenv
26
- - virtualenv -p ~/.pyenv/versions/2.7.15/bin/python ./env
27
- - source env/bin/activate
21
+ env : DYLD_LIBRARY_PATH="$PWD/tmp-build/lib" INTERPRETER_VERSION="2.7.17"
28
22
# Source package verification with Python 3.6
29
23
- os : osx
30
24
python : " 3.6"
31
- env : DYLD_LIBRARY_PATH="$PWD/tmp-build/lib" MK_DOCS="y" EXTRA_PKGS="sphinx sphinx_rtd_theme avro-python3"
32
- before_install :
33
- - pip install -U pip && pip install virtualenv
34
- - pyenv install -f 3.6.5
35
- - pip install virtualenv
36
- - virtualenv -p ~/.pyenv/versions/3.6.5/bin/python ./env
37
- - source env/bin/activate
25
+ env : DYLD_LIBRARY_PATH="$PWD/tmp-build/lib" MK_DOCS="y" INTERPRETER_VERSION="3.6.5"
38
26
# cibuildwheel for osx
39
27
- os : osx
40
- env : CIBW_BEFORE_BUILD="tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp" CFLAGS="-Itmp/include" LDFLAGS="-Ltmp/lib"
41
- before_install :
42
- - pip install virtualenv
28
+ env : CIBW_BEFORE_BUILD="tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp" CFLAGS="-Itmp/include" LDFLAGS="-Ltmp/lib" INTERPRETER_VERSION="2.7.17"
43
29
# cibuildwheel for manylinux
44
30
- os : linux
45
31
dist : trusty
@@ -49,30 +35,45 @@ matrix:
49
35
- PYTHON_CONFIGURE_OPTS="--enable-unicode=ucs4 --with-wide-unicode"
50
36
- CIBW_MANYLINUX_X86_64_IMAGE="manylinux1"
51
37
- CIBW_MANYLINUX_I686_IMAGE="manylinux1
38
+ - INTERPRETER_VERSION="2.7.17"
52
39
language : python
53
40
python : " 2.7"
54
41
services : docker
55
42
43
+ # See https://cibuildwheel.readthedocs.io/en/latest/options/ for CIBW* vars
44
+
45
+ # Install test dependencies unconditionally
46
+ # Travis OSX envs requires some setup; see tools/prepare-osx.sh
47
+ # Install cibuildwheel if this is a tagged PR
48
+ 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 cibuildwheel --force-reinstall; fi
51
+
52
+ # Install interceptors
53
+ # Install librdkafka if not CIBW_BEFORE_BUILD
54
+ # Install confluent_kafka[avro] if not CIBW_BEFORE_BUILD
56
55
install :
57
56
- tools/install-interceptors.sh
58
- - pip install -U pip && pip install virtualenv
59
- - if [[ $TRAVIS_OS_NAME == "osx" ]]; then python -m ensurepip && virtualenv /tmp/venv && source /tmp/venv/bin/activate ; fi
60
- - if [[ -z $CIBW_BEFORE_BUILD ]]; then pip install pytest-timeout flake8 trivup; fi
61
- - if [[ -z $CIBW_BEFORE_BUILD ]]; then rm -rf tmp-build ; tools/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} tmp-build ; fi
62
- - if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then pip install cibuildwheel --force-reinstall; fi
63
- - if [[ ! -z $EXTRA_PKGS ]]; then pip install $(echo $EXTRA_PKGS) ; fi
57
+ - pip install -r tests/requirements.txt
58
+ - flake8
59
+ - if [[ $MK_DOCS == y ]]; then pip install -r docs/requirements.txt; fi
60
+ - if [[ -z $CIBW_BEFORE_BUILD ]]; then 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]; fi
64
61
62
+ # Build wheels
65
63
script :
66
- - if [[ -z $CIBW_BEFORE_BUILD ]]; then pip install --global-option=build_ext --global-option="-Itmp-build/include/" --global-option="-Ltmp-build/lib" . .[avro] ; fi
67
- - if [[ -z $CIBW_BEFORE_BUILD ]]; then flake8 ; fi
68
- # Make plugins available for tests
64
+ - if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then cibuildwheel --output-dir wheelhouse1 && tools/fixup-wheels.sh wheelhouse1 wheelhouse; fi
65
+
66
+ # Make plugins available for tests
67
+ # Execute tests if not CIBW_BEFORE_BUILD [osx, linux]
68
+ # Execute integration tests if CIBW_BEFORE_BUILD
69
+ # Build docs if MK_DOCS
70
+ after_script :
69
71
- ldd staging/libs/* || otool -L staging/libs/* || true
70
- - if [[ -z $CIBW_BEFORE_BUILD && $TRAVIS_OS_NAME == "osx" ]]; then DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:staging/libs py.test -v --timeout=60 --ignore=tmp-build --import-mode append ; fi
71
- - if [[ -z $CIBW_BEFORE_BUILD && $TRAVIS_OS_NAME == "linux" ]]; then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:staging/libs py.test -v --timeout=60 --ignore=tmp-build --import-mode append ; fi
72
- - if [[ -n $TRAVIS_TAG && -n $CIBW_BEFORE_BUILD ]]; then cibuildwheel --output-dir wheelhouse1 && tools/fixup-wheels.sh wheelhouse1 wheelhouse ; fi
73
- - if [[ -n $TRAVIS_TAG && $TRAVIS_OS_NAME == linux && -n $CIBW_BEFORE_BUILD ]]; then tools/test-manylinux.sh ; fi
72
+ - if [[ -z $CIBW_BEFORE_BUILD && $TRAVIS_OS_NAME == "osx" ]]; then DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:staging/libs py.test --timeout=60 --ignore=tmp-build --import-mode append; fi
73
+ - if [[ -z $CIBW_BEFORE_BUILD && $TRAVIS_OS_NAME == "linux" ]]; then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:staging/libs py.test --timeout=60 --ignore=tmp-build --import-mode append; fi
74
+ - if [[ -n $TRAVIS_TAG && $TRAVIS_OS_NAME == linux && -n $CIBW_BEFORE_BUILD ]];then tools/test-manylinux.sh; fi
74
75
- if [[ -n $TRAVIS_TAG && $TRAVIS_OS_NAME == osx && -n $CIBW_BEFORE_BUILD ]]; then tools/test-osx.sh; fi
75
- - if [[ $MK_DOCS == y ]]; then make docs ; fi
76
+ - if [[ $MK_DOCS == y ]]; then make docs; fi
76
77
77
78
deploy :
78
79
provider : s3
0 commit comments