.travis.yml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. dist: trusty
  2. git:
  3. depth: 9999999
  4. language: go
  5. services:
  6. - docker
  7. addons:
  8. apt:
  9. sources:
  10. - ubuntu-toolchain-r-test
  11. packages:
  12. - libxml2-dev
  13. - gcc-6
  14. - g++-6
  15. go_import_path: gopkg.in/src-d/hercules.v3
  16. go:
  17. - 1.8
  18. - 1.9
  19. stages:
  20. - test
  21. - deploy
  22. env:
  23. - PROTOC_VERSION=3.5.1
  24. before_install:
  25. - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
  26. - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90
  27. - wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
  28. - unzip -d ~/.local protoc.zip && rm protoc.zip
  29. - go get -v github.com/golang/lint/golint
  30. - git clone --depth 1 https://github.com/src-d/go-git $GOPATH/src/gopkg.in/src-d/go-git.v4
  31. - wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py --user && rm get-pip.py
  32. - export PATH=~/usr/bin:$PATH
  33. - make --version
  34. - pip3 --version
  35. - pip3 install --user -r requirements.txt tensorflow
  36. - docker run -d --privileged -p 9432:9432 --name bblfshd bblfsh/bblfshd
  37. - docker exec -it bblfshd bblfshctl driver install --all
  38. install:
  39. - make
  40. script:
  41. - set -e
  42. - go vet ./...
  43. - golint -set_exit_status ./...
  44. - go test -v -cpu=1,2 -coverprofile=coverage.txt -covermode=count gopkg.in/src-d/hercules.v3
  45. - $GOPATH/bin/hercules version
  46. - $GOPATH/bin/hercules --burndown --couples --quiet --pb https://github.com/src-d/hercules > 1.pb
  47. - cp 1.pb 2.pb
  48. - $GOPATH/bin/hercules combine 1.pb 2.pb > 12.pb
  49. - ($GOPATH/bin/hercules generate-plugin -n MyPlug -o myplug && cd myplug && make)
  50. - (cd contrib/_plugin_example && make)
  51. - $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
  52. - $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
  53. - set +e
  54. after_success:
  55. - bash <(curl -s https://codecov.io/bash)
  56. jobs:
  57. include:
  58. - stage: deploy
  59. os: osx
  60. go: 1.9
  61. before_install:
  62. - wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-osx-x86_64.zip
  63. - unzip -d ~/.local protoc.zip && rm protoc.zip
  64. after_success:
  65. - gzip -S .darwin_amd64.gz $GOPATH/bin/hercules
  66. script: skip
  67. install:
  68. - make
  69. deploy:
  70. provider: releases
  71. api_key:
  72. secure: $GITHUB_TOKEN
  73. file: "$GOPATH/bin/hercules.darwin_amd64.gz"
  74. skip_cleanup: true
  75. on:
  76. tags: true
  77. - stage: deploy
  78. os: linux
  79. go: 1.9
  80. before_install:
  81. - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
  82. - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90
  83. - wget -O protoc.zip https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
  84. - unzip -d ~/.local protoc.zip && rm protoc.zip
  85. script: skip
  86. install:
  87. - make
  88. after_success:
  89. - gzip -S .linux_amd64.gz $GOPATH/bin/hercules
  90. deploy:
  91. provider: releases
  92. api_key:
  93. secure: $GITHUB_TOKEN
  94. file: "$GOPATH/bin/hercules.linux_amd64.gz"
  95. skip_cleanup: true
  96. on:
  97. tags: true
  98. notifications:
  99. email: false