This repository was archived by the owner on Mar 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
101 lines (90 loc) · 3.23 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
language: scala
# Build and test in Linux --> [if tag] Push .so to GH releases -------|
# |
# Build in OSX -------------> [if tag] Push .dylib to GH releases ------> [if tag] Download so,dylib,dll,
# | build, push to Maven
# Build in Windows ---------> [if tag] Push .dll to GH releases -------|
scala:
- 2.11.11
cache:
directories:
- $HOME/.ivy2
- $HOME/.sbt
stages:
- name: build
- name: release
if: tag IS present
deploy:
provider: releases
api_key:
secure: $GITHUB_TOKEN
file_glob: true
file: src/main/resources/lib/libscalauast*
skip_cleanup: true
on:
tags: true
before_install:
- chmod +x build.sh
- ./build.sh --clean --get-dependencies
jobs:
include:
- &linux_build
name: 'Build and test in Linux'
stage: build
os: linux
dist: xenial
jdk: openjdk8
services:
- docker
before_install:
- docker run --privileged -d -p 9432:9432 --name bblfsh bblfsh/bblfshd
- docker exec -it bblfsh bblfshctl driver install --recommended
- chmod +x build.sh
- ./build.sh --clean --get-dependencies
script:
- ./build.sh --all
- ./sbt test
after_failure: &failure_logs_anchor
- docker logs bblfsh
- ls hs_* 1> /dev/null 2>&1 && cat hs_*
- &osx_build
name: 'Build in OSX'
stage: build
os: osx
osx_image: xcode8.3
before_script:
# This is equivalent macosx-version-min=10.7
- export MACOSX_DEPLOYMENT_TARGET=10.7
# Travis osx support includes oraclejdk8 not openjdk8
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/
script:
- ./build.sh --all
- &windows_build
name: 'Build in Windows'
os: windows
# scala is not available, default one is ruby
language: cpp
before_script:
# Note the revision 8.222 could be changed as long as we update the JAVA_HOME
# variable appropriately. For sbt/scala jdk8 is needed.
- choco install adoptopenjdk8 --version=8.222
- export JAVA_HOME="/C/Program Files/AdoptOpenJDK/jdk8u222-b10"
- export PATH=$PATH:$JAVA_HOME:$JAVA_HOME/bin
script:
- ./build.sh --all
- <<: *linux_build
name: 'Release to Maven'
stage: release
before_script:
- ASSETS_URL="https://github.com/bblfsh/scala-client/releases/download/$TRAVIS_TAG"
- DEST_FOLDER="src/main/resources/lib"
- mkdir -p $DEST_FOLDER
script:
- wget $ASSETS_URL/libscalauast.dylib -O $DEST_FOLDER/libscalauast.dylib
- wget $ASSETS_URL/libscalauast.dll -O $DEST_FOLDER/libscalauast.dll
- openssl aes-256-cbc -K $encrypted_97aef7f4ae04_key -iv $encrypted_97aef7f4ae04_iv -in key.asc.enc -out key.asc -d
- 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
- ./build.sh --all
- ./sbt publishLocal publishSigned sonatypeRelease
deploy:
skip_cleanup: true