123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- dist: trusty
- git:
- depth: 9999999
- language: go
- services:
- - docker
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - libxml2-dev
- - gcc-6
- - g++-6
- go_import_path: gopkg.in/src-d/hercules.v4
- go:
- - 1.9.x
- - 1.10.x
- - tip
- cache:
- directories:
- - $HOME/.cache/pip
- - $HOME/gopath/src
- before_cache:
- - rm -rf $HOME/gopath/src/gopkg.in/src-d/hercules.v4
- matrix:
- fast_finish: true
- allow_failures:
- - go: tip
- stages:
- - test
- - deploy
- env:
- - PROTOC_VERSION=3.6.0 TENSORFLOW_VERSION=1.8.0
- before_install:
- - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
- - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90
- - wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
- - unzip -d ~/.local protoc.zip && rm protoc.zip
- - go get -v github.com/golang/lint/golint
- - rm -rf $GOPATH/src/gopkg.in/src-d/go-git.v4
- - git clone --depth 1 https://github.com/src-d/go-git $GOPATH/src/gopkg.in/src-d/go-git.v4
- - wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py --user && rm get-pip.py
- - export PATH=~/usr/bin:$PATH
- - make --version
- - pip3 --version
- - pip3 install --user --no-build-isolation -r requirements.txt tensorflow
- - docker run -d --privileged -p 9432:9432 --name bblfshd bblfsh/bblfshd
- - docker exec -it bblfshd bblfshctl driver install python bblfsh/python-driver:latest
- - docker exec -it bblfshd bblfshctl driver install go bblfsh/go-driver:latest
- - docker exec -it bblfshd bblfshctl driver install java bblfsh/java-driver:latest
- - curl -L "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-$(go env GOOS)-x86_64-$TENSORFLOW_VERSION.tar.gz" | sudo tar -C /usr/local -xz
- - sudo ldconfig
- install:
- - git clean -xfd
- - make
- script:
- - set -e
- - go vet -tags tensorflow ./...
- - golint -set_exit_status ./...
- - if [[ $TRAVIS_GO_VERSION != 1.9.* ]]; then go test -coverpkg=all -v -cpu=1,2 -coverprofile=coverage.txt -covermode=count gopkg.in/src-d/hercules.v4/... && sed -i '/cmd\/hercules\|core.go/d' coverage.txt; fi
- - if [[ $TRAVIS_GO_VERSION = 1.9.* ]]; then go test -v -cpu=1,2 gopkg.in/src-d/hercules.v4/...; fi
- - $GOPATH/bin/hercules version
- - $GOPATH/bin/hercules --burndown --couples --quiet --pb https://github.com/src-d/hercules > 1.pb
- - cp 1.pb 2.pb
- - $GOPATH/bin/hercules combine 1.pb 2.pb > 12.pb
- - ($GOPATH/bin/hercules generate-plugin -n MyPlug -o myplug && cd myplug && make)
- - (cd contrib/_plugin_example && make)
- - $GOPATH/bin/hercules --burndown --burndown-files --burndown-people --couples --quiet https://github.com/src-d/hercules | python3 labours.py -m all -o out --backend Agg --disable-projector
- - $GOPATH/bin/hercules --burndown --burndown-files --burndown-people --couples --quiet --pb https://github.com/src-d/hercules | python3 labours.py -f pb -m all -o out --backend Agg --disable-projector
- - $GOPATH/bin/hercules --sentiment --quiet --languages Python https://github.com/src-d/hercules
- - set +e
- after_success:
- - bash <(curl -s https://codecov.io/bash)
- jobs:
- include:
- - stage: deploy
- os: osx
- osx_image: xcode9.3
- go: 1.10.x
- go_import_path: gopkg.in/src-d/hercules.v4
- before_install:
- - wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-osx-x86_64.zip
- - unzip -d ~/.local protoc.zip && rm protoc.zip
- after_success:
- - gzip -S .darwin_amd64.gz $GOPATH/bin/hercules
- script: skip
- install:
- - DISABLE_TENSORFLOW=1 make
- deploy:
- provider: releases
- api_key:
- secure: $GITHUB_TOKEN
- file: "$GOPATH/bin/hercules.darwin_amd64.gz"
- skip_cleanup: true
- on:
- tags: true
- - stage: deploy
- os: linux
- go: 1.10.x
- go_import_path: gopkg.in/src-d/hercules.v4
- before_install:
- - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
- - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90
- - wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
- - unzip -d ~/.local protoc.zip && rm protoc.zip
- script: skip
- install:
- - DISABLE_TENSORFLOW=1 make
- after_success:
- - gzip -S .linux_amd64.gz $GOPATH/bin/hercules
- deploy:
- provider: releases
- api_key:
- secure: $GITHUB_TOKEN
- file: "$GOPATH/bin/hercules.linux_amd64.gz"
- skip_cleanup: true
- on:
- tags: true
- notifications:
- email: false
|