forked from NASAWorldWind/WorldWindJava
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
73 lines (62 loc) · 2.02 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
# Directs the Travis CI build service for WorldWind Java
# For more information see https://docs.travis-ci.com/user/customizing-the-build/
# Set up to run the Java build script per the Travis CI documentation
language: java
# Configure the build to using the minimum and the latest stable Oracle JDKs and Open JDKs
# Consider adding openjdk-ea and/or oraclejdk-ea to test early access JDKs
jdk:
- openjdk11
- oraclejdk11
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# Don't fail the build on the early access JDK, or wait for it to finish before marking it done.
matrix:
fast_finish: true
allow_failures:
- jdk: openjdk-ea
# Install gradle wrapper based on version defined in wrapper.gradle
before_install:
# Use Java 8 to install the wrapper as this command will fail in Java 11.
- JAVA_HOME=`jdk_switcher home openjdk8` gradle -b wrapper.gradle wrapper
# Clean up project before running build script.
install:
# Using clean as dummy target; could install dependencies here if needed.
- ./gradlew clean
# Use xvfb to run tests that require a GUI.
services:
- xvfb
before_script:
- "export DISPLAY=:99.0"
# Build the project
script:
- ./gradlew build javadoc
# Deploy develop branch javadocs to gh_pages, and create and deploy CHANGELOG.md on tags
deploy:
# Publish API documentation to GitHub Pages
- provider: pages
github_token: $GITHUB_API_KEY
local_dir: build/docs/javadoc
skip_cleanup: true
on:
branch: develop
jdk: oraclejdk8
# Create CHANGELOG.md in the current directory
- provider: script
script: ./travis/changelog.sh >> CHANGELOG.md
skip_cleanup: true
on:
tags: true
jdk: oraclejdk8
# Create a GitHub release and publish CHANGELOG.md to the release assets
- provider: releases
api_key: $GITHUB_API_KEY
file: CHANGELOG.md
skip_cleanup: true
on:
tags: true
jdk: oraclejdk8