forked from confluentinc/confluent-kafka-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (65 loc) · 2.68 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
language: go
osx_image: xcode9.2
env:
global:
- PATH="$PATH:$GOPATH/bin"
jobs:
include:
- name: "Go 1.16 OSX bundled librdkafka"
go: "1.16"
os: osx
env:
- EXPECT_LINK_INFO="static"
- name: "Go 1.14 OSX bundled librdkafka"
go: "1.14"
os: osx
env:
- EXPECT_LINK_INFO="static"
- name: "Go 1.16 Linux bundled librdkafka"
go: "1.16"
os: linux
env:
- EXPECT_LINK_INFO="static"
- name: "Go 1.14 Linux bundled librdkafka"
go: "1.14"
os: linux
env:
- EXPECT_LINK_INFO="static"
- name: "Go 1.14 OSX dynamic librdkafka"
go: "1.14"
os: osx
env:
- EXPECT_LINK_INFO="dynamic"
- BUILD_TYPE='-tags dynamic'
- PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib/pkgconfig"
- LD_LIBRARY_PATH="$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib"
- DYLD_LIBRARY_PATH="$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib"
- LIBRDKAFKA_VERSION=master
- name: "Go 1.14 Linux dynamic librdkafka"
go: "1.14"
os: linux
env:
- EXPECT_LINK_INFO="dynamic"
- BUILD_TYPE='-tags dynamic'
- PKG_CONFIG_PATH="$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib/pkgconfig"
- LD_LIBRARY_PATH="$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib"
- DYLD_LIBRARY_PATH="$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib"
- LIBRDKAFKA_VERSION=master
before_install:
- if [[ $TRAVIS_OS_NAME == linux ]]; then wget -qO - https://packages.confluent.io/deb/5.4/archive.key | sudo apt-key add - ; fi
- if [[ $TRAVIS_OS_NAME == linux ]]; then sudo add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/5.4 stable main" -y ; fi
- if [[ $TRAVIS_OS_NAME == linux ]]; then sudo apt-get update -q ; fi
- if [[ $TRAVIS_OS_NAME == linux ]]; then sudo apt-get install confluent-librdkafka-plugins -y ; fi
- rm -rf tmp-build
- if [[ -n $BUILD_TYPE ]]; then bash mk/bootstrap-librdkafka.sh ${LIBRDKAFKA_VERSION} tmp-build ; fi
- go get -u golang.org/x/lint/golint && touch .do_lint
install:
- for dir in kafka examples ; do (cd $dir && go get ${BUILD_TYPE} ./...) ; done
- for dir in kafka examples ; do (cd $dir && go install ${BUILD_TYPE} ./...) ; done
script:
# should be replaced with golangci-lint
- if [[ -f .do_lint ]]; then golint -set_exit_status ./examples/... ./kafka/... ./kafkatest/... ; fi
- for dir in kafka ; do (cd $dir && go test -timeout 180s -v ${BUILD_TYPE} ./...) ; done
- go-kafkacat --help
- library-version
- (library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false)