github.com/confluentinc/confluent-kafka-go@v1.9.2/.travis.yml (about)

     1  language: go
     2  osx_image: xcode9.2
     3  go_import_path: github.com/confluentinc/confluent-kafka-go
     4  env:
     5   global:
     6    - PATH="$PATH:$GOPATH/bin"
     7  
     8  jobs:
     9   include:
    10   - name: "Go 1.16 OSX bundled librdkafka"
    11     go: "1.16"
    12     os: osx
    13     env:
    14      - EXPECT_LINK_INFO="static"
    15   - name: "Go 1.16 Linux bundled librdkafka"
    16     go: "1.16"
    17     os: linux
    18     env:
    19      - EXPECT_LINK_INFO="static"
    20   - name: "Go 1.16 OSX dynamic librdkafka"
    21     if: tag is present
    22     go: "1.16"
    23     os: osx
    24     env:
    25     - EXPECT_LINK_INFO="dynamic"
    26     - BUILD_TYPE='-tags dynamic'
    27     - PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib/pkgconfig"
    28     - LD_LIBRARY_PATH="$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib"
    29     - DYLD_LIBRARY_PATH="$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib"
    30     - LIBRDKAFKA_VERSION=master
    31   - name: "Go 1.16 Linux dynamic librdkafka"
    32     if: tag is present
    33     go: "1.16"
    34     os: linux
    35     env:
    36     - EXPECT_LINK_INFO="dynamic"
    37     - BUILD_TYPE='-tags dynamic'
    38     - PKG_CONFIG_PATH="$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib/pkgconfig"
    39     - LD_LIBRARY_PATH="$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib"
    40     - DYLD_LIBRARY_PATH="$HOME/gopath/src/github.com/confluentinc/confluent-kafka-go/tmp-build/lib"
    41     - LIBRDKAFKA_VERSION=master
    42   - name: "Go 1.16 Windows bundled librdkafka"
    43     go: "1.16"
    44     os: windows
    45     env:
    46      - EXPECT_LINK_INFO="static"
    47  
    48  before_install:
    49    - if [[ $TRAVIS_OS_NAME == linux ]]; then wget -qO - https://packages.confluent.io/deb/5.4/archive.key | sudo apt-key add - ; fi
    50    - if [[ $TRAVIS_OS_NAME == linux ]]; then sudo add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/5.4 stable main" -y ; fi
    51    - if [[ $TRAVIS_OS_NAME == linux ]]; then sudo apt-get update -q ; fi
    52    - if [[ $TRAVIS_OS_NAME == linux ]]; then sudo apt-get install confluent-librdkafka-plugins -y ; fi
    53    - rm -rf tmp-build
    54    - if [[ -n $BUILD_TYPE ]]; then bash mk/bootstrap-librdkafka.sh ${LIBRDKAFKA_VERSION} tmp-build ; fi
    55    - go get -u golang.org/x/lint/golint && touch .do_lint
    56    - |-
    57        case $TRAVIS_OS_NAME in
    58          windows)
    59            ./mk/setup-msys2-mingw64.sh
    60            export PATH=/C/tools/msys64/mingw64/bin:$PATH
    61            export MAKE=mingw32-make  # so that Autotools can find it
    62        esac
    63  
    64  install:
    65    - for dir in kafka examples ; do (cd $dir && go get ${BUILD_TYPE} ./...) ; done
    66    - for dir in kafka examples ; do (cd $dir && go install ${BUILD_TYPE} ./...) ; done
    67  
    68  script:
    69    # should be replaced with golangci-lint
    70    - if [[ -f .do_lint ]]; then golint -set_exit_status ./examples/... ./kafka/... ./kafkatest/... ./soaktest/... ; fi
    71    - for dir in kafka ; do (cd $dir && go test -timeout 180s -v ${BUILD_TYPE} ./...) ; done
    72    - go-kafkacat --help
    73    - library-version
    74    - (library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false)