forked from inoio/solrs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (45 loc) · 1.79 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
language: scala
scala:
- 2.12.8 # remember to update/check the deploy condition below!
- 2.13.1
jdk:
- oraclejdk8
# needed for jdk8:
# https://travis-ci.community/t/solved-oraclejdk8-installation-failing-still-again/3428
# https://blog.travis-ci.com/2019-04-15-xenial-default-build-environment
dist: trusty
before_install:
# prevent OutOfMemoryError: unable to create new native thread
- ulimit -t 166384
# get the actually set values
- ulimit -a
# decrypt ssh-key for deploying the site (see https://www.scala-sbt.org/sbt-site/publishing.html)
- |
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
openssl aes-256-cbc -K $encrypted_1f2617a5d8c8_key -iv $encrypted_1f2617a5d8c8_iv -in project/travis-deploy-key.enc -out project/travis-deploy-key -d;
chmod 600 project/travis-deploy-key;
# Record minimal build information via the Git user ident
git config --global user.name "$USER";
git config --global user.email "$TRAVIS_BUILD_NUMBER@$TRAVIS_COMMIT";
# Start ssh-agent in the background and load the deploy key
eval "$(ssh-agent -s)";
ssh-add project/travis-deploy-key;
fi
# site publishing (see https://www.scala-sbt.org/sbt-site/publishing.html)
deploy:
provider: script
script: SBT_GHPAGES_COMMIT_MESSAGE="build $TRAVIS_BUILD_ID updated site (commit $TRAVIS_COMMIT)" sbt ghpagesPushSite
cleanup: false
# force push, otherwise site deployment failed,
# see also https://blog.travis-ci.com/2019-08-27-deployment-tooling-dpl-v2-preview-release
keep_history: false
on:
branch: master
condition: $(grep -v SNAPSHOT version.sbt && [[ $TRAVIS_PULL_REQUEST = false ]] && [[ $TRAVIS_SCALA_VERSION = 2.12* ]])
cache:
directories:
- $HOME/.sbt
- $HOME/.ivy2
- $HOME/.coursier
# use container
sudo: false