forked from JetBrains/intellij-deps-jflex
/
.travis.yml
55 lines (45 loc) · 1.25 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
# We also compile on pull requests.
branches:
only:
- master
- aggregated-java-sources
language: java
jdk:
- openjdk7
- oraclejdk8
# Empty the previously built artifacts
# They cannot be deleted in the before_cache phase,
# otherwise `mvn site` fails in the before_deploy phase.
before_install: ./scripts/clean.sh
install: ./mvnw -version
script: ./scripts/run-tests.sh
env:
matrix:
- TEST_SUITE=ant
- TEST_SUITE=unit
- TEST_SUITE=regression
# Travis sometimes fails to download deps from repo1.maven.org
# A cache avoids downloading too much, and will also speed up the build.
# NB: There is one cache per branch and language version/ compiler version/ JDK version
cache:
# The timeout (in seconds) empties the cache to avoid being stuck with a corrupted artefact
timeout: 86400 # 24 hours
directories:
- $HOME/.m2
- jflex/lib
# Build the maven site
after_success:
- ./scripts/before-deploy.sh
- ./scripts/deploy-source-code.sh
deploy:
provider: pages
skip_cleanup: true
# GITHUB_TOKEN set in travis-ci.org dashboard
github_token: $GITHUB_TOKEN
on:
branch: master
condition: $TEST_SUITE = unit
local_dir: target/maven-staging-site/maven-site
repo: jflex-de/jflex-web
name: Travis site-deploy bot
keep-history: true