forked from scala/scala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
175 lines (155 loc) · 6.95 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
version: ~> 1.0 # needed for imports
import: scala/scala-dev:travis/default.yml
dist: xenial # GPG stuff breaks on bionic; scala/scala-dev#764
language: scala
stages:
- build
- test
templates: # this has no effect on travis, it's just a place to put our templates
pr-jdk8: &pr-jdk8
if: type = pull_request OR repo != scala/scala
cron-jdk17: &cron-jdk17
if: type = cron AND repo = scala/scala
env: ADOPTOPENJDK=17
build-for-testing: &build-for-testing
# pull request validation (w/ bootstrap)
# differs from the build that publishes releases / integration builds:
# - not using bash script setup, but just the underlying sbt calls
# - publishing locally rather than to Artifactory
# the bootstrap above is older historically; this way of doing it is newer
# and also simpler. we should aim to reduce/eliminate the duplication.
stage: build
name: build, publishLocal, build again
script:
- set -e
- sbt -Dsbt.scala.version=2.12.18-M2 setupPublishCore generateBuildCharacterPropertiesFile headerCheck publishLocal
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
- sbt -Dsbt.scala.version=2.12.18-M2 -Dstarr.version=$STARR setupValidateTest compile
workspaces:
create:
name: bootstrapped
paths:
# so new STARR will be available
- "buildcharacter.properties"
- "$HOME/.ivy2/local/org.scala-lang"
# so build products built using new STARR are kept
- "target"
- "project/target"
- "project/project/target"
- "project/project/project/target"
- "dist"
- "build"
test1: &test1
stage: test
name: tests (junit, scalacheck, et al)
workspaces:
use: bootstrapped
script:
- set -e
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
- sbt -Dsbt.scala.version=2.12.18-M2 -Dstarr.version=$STARR setupValidateTest Test/compile testAll1
test2: &test2
stage: test
name: tests (partest)
workspaces:
use: bootstrapped
script:
- set -e
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
- sbt -Dsbt.scala.version=2.12.18-M2 -Dstarr.version=$STARR setupValidateTest testAll2
jobs:
include:
- stage: build
if: (type = push OR type = api) AND repo = scala/scala # api for manually triggered release builds
name: publish (bootstrapped) to scala-integration or sonatype
script:
# see comment in `bootstrap_fun` for details on the procedure
# env available in each stage
# - by travis config (see below): secret env vars
# - by `common` script: WORKSPACE, IVY2_DIR, SBT_CMD, integrationRepoUrl
# - by `bootstrap_fun`: publishPrivateTask, ...
- set -e
- (cd admin && ./init.sh)
- source scripts/common
- source scripts/bootstrap_fun
- determineScalaVersion
- removeExistingBuilds $integrationRepoUrl
- if [ ! -z "$STARR_REF" ]; then buildStarr; fi
- buildLocker
- buildQuick
- triggerScalaDist
- <<: *build-for-testing
<<: *pr-jdk8
- <<: *test1
<<: *pr-jdk8
- <<: *test2
<<: *pr-jdk8
- <<: *build-for-testing
<<: *cron-jdk17
- <<: *test1
<<: *cron-jdk17
- <<: *test2
<<: *cron-jdk17
- stage: test
name: build library with Scala 3
if: type = pull_request OR repo != scala/scala
workspaces:
use: bootstrapped
script:
- set -e
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
- sbt -Dsbt.scala.version=2.12.18-M2 -Dscala.build.compileWithDotty=true library/compile
- name: build benchmarks
if: type = pull_request OR repo != scala/scala
workspaces:
use: bootstrapped
script:
- set -e
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
- sbt -Dsbt.scala.version=2.12.18-M2 bench/Jmh/compile
- stage: build
if: type = pull_request OR type = push
name: language spec
dist: focal
language: ruby
install:
- ruby -v
- gem install bundler
- bundler --version
- bundle install --path vendor/bundle
# cribbed from https://github.com/SebastiaanKlippert/go-wkhtmltopdf/blob/master/.travis.yml
- sudo apt-get update
- sudo apt-get install -y build-essential xorg xfonts-75dpi libpng16-16 libssl1.1
- wget --quiet "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb"
- sudo dpkg -i "wkhtmltox_0.12.6-1.bionic_amd64.deb"
- rm "wkhtmltox_0.12.6-1.bionic_amd64.deb"
script:
- set -e
- (cd admin && ./init.sh)
- bundle exec jekyll build -s spec/ -d build/spec
- export JEKYLL_ENV=spec-pdf
- bundle exec jekyll build -s spec/ -d build/spec-pdf
- ./scripts/generate-spec-pdf.sh
after_success:
- ./scripts/travis-publish-spec.sh
env:
global:
- ADOPTOPENJDK=8
- secure: "P8EqpZoin/YTnwel9TTxSSAHtXfZ4M262BKXlYUZmjoQsjyvXDAeZ7yAqgAvX5BeRFrGkBToPiE+V60stdWkPKs3+9COw2BDUB1CULBHhRY9Lxordmz0xVhgEfsoH4f6r6wOlIQ9kuaWhmP+JdB/mzOHZhLch9ziPi8O46Z8t4k=" # PRIV_KEY_SECRET, for scripts/travis-publish-spec.sh
- secure: "T1fxtvLTxioyXJYiC/zVYdNYsBOt+0Piw+xE04rB1pzeKahm9+G2mISdcAyqv6/vze9eIJt6jNHHpKX32/Z3Cs1/Ruha4m3k+jblj3S0SbxV6ht2ieJXLT5WoUPFRrU68KXI8wqUadXpjxeJJV53qF2FC4lhfMUsw1IwwMhdaE8=" # PRIVATE_REPO_PASS, for publishing to scala-ci Artifactory
- secure: "dbAvl6KEuLwZ0MVQPZihFsPzCdiLbX0EFk3so+hcfEbksrmLQ1tn4X5ZM7Wy1UDR8uN9lxngEwHch7a7lKqpugzmXMew9Wnikr9WBWbJT77Z+XJ/jHI6YuiCRpRo+nvxXGp9Ry80tSIgx5eju0J83IaJL41BWlBkvyAd7YAHORI=" # GPG_SUBKEY_SECRET, so we can sign JARs
- secure: "RTyzS6nUgthupw5M0fPwTlcOym1sWgBo8eXYepB2xGiQnRu4g583BGuNBW1UZ3vIjRETi/UKQ1HtMR+i7D8ptF1cNpomopncVJA1iy7pU2w0MJ0xgIPMuvtkIa3kxocd/AnxAp+UhUad3nC8lDpkvZsUhhyA0fb4iPKipd2b2xY=" # TRAVIS_TOKEN (login with GitHub as SethTisue), for triggering scala-dist job
- secure: "PbDzgRGivsDM/1P18dIAZiZnK8yG+fxU/9Ho6DkAd8pvsu7S08MPks+ekM0uSVeKxYj7Npzd3XTe4weEXM7Jtljy3CRHoPasI0TF/6ZVOb7H+MMP1cg9K1xrZXKfEk2RABCbMxKtrEv9BDa/lVtjCCEKWAIPz38Z6q2mKk417Ps=" # SONA_USER, token username for publishing to Sonatype
- secure: "D/V5nrAJsAc6t5ZMoeSt37ViIsJyRmagA286M3zWn/uZhgk4mbgYfzu6rDbYeUTBB9jX8YHKPtzUrxqcnlpkV8z6USAbDhzYSLL/QqcLnTjKZZ3KvPEimNQIXX8Nb1KIrlXNQ/xTE8u+GNvQLDdxa60QqlzvA3tt5vnVl3GatFE=" # SONA_PASS, token password for publishing to Sonatype
# caching for sdkman / sbt / ivy / coursier imported from scala-dev
cache:
directories:
- $HOME/.rvm
notifications:
slack:
rooms:
- typesafe:WoewGgHil2FkdGzJyV3phAhj
if: (type = cron OR type = push) AND repo = scala/scala
on_success: never
on_failure: change
webhooks: https://scala-ci.typesafe.com/benchq/webhooks/travis