forked from akka/akka-grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
144 lines (132 loc) · 8.16 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
language: scala
scala:
- 2.12.11
- 2.13.3
# make sure to fetch enough commits, so that git describe still works
git:
depth: false
env:
global:
# encrypt with: travis encrypt WHITESOURCE_PASSWORD=...
- secure: "Xla2yMk15qjWY7bRzc/4dKUSIr8RhNzHSWZKF4qKzDbctxZcdeefH2r8YSn/STN9XH0/NgTBlYLn0Kfet3U/OU1ZoIPlH7NpSlWPl29KUHnECXGxItNgGA7XUapydJhItCWgswec7qnaeXjhwOrkrQeRdg/dLgQIcbMpdsCvkjP++xUevvS2OvP8dO4RSRDX/B6Q86NCT6zCwxm3MIaiYFY5t1topHcfHBP4n3G9L7FovhtGO/oTqagUe44YXLEY8PbXLLHECaK+KGjTsfH84aYWb8FhLL9va9dEO7tJXTQeRSu3d6o1Cty0aeK2hGZc0jr9Z+QbT9Hw+7wmAms7GL72/dMsBCHX5FAaCkkwt5dRqBeQu/uNF7iSBFnOatyWMc2zsHxbhLcIeLuIko/N7gLOOaTOiPedXKYjG6PxkTedZdmMe2nFTaeMR0d/e1+bSKxNDgshDu4JdBWlpvpAjH28aLG5sheoEXLIM8n+trp+rmLuNYoJVF+dHpGV+40ejTTR0YJAXp85Byit8xTw/MFEZvtWr4pzO2MvZy63zl4aaYlOzAoQ+sVApuCYz+OeR4nzAYoOZT/XycRxgtSh+HK8ymBElD11k7vKSZ8zxrs4MNcKxs7vi0FPUpWZXAxJO/Aa/9P37+KDoBEG+ygnWtwnSFl3i8rzfjvP3gJAvVY="
# encrypt with: travis encrypt BINTRAY_USER=...
- secure: "TM3M64x3yezZkhT6TjjHTTIbZGnzYA4iIZdP0ZlwXa0pJXQRSqAetKwn/mJ1ABL3x3IKH5REk88JMcn/vdj8/n36200hMTQ4Bu1i28AbLeFJUIuAFu+KojEdcZ9jvz46iVhVaXIm0Az/31hQoje5jx6l/r942xFbuWMli8OiFNcACtwEhnhehWfX6JhFIIgUyvaMFbpGkeY9+xqDTSuxw7dFDxQvDem2remUlBHsfMC8wiGC8wWD3AJX/mQXYufSX9fHQiJTle7UnLnVD7P+wdsoYvMTB5m+1bi3ydh2pju5B2OVHP0BzlOpEy1hwb5KDm2BCpWai6gPW1n2tZAXo3vOzltt1V7QiopA5eF+y+54jtWNvqmjO7wnhIW+BK97lfsysvXw5rTw5JbrO7HsV+QR+eHhKUzp3y4CU8cG8nsAAwV5REFZt99jIzrUIbCP8f6cMmCDrzsBpVEp+cSLUOr2PCoJPrxFKaZxlYx62pmfOoOFkdFZpW0+r/d9VsvZ7Fiy1vwKqoGbdmw6mcXlSqvr8X6FxfAmg5PtyBpRpUc50QIa4EQatVQeKqvKWwdm8DSFvS/2jKVXexs/7LzpxtUWnEf5ZHFxkP04gRrjMArOa3e3LGkdQ3csrIs+JApq/6xIxY8l4lGd/xLORwl7wngZqZK1Tjfpcd073wx1RCo="
# encrypt with: travis encrypt BINTRAY_PASS=... (bintray token, not password)
- secure: "MCoJXof5Vrc6o563cK3W+naTOnM9NsV3iqO81NSRyboWadewAWnZy/uhfoi4u0NvzhcTECzMP9Pb2XeGB0ArDuKJ7chHygP84U6ck8Mv7plJ0242mx+4pjFPr461we4PVdjMe4E4RUE4Pqg6FJe4EB76uPfS0rj08tQn59h3ID9BL7i5Memf7KZqIAcANBCD2lFg/ZZQPuPGN1mOuKD1bRvGpl2OqDjFXty4T7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CgvGD6N0RJHN/UKl7sP7hvTF7w/SbcAaI/jv31N+oVV79UyMLqm1U8HRGg2HLMSHiRbYFSOYmsQ5/sYWn7RsJIroDKpFd+I="
matrix:
before_install: curl -Ls https://git.io/jabba | bash && . ~/.jabba/jabba.sh
install: jabba install "$TRAVIS_JDK" && jabba use "$_" && java -Xmx32m -version
stages:
- name: prepare
if: NOT tag =~ ^v
- name: test
if: NOT tag =~ ^v
- name: whitesource
if: repo = akka/akka-grpc AND ((branch = master AND type != pull_request) OR tag =~ ^v)
- name: publish
if: repo = akka/akka-grpc AND ((branch = master AND type != pull_request) OR tag =~ ^v)
jobs:
include:
- stage: prepare
name: Publish local M2
script:
- echo `git describe --tags | sed -e "s/v\(.*\)-\([0-9][0-9]*\).*/\\1-\\2-/"``git rev-parse HEAD | head -c8` > ~/.m2/.version
- cat ~/.m2/.version
- sbt -jvm-opts .jvmopts-travis akka-grpc-codegen/publishM2 akka-grpc-scalapb-protoc-plugin/publishM2 ++2.12.11 akka-grpc-runtime/publishM2 ++2.13.3 akka-grpc-runtime/publishM2
- find ~/.m2/repository/ -print
workspaces:
create:
name: mavenLocal
paths:
- ~/.m2
- ~/.ivy
- ./runtime/target
- ./codegen/target
- ./scalapb-protoc-plugin/target
- name: Checks
script:
- sbt -jvm-opts .jvmopts-travis ++2.13.3 mimaReportBinaryIssues ++2.12.11 mimaReportBinaryIssues headerCheckAll grpcVersionSyncCheck scalafmtCheckAll scalafmtSbtCheck
- name: Compile benchmarks
script:
- cd benchmark-java
- sbt -jvm-opts .jvmopts-travis test:compile
- stage: test
name: Scripted gen-scala-server
script: sbt -jvm-opts .jvmopts-travis "; project sbt-akka-grpc; scripted gen-scala-server/*"
- name: Scripted gen-java
script: sbt -jvm-opts .jvmopts-travis "; project sbt-akka-grpc; scripted gen-java/*"
- name: Gradle Java Scala 2.12
scala: 2.12.11
workspaces:
use: mavenLocal
script:
- cd gradle-plugin
- ./gradlew clean publishToMavenLocal --console=plain --info --stacktrace
- find ~/.m2 | grep gradle
- cd ../plugin-tester-java
- ./gradlew clean test --console=plain --info --stacktrace -Dakka.grpc.project.version=`cat ~/.m2/.version`
- name: Gradle Java Scala 2.13
scala: 2.13.3
workspaces:
use: mavenLocal
script:
- cd gradle-plugin
- ./gradlew clean publishToMavenLocal --console=plain --info --stacktrace
- find ~/.m2 | grep gradle
- cd ../plugin-tester-java
- ./gradlew clean test --console=plain --info --stacktrace -Dakka.grpc.project.version=`cat ~/.m2/.version`
- name: Gradle Scala 2.12
scala: 2.12.11
workspaces:
use: mavenLocal
script:
- cd gradle-plugin
- ./gradlew clean publishToMavenLocal --console=plain --info --stacktrace
- cd ../plugin-tester-scala
- ./gradlew clean test --console=plain --info --stacktrace -Dakka.grpc.project.version=`cat ~/.m2/.version`
- name: Gradle Scala 2.13
scala: 2.13.3
workspaces:
use: mavenLocal
script:
- cd gradle-plugin
- ./gradlew clean publishToMavenLocal --console=plain --info --stacktrace
- cd ../plugin-tester-scala
- ./gradlew clean test --console=plain --info --stacktrace -Dakka.grpc.project.version=`cat ~/.m2/.version`
- name: Test Maven Java
workspaces:
use: mavenLocal
script:
- sbt -jvm-opts .jvmopts-travis akka-grpc-maven-plugin/publishM2
- cd plugin-tester-java
- mvn -Dakka.grpc.project.version=`cat ~/.m2/.version` akka-grpc:generate compile
- name: Test Maven Scala
workspaces:
use: mavenLocal
script:
- sbt -jvm-opts .jvmopts-travis akka-grpc-maven-plugin/publishM2
- cd plugin-tester-scala
- mvn -Dakka.grpc.project.version=`cat ~/.m2/.version` akka-grpc:generate scala:compile
- stage: whitesource
script: git branch -f "$TRAVIS_BRANCH" && git checkout "$TRAVIS_BRANCH" && sbt -jvm-opts .jvmopts-travis whitesourceCheckPolicies whitesourceUpdate
- stage: publish
script: sbt -jvm-opts .jvmopts-travis ++2.12.11 publish && git status && sbt -jvm-opts .jvmopts-travis ++2.13.3 akka-grpc-runtime/publish ++2.13.3! akka-grpc-codegen/publish
name: sbt -jvm-opts .jvmopts-travis publish
- script: openssl aes-256-cbc -K $encrypted_9c9c33071881_key -iv $encrypted_9c9c33071881_iv -in gradle.properties.enc -out ./gradle-plugin/gradle.properties -d && cd gradle-plugin && ./gradlew publishPlugins
name: Gradle plugin
- script: eval "$(ssh-agent -s)" && echo $SCP_SECRET | base64 -d > /tmp/id_rsa && chmod 600 /tmp/id_rsa && ssh-add /tmp/id_rsa && sbt -jvm-opts .jvmopts-travis akka-grpc-docs/publishRsync
name: Documentation
before_cache:
- find $HOME/.ivy2 -name "ivydata-*.properties" -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.jabba/jdk
- $HOME/.sbt
- $HOME/.gradle
- $HOME/.cache/coursier