-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.travis.yml
More file actions
104 lines (98 loc) · 3.31 KB
/
.travis.yml
File metadata and controls
104 lines (98 loc) · 3.31 KB
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
language: java
install: true
os: linux
dist: trusty
# - Install SDKMAN
# - Install msttcorefonts, so we have the Verdana font available for diagram generation
# - Install graphviz, so we have the dot binary available for diagram generation
# - Install JDK 15 and GraalVM 20.1 (JDK 11)
before_install:
- |-
curl -sL https://get.sdkman.io | bash
echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config
echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config
source $HOME/.sdkman/bin/sdkman-init.sh
sudo apt-get update
echo msttcorefonts msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get install ttf-mscorefonts-installer
sudo apt-get install -y graphviz
sudo apt-get install -y build-essential libz-dev
sdk install java 15.0.1-open || true
sdk install java 20.1.0.r11-grl || true
sdk use java 20.1.0.r11-grl
gu install native-image
unset _JAVA_OPTIONS
java -version
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/
jobs:
include:
# -------------------------------------------
- stage: build+deploy-release
name: "Build and deploy Release"
if:
tag IS present AND tag =~ /^v.*/
script: ./gradlew clean test check jacocoRootReport antora
after_success:
- |-
bash <(curl -s https://codecov.io/bash)
mv cli/build/libs/owl-cli-*.jar cli/build/libs/owl-cli.jar
deploy:
- provider: releases
api_key: "$GITHUB_API_KEY"
file:
- cli/build/libs/owl-cli.jar
- cli/build/bin/owl
on:
repo: atextor/owl-cli
tags: true
all_branches: true
skip_cleanup: true
draft: false
tag_name: $TRAVIS_TAG
target_commitish: $TRAVIS_COMMIT
# -------------------------------------------
- stage: build+deploy-snapshot
name: "Build and deploy Snapshot"
if:
tag IS NOT present AND branch != release
script: ./gradlew clean test check jacocoRootReport antora
after_success:
- |-
bash <(curl -s https://codecov.io/bash)
git config --local user.name "Travis"
git config --local user.email "Travis"
export TRAVIS_TAG=snapshot
git push -q --delete https://atextor:[email protected]/atextor/owl-cli.git $TRAVIS_TAG >/dev/null 2>&1 || true
git tag $TRAVIS_TAG
mv cli/build/libs/owl-cli-snapshot.jar cli/build/libs/owl-cli.jar
deploy:
- provider: releases
api_key: "$GITHUB_API_KEY"
file:
- cli/build/libs/owl-cli.jar
- cli/build/bin/owl
on:
repo: atextor/owl-cli
branch: master
skip_cleanup: true
overwrite: true
draft: false
tag_name: $TRAVIS_TAG
target_commitish: $TRAVIS_COMMIT
- provider: pages
github_token: "$GITHUB_API_KEY"
keep_history: false
local_dir: build/site
skip_cleanup: true
on:
repo: atextor/owl-cli
branch: master
# -------------------------------------------