forked from higherkindness/mu-scala
/
.travis.yml
73 lines (73 loc) · 2.28 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
language: scala
jdk:
- openjdk8
dist: xenial
scala:
- 2.12.10
before_cache:
- du -h -d 1 $HOME/.ivy2/
- du -h -d 2 $HOME/.sbt/
- du -h -d 4 $HOME/.coursier/
- find $HOME/.sbt -name "*.lock" -type f -delete
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete
cache:
directories:
- "$HOME/.sbt/cache"
- "$HOME/.sbt/1.0"
- "$HOME/.sbt/boot/"
- "$HOME/.sbt/boot/scala*"
- "$HOME/.sbt/launchers"
- "$HOME/.ivy2/cache"
- "$HOME/.ivy2"
before_install:
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then openssl aes-256-cbc -K $encrypted_95edac5cb8ef_key -iv $encrypted_95edac5cb8ef_iv -in secring.gpg.enc -out secring.gpg -d; fi
install:
- rvm use 2.6.5 --install --fuzzy
- gem install jekyll -v 4
stages:
- test
- deploy
- microsite
jobs:
include:
- name: "Tests, coverage and docs compilation"
script:
- sbt ++$TRAVIS_SCALA_VERSION clean coverage test coverageReport coverageAggregate docs/tut
- bash <(curl -s https://codecov.io/bash)
- name: "sbt plugin tests"
script:
- sbt ++$TRAVIS_SCALA_VERSION idlgen-core/test
- sbt ++$TRAVIS_SCALA_VERSION idlgen-sbt/test
- sbt ++$TRAVIS_SCALA_VERSION publishLocal idlgen-sbt/publishLocal idlgen-sbt/scripted
- stage: deploy
if: branch = master AND type != pull_request AND env(SKIP_SBT_DEPLOY) = false
name: "Publish sbt plugin"
script:
- if grep -q "SNAPSHOT" version.sbt; then
sbt idlgen-sbt/publish;
else
sbt ";project idlgen-sbt; release";
fi
- stage: deploy
if: branch = master AND type != pull_request
name: "Publish all other artifacts"
script:
- if grep -q "SNAPSHOT" version.sbt; then
sbt +publish;
else
sbt orgUpdateDocFiles;
git reset --hard HEAD;
git clean -f;
git checkout master;
git pull origin master;
sbt release;
fi
- stage: microsite
if: branch = master AND type != pull_request
name: "Publish microsite"
script:
- if grep -q "SNAPSHOT" version.sbt; then
echo "Skipping microsite publication, snapshot version";
else
sbt docs/publishMicrosite;
fi