2017-04-05 17:21:01 +00:00
|
|
|
language: go
|
|
|
|
|
|
|
|
go:
|
2017-11-08 12:23:54 +00:00
|
|
|
- 1.9.x
|
2017-04-05 17:21:01 +00:00
|
|
|
- tip
|
|
|
|
|
2017-09-29 10:39:18 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- libonig-dev
|
|
|
|
|
2017-04-05 17:21:01 +00:00
|
|
|
matrix:
|
|
|
|
allow_failures:
|
|
|
|
- go: tip
|
2017-09-28 13:18:47 +00:00
|
|
|
fast_finish: true
|
2017-04-05 17:21:01 +00:00
|
|
|
|
2017-09-29 10:39:18 +00:00
|
|
|
env:
|
2018-03-28 18:52:49 +00:00
|
|
|
- ONIGURUMA=0
|
|
|
|
- ONIGURUMA=1
|
2017-09-29 10:39:18 +00:00
|
|
|
|
2017-04-05 17:21:01 +00:00
|
|
|
install:
|
2018-05-04 16:53:51 +00:00
|
|
|
- go version
|
2017-04-05 17:21:01 +00:00
|
|
|
- rm -rf $GOPATH/src/gopkg.in/src-d
|
|
|
|
- mkdir -p $GOPATH/src/gopkg.in/src-d
|
2017-06-08 07:27:27 +00:00
|
|
|
- ln -s $PWD $GOPATH/src/gopkg.in/src-d/enry.v1
|
|
|
|
- cd $GOPATH/src/gopkg.in/src-d/enry.v1
|
2018-08-28 15:27:18 +00:00
|
|
|
- if [ "$ONIGURUMA" == "1" ]; then tags="$tags oniguruma"; fi; go get -v -t --tags "$tags" ./...
|
2017-04-05 17:21:01 +00:00
|
|
|
script:
|
2017-06-27 08:42:46 +00:00
|
|
|
- make test-coverage
|
2017-06-21 08:45:27 +00:00
|
|
|
|
|
|
|
after_success:
|
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2017-07-18 12:44:30 +00:00
|
|
|
|
2017-07-18 14:14:59 +00:00
|
|
|
before_deploy:
|
|
|
|
- make packages
|
|
|
|
|
2017-07-18 12:44:30 +00:00
|
|
|
deploy:
|
|
|
|
provider: releases
|
2017-08-23 11:05:57 +00:00
|
|
|
api_key:
|
|
|
|
secure: $GITHUB_TOKEN
|
2017-07-18 12:44:30 +00:00
|
|
|
file_glob: true
|
|
|
|
file: build/*.tar.gz
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
tags: true
|
2017-09-28 13:18:47 +00:00
|
|
|
|
|
|
|
jobs:
|
2017-10-26 15:17:03 +00:00
|
|
|
env:
|
2018-03-28 18:52:49 +00:00
|
|
|
- ONIGURUMA=0
|
2017-09-28 13:18:47 +00:00
|
|
|
include:
|
|
|
|
- stage: test
|
|
|
|
language: scala
|
|
|
|
jdk: oraclejdk8
|
|
|
|
|
|
|
|
install:
|
2018-05-04 16:53:51 +00:00
|
|
|
- GIMME_OUTPUT=$(gimme 1.9 | tee -a $HOME/.bashrc) && eval "$GIMME_OUTPUT"
|
2017-09-28 13:18:47 +00:00
|
|
|
- export GOPATH=$HOME/gopath
|
|
|
|
- mkdir -p $GOPATH/src/gopkg.in/src-d/enry.v1
|
|
|
|
- rsync -az ${TRAVIS_BUILD_DIR}/ $GOPATH/src/gopkg.in/src-d/enry.v1
|
|
|
|
- go get -v gopkg.in/src-d/enry.v1/...
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- cd java
|
|
|
|
- make
|
|
|
|
|
|
|
|
script:
|
|
|
|
- make test
|
|
|
|
|
|
|
|
before_deploy:
|
|
|
|
- cd ..
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key:
|
|
|
|
secure: $GITHUB_TOKEN
|
|
|
|
file:
|
|
|
|
- ./.shared/linux-x86-64/libenry.so
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
|
2018-05-04 16:53:51 +00:00
|
|
|
- stage: Build MacOS shared
|
2017-09-28 13:18:47 +00:00
|
|
|
|
|
|
|
env:
|
2017-11-21 14:29:36 +00:00
|
|
|
- OSXCROSS_PACKAGE="osxcross_3034f7149716d815bc473d0a7b35d17e4cf175aa.tar.gz"
|
|
|
|
- OSXCROSS_URL="https://github.com/bblfsh/client-scala/releases/download/v1.5.2/${OSXCROSS_PACKAGE}"
|
2017-09-28 13:18:47 +00:00
|
|
|
- PATH="/$HOME/osxcross/bin:$PATH"
|
|
|
|
|
|
|
|
sudo: true
|
|
|
|
|
|
|
|
install:
|
|
|
|
- if [[ -z "$TRAVIS_TAG" ]]; then echo "Skipping this build for non-tag builds."; exit 0; fi
|
|
|
|
- rm -rf $GOPATH/src/gopkg.in/src-d
|
|
|
|
- mkdir -p $GOPATH/src/gopkg.in/src-d
|
|
|
|
- ln -s $PWD $GOPATH/src/gopkg.in/src-d/enry.v1
|
|
|
|
- cd $GOPATH/src/gopkg.in/src-d/enry.v1
|
|
|
|
- go get -v -t ./...
|
|
|
|
- sudo apt-get update
|
|
|
|
- sudo apt-get install -y --no-install-recommends clang g++ gcc gcc-multilib libc6-dev libc6-dev-i386 mingw-w64 patch xz-utils
|
2017-11-21 14:29:36 +00:00
|
|
|
- cd ${HOME}
|
2018-08-28 15:27:18 +00:00
|
|
|
- curl -sSL ${OSXCROSS_URL} | tar -C ${HOME} -xzf -
|
2017-09-28 13:18:47 +00:00
|
|
|
- cd $GOPATH/src/gopkg.in/src-d/enry.v1
|
|
|
|
|
|
|
|
script:
|
|
|
|
- make darwin-shared
|
|
|
|
|
|
|
|
before_deploy:
|
|
|
|
- echo "skip before_deploy"
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key:
|
|
|
|
secure: $GITHUB_TOKEN
|
|
|
|
file: ./.shared/darwin/libenry.dylib
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
tags: true
|
2017-09-07 10:44:06 +00:00
|
|
|
|
|
|
|
- stage: Publish Maven
|
|
|
|
language: scala
|
|
|
|
jdk: oraclejdk8
|
|
|
|
|
2018-05-04 16:53:51 +00:00
|
|
|
install:
|
2018-05-09 17:06:03 +00:00
|
|
|
- GIMME_OUTPUT=$(gimme 1.9 | tee -a $HOME/.bashrc) && eval "$GIMME_OUTPUT"
|
|
|
|
- export GOPATH=$HOME/gopath
|
|
|
|
- mkdir -p $GOPATH/src/gopkg.in/src-d/enry.v1
|
|
|
|
- rsync -az ${TRAVIS_BUILD_DIR}/ $GOPATH/src/gopkg.in/src-d/enry.v1
|
|
|
|
- go get -v gopkg.in/src-d/enry.v1/...
|
2018-05-04 16:53:51 +00:00
|
|
|
|
2017-09-07 10:44:06 +00:00
|
|
|
before_script:
|
|
|
|
- if [[ -z "$TRAVIS_TAG" ]]; then echo "Skipping this build for non-tag builds."; exit 0; fi
|
|
|
|
- cd java
|
|
|
|
- make
|
|
|
|
- curl -o ./shared/linux-x86-64/libenry.so -sL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.so"
|
|
|
|
- mkdir -p ./shared/darwin
|
|
|
|
- curl -o ./shared/darwin/libenry.dylib -sL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.dylib"
|
2017-10-02 12:24:33 +00:00
|
|
|
- openssl aes-256-cbc -K $encrypted_a0e1c69dbbc7_key -iv $encrypted_a0e1c69dbbc7_iv -in key.asc.enc -out key.asc -d
|
2017-09-07 10:44:06 +00:00
|
|
|
- gpg --no-default-keyring --primary-keyring ./project/.gnupg/pubring.gpg --secret-keyring ./project/.gnupg/secring.gpg --keyring ./project/.gnupg/pubring.gpg --fingerprint --import key.asc
|
|
|
|
|
|
|
|
script:
|
|
|
|
- make test # ensure the shared objects are functional
|
|
|
|
- ./sbt publishLocal
|
|
|
|
- ./sbt publishSigned
|
|
|
|
- ./sbt sonatypeRelease
|
|
|
|
|
|
|
|
before_deploy:
|
|
|
|
- rm ./target/enry-java-*-javadoc.jar
|
|
|
|
- rm ./target/enry-java-*-sources.jar
|
|
|
|
- rm ./target/enry-java-*-tests.jar
|
|
|
|
- rm ./target/enry-java-assembly-*.jar
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key:
|
|
|
|
secure: $GITHUB_TOKEN
|
|
|
|
file_glob: true
|
|
|
|
file: ./target/enry-java*.jar
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
tags: true
|