forked from scala/scala
/
.travis.yml
142 lines (130 loc) · 6.22 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
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
jobs:
include:
- stage: build
if: type != pull_request AND repo = scala/scala
name: bootstrap and publish
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
# pull request validation (w/ bootstrap)
# differs from the bootstrap above by:
# - 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
if: type = pull_request OR repo != scala/scala
script:
- set -e
- sbt setupPublishCore generateBuildCharacterPropertiesFile headerCheck publishLocal
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
- sbt -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"
- stage: test
name: tests (junit, scalacheck, et al)
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 -Dstarr.version=$STARR setupValidateTest Test/compile testAll1
- name: tests (partest)
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 -Dstarr.version=$STARR setupValidateTest testAll2
- name: ensure standard library is buildable by 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 -Dscala.build.compileWithDotty=true library/compile
- stage: test
name: build benchmarks (bootstrapped)
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 bench/Jmh/compile
- stage: build
name: language spec (Jekyll)
# wkhtmltopdf requires libssl1.1, which we can't install on xenial
dist: bionic
language: ruby
install:
- ruby -v
- gem install bundler
- bundler --version
- bundle install
# 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
- secure: "feE5A8mYNpkNQKVwCj3aXrwjVrJWh/4ENpRfFlr2HOD9ORk1GORD5Yq907WZd+dTkYK54Lh1gA+qHOCIDgJHbi9ZLU+kjzEjtYKF6lQy6Wb0LI8smTOnAA6IWVVYifiXw8d66MI2MKZb2jjGeIzy8Q00SZjLhEGjLyTeCIB88Ws=" # SONA_USER
- secure: "ek3As5q2tL8UBXcxSBbv4v5YgsoPD41SCzPOSu72kzfbngyxgQxrcziU5pIM+Lib9KaWex7hVVWNL38tMyDbu+0OpDv8bPjMujzlDx5I2pJUfuOJo7QRYsJE1nsXcY4cA72cCLfbRcLEkvtDAhcdLSaUOqlyQe5BY4X4fY5eoPA=" # SONA_PASS
- secure: "dbAvl6KEuLwZ0MVQPZihFsPzCdiLbX0EFk3so+hcfEbksrmLQ1tn4X5ZM7Wy1UDR8uN9lxngEwHch7a7lKqpugzmXMew9Wnikr9WBWbJT77Z+XJ/jHI6YuiCRpRo+nvxXGp9Ry80tSIgx5eju0J83IaJL41BWlBkvyAd7YAHORI=" # GPG_SUBKEY_SECRET
- secure: "RTyzS6nUgthupw5M0fPwTlcOym1sWgBo8eXYepB2xGiQnRu4g583BGuNBW1UZ3vIjRETi/UKQ1HtMR+i7D8ptF1cNpomopncVJA1iy7pU2w0MJ0xgIPMuvtkIa3kxocd/AnxAp+UhUad3nC8lDpkvZsUhhyA0fb4iPKipd2b2xY=" # TRAVIS_TOKEN (login with GitHub as SethTisue)
# caching for sdkman / sbt / ivy / coursier imported from scala-dev
cache:
directories:
- $HOME/.rvm
notifications:
webhooks: https://scala-ci.typesafe.com/benchq/webhooks/travis