2018-10-23 11:11:09 +00:00
|
|
|
sudo: false
|
|
|
|
dist: trusty
|
2017-04-05 17:21:01 +00:00
|
|
|
|
2018-10-23 11:11:09 +00:00
|
|
|
language: go
|
2019-02-19 15:00:01 +00:00
|
|
|
go_import_path: gopkg.in/src-d/enry.v1
|
|
|
|
|
2017-04-05 17:21:01 +00:00
|
|
|
go:
|
2019-02-19 15:00:01 +00:00
|
|
|
- '1.11.x'
|
2018-10-22 14:45:47 +00:00
|
|
|
- '1.10.x'
|
2019-02-19 15:00:01 +00:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- GO_VERSION_FOR_JVM='1.11.x'
|
|
|
|
matrix:
|
|
|
|
- ONIGURUMA=0
|
|
|
|
- ONIGURUMA=1
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
2018-10-17 20:22:47 +00:00
|
|
|
|
2017-09-29 10:39:18 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- libonig-dev
|
|
|
|
|
2018-10-17 20:22:47 +00:00
|
|
|
stages:
|
|
|
|
- name: test
|
|
|
|
- name: release
|
|
|
|
if: tag IS present
|
2018-10-23 21:55:57 +00:00
|
|
|
- name: publish
|
|
|
|
if: tag IS present
|
2017-09-28 13:18:47 +00:00
|
|
|
|
2019-02-19 15:00:01 +00:00
|
|
|
stage: test
|
|
|
|
install:
|
|
|
|
- if [[ -n "$ONIGURUMA" ]]; then tags="$tags oniguruma"; fi; go get -v -t --tags "$tags" ./...
|
|
|
|
script:
|
|
|
|
- make test-coverage
|
|
|
|
after_success:
|
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
|
|
|
|
2017-09-28 13:18:47 +00:00
|
|
|
jobs:
|
|
|
|
include:
|
2019-02-19 15:00:01 +00:00
|
|
|
- name: 'java unit-tests'
|
2018-10-17 20:22:47 +00:00
|
|
|
stage: test
|
2017-09-28 13:18:47 +00:00
|
|
|
language: scala
|
|
|
|
jdk: oraclejdk8
|
2019-02-05 21:54:14 +00:00
|
|
|
before_install:
|
|
|
|
# mimics exact behavior of 'go_import_path' for non-go build image
|
|
|
|
- export GOPATH=${TRAVIS_HOME}/gopath
|
|
|
|
- mkdir -p ${GOPATH}/src/gopkg.in/src-d/enry.v1
|
|
|
|
- tar -Pczf ${TRAVIS_TMPDIR}/src_archive.tar.gz -C ${TRAVIS_BUILD_DIR} . && tar -Pxzf ${TRAVIS_TMPDIR}/src_archive.tar.gz -C ${TRAVIS_HOME}/gopath/src/gopkg.in/src-d/enry.v1
|
|
|
|
- export TRAVIS_BUILD_DIR=${TRAVIS_HOME}/gopath/src/gopkg.in/src-d/enry.v1
|
|
|
|
- cd ${TRAVIS_HOME}/gopath/src/gopkg.in/src-d/enry.v1
|
2017-09-28 13:18:47 +00:00
|
|
|
install:
|
2019-02-19 15:00:01 +00:00
|
|
|
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=$GO_VERSION_FOR_JVM bash)"
|
2018-10-22 14:45:47 +00:00
|
|
|
- go version
|
2019-02-05 21:54:14 +00:00
|
|
|
- echo $PWD; echo $GOPATH
|
|
|
|
- go get -v ./...
|
2017-09-28 13:18:47 +00:00
|
|
|
before_script:
|
|
|
|
- cd java
|
|
|
|
- make
|
|
|
|
script:
|
|
|
|
- make test
|
|
|
|
|
2018-10-17 20:22:47 +00:00
|
|
|
- name: 'linux packages'
|
|
|
|
stage: release
|
2018-10-24 06:44:00 +00:00
|
|
|
install:
|
2019-02-19 15:00:01 +00:00
|
|
|
- go version
|
2018-10-24 06:44:00 +00:00
|
|
|
- go get -v -t ./...
|
2018-10-17 20:22:47 +00:00
|
|
|
script: make packages
|
2017-09-28 13:18:47 +00:00
|
|
|
deploy:
|
|
|
|
provider: releases
|
2018-10-17 20:22:47 +00:00
|
|
|
api_key:
|
|
|
|
secure: $GITHUB_TOKEN
|
|
|
|
file_glob: true
|
|
|
|
file: build/*.tar.gz
|
|
|
|
skip_cleanup: true
|
2018-10-24 12:57:53 +00:00
|
|
|
on:
|
|
|
|
tags: true
|
2018-10-17 20:22:47 +00:00
|
|
|
|
|
|
|
- name: 'linux shared lib'
|
|
|
|
stage: release
|
2018-10-23 21:42:17 +00:00
|
|
|
install:
|
2019-02-19 15:00:01 +00:00
|
|
|
- go version
|
2018-10-23 21:42:17 +00:00
|
|
|
- go get -v -t ./...
|
2018-10-17 20:22:47 +00:00
|
|
|
script: make linux-shared
|
|
|
|
deploy:
|
2018-10-24 14:00:44 +00:00
|
|
|
provider: releases
|
2017-09-28 13:18:47 +00:00
|
|
|
api_key:
|
|
|
|
secure: $GITHUB_TOKEN
|
|
|
|
file:
|
|
|
|
- ./.shared/linux-x86-64/libenry.so
|
|
|
|
skip_cleanup: true
|
2018-10-24 12:57:53 +00:00
|
|
|
on:
|
|
|
|
tags: true
|
2017-09-28 13:18:47 +00:00
|
|
|
|
2018-10-17 20:22:47 +00:00
|
|
|
- name: 'macOS shared lib'
|
|
|
|
stage: release
|
|
|
|
sudo: true
|
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"
|
|
|
|
install:
|
2019-02-19 15:00:01 +00:00
|
|
|
- go version
|
2017-09-28 13:18:47 +00:00
|
|
|
- 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-10-23 22:37:52 +00:00
|
|
|
- curl -sfSL ${OSXCROSS_URL} | tar -C ${HOME} -xzf -
|
2017-09-28 13:18:47 +00:00
|
|
|
- cd $GOPATH/src/gopkg.in/src-d/enry.v1
|
2018-10-17 20:22:47 +00:00
|
|
|
script: make darwin-shared
|
2017-09-28 13:18:47 +00:00
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key:
|
|
|
|
secure: $GITHUB_TOKEN
|
|
|
|
file: ./.shared/darwin/libenry.dylib
|
|
|
|
skip_cleanup: true
|
2018-10-24 12:57:53 +00:00
|
|
|
on:
|
|
|
|
tags: true
|
2017-09-07 10:44:06 +00:00
|
|
|
|
2018-10-17 20:22:47 +00:00
|
|
|
- name: 'java: publish to maven'
|
2018-10-23 21:55:57 +00:00
|
|
|
stage: publish
|
2017-09-07 10:44:06 +00:00
|
|
|
language: scala
|
|
|
|
jdk: oraclejdk8
|
2018-05-04 16:53:51 +00:00
|
|
|
install:
|
2019-02-19 15:00:01 +00:00
|
|
|
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=$GO_VERSION_FOR_JVM bash)"
|
2018-10-22 14:45:47 +00:00
|
|
|
- go version
|
2018-05-09 17:06:03 +00:00
|
|
|
- go get -v gopkg.in/src-d/enry.v1/...
|
2017-09-07 10:44:06 +00:00
|
|
|
before_script:
|
|
|
|
- cd java
|
|
|
|
- make
|
2018-10-23 22:37:52 +00:00
|
|
|
- curl -o ./shared/linux-x86-64/libenry.so -sfL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.so" || travis_terminate 1
|
2017-09-07 10:44:06 +00:00
|
|
|
- mkdir -p ./shared/darwin
|
2018-10-23 22:37:52 +00:00
|
|
|
- curl -o ./shared/darwin/libenry.dylib -sfL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.dylib" || travis_terminate 1
|
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
|
2018-10-24 12:57:53 +00:00
|
|
|
on:
|
|
|
|
tags: true
|