forked from validator/validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
149 lines (140 loc) · 5.24 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
language: java
git:
depth: 5
submodules: false # we do this ourselves later with `checker.py update`
branches:
except:
- /^(osx|linux|windows|jar|war)$/
env:
global:
- TOMCAT_VERSION=8.5.29
- CHECKER_PY=./checker.py
- TRAVIS_TAG=linux
- PYTHON=python3
matrix:
include:
- os: linux
jdk: openjdk8
- os: linux
jdk: openjdk11
env:
- TRAVIS_TAG=jar
- PYTHON=python
- os: linux
jdk: openjdk11
env:
- TRAVIS_TAG=war
- PYTHON=python
- os: linux
jdk: openjdk11
- os: osx
env:
- TRAVIS_TAG=osx
- JAVA_HOME=$(/usr/libexec/java_home)
- os: linux
jdk: openjdk13
- os: linux
jdk: openjdk14
- os: linux
jdk: openjdk-ea
install:
- $PYTHON --version
- $PYTHON $CHECKER_PY update
- travis_retry $PYTHON $CHECKER_PY dldeps
- curl -O https://archive.apache.org/dist/tomcat/tomcat-8/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.zip
- unzip apache-tomcat-$TOMCAT_VERSION.zip
- chmod a+x apache-tomcat-$TOMCAT_VERSION/bin/*.sh
script:
- $PYTHON $CHECKER_PY build
- $PYTHON $CHECKER_PY jar
- java -jar ./build/dist/vnu.jar ./build/dist/index.html
- java -jar ./build/dist/vnu.jar ./site/nu-about.html
- jar xf ./build/dist/vnu.jar && file nu/validator/client/SimpleCommandLineValidator.class | grep "version 52.0"
- $PYTHON $CHECKER_PY runtime-image
- $PYTHON $CHECKER_PY war
- jar xf ./build/dist-war/vnu.war && file WEB-INF/classes/nu/validator/servlet/VerifierServlet.class | grep "version 52.0"
- apache-tomcat-$TOMCAT_VERSION/bin/catalina.sh start
- cp ./build/dist-war/vnu.war apache-tomcat-$TOMCAT_VERSION/webapps/
- sleep 15s; tail apache-tomcat-$TOMCAT_VERSION/logs/catalina.out || true
- curl -sS 'http://localhost:8080/vnu/?out=gnu&doc=data:text/html;charset=utf-8,%3C%21doctype%20html%3E%3Cmeta%20charset%3Dutf-8%3E%3Ctitle%3ETest%3C%2Ftitle%3E' > RESULTS
- test -z "$(if [ -t RESULTS ]; then cat RESULTS | grep -v '^$'; fi)"
- if [ $? != 0 ]; then cat RESULTS; fi
- $PYTHON $CHECKER_PY check
- $PYTHON $CHECKER_PY test
cache:
directories:
- dependencies
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/0b2024df5e6f10f19952
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
before_deploy:
- openssl aes-256-cbc -K $encrypted_88088d7aed65_key -iv $encrypted_88088d7aed65_iv
-in resources/ssh_travis.enc -out resources/ssh_travis -d
- openssl aes-256-cbc -K $encrypted_96f60dea8e9e_key -iv $encrypted_96f60dea8e9e_iv
-in resources/gpg_travis.enc -out resources/gpg_travis -d
- chmod 600 resources/ssh_travis
- cat resources/ssh_known_hosts >> ~/.ssh/known_hosts
- chmod 600 ~/.ssh/known_hosts
- eval $(ssh-agent -s)
- ssh-add resources/ssh_travis
- gpg --import resources/gpg_travis || true
- for file in build/dist/{*.zip,*.zip.md5,*.zip.sha1}; do gpg --yes -ab --local-user 0x6C976B92 --sign $file; done || true
- for file in build/dist-war/{*.war*,; do gpg --yes -ab --local-user 0x6C976B92 --sign $file; done || true
- ls -al build/dist
- ls -al build/dist-war
- git config --local user.name "Travis CI"
- git config --local user.email "[email protected]"
- git push --delete [email protected]:validator/validator.git $TRAVIS_TAG || true
- git tag -m $TRAVIS_TAG -f $TRAVIS_TAG -s --local-user 0x6C976B92
deploy:
- provider: releases
overwrite: true
prerelease: true
file_glob: true
skip_cleanup: true
file: "build/dist/{*.jar*}"
on:
condition: $TRAVIS_TAG = "jar"
repo: validator/validator
jdk: openjdk11
api_key:
secure: "Rx95y6BDpQSCPkWr8FqUByet61U7z1Tqo3KrRm2AN2MLbch9YcX8KScvH3Mmtk3wEsdOTsgLt6SYxBrU/7RKLKlvUTaIRFecQm/hZuhThLcd91q40Oy3KcedSsUUaYljRbvg/nh6MeloVOvDM5VitqV07NwykA0pVrSqoFJDBHA="
- provider: releases
overwrite: true
prerelease: true
file_glob: true
skip_cleanup: true
file: "build/dist-war/{*.war*}"
on:
condition: $TRAVIS_TAG = "war"
repo: validator/validator
jdk: openjdk11
api_key:
secure: "Rx95y6BDpQSCPkWr8FqUByet61U7z1Tqo3KrRm2AN2MLbch9YcX8KScvH3Mmtk3wEsdOTsgLt6SYxBrU/7RKLKlvUTaIRFecQm/hZuhThLcd91q40Oy3KcedSsUUaYljRbvg/nh6MeloVOvDM5VitqV07NwykA0pVrSqoFJDBHA="
- provider: releases
overwrite: true
prerelease: true
file_glob: true
skip_cleanup: true
file: "build/dist/{*.zip,*.zip.asc,*zip.md5,*.zip.md5.asc,*.zip.sha1,*.zip.sha1.asc}"
on:
condition: $TRAVIS_TAG != "jar" && $TRAVIS_TAG != "war"
repo: validator/validator
jdk: openjdk11
api_key:
secure: "Rx95y6BDpQSCPkWr8FqUByet61U7z1Tqo3KrRm2AN2MLbch9YcX8KScvH3Mmtk3wEsdOTsgLt6SYxBrU/7RKLKlvUTaIRFecQm/hZuhThLcd91q40Oy3KcedSsUUaYljRbvg/nh6MeloVOvDM5VitqV07NwykA0pVrSqoFJDBHA="
- provider: releases
overwrite: true
prerelease: true
file_glob: true
skip_cleanup: true
file: "build/dist/{*.zip*}"
on:
condition: $TRAVIS_TAG != "jar" && $TRAVIS_TAG != "war"
repo: validator/validator
os: osx
api_key:
secure: "Rx95y6BDpQSCPkWr8FqUByet61U7z1Tqo3KrRm2AN2MLbch9YcX8KScvH3Mmtk3wEsdOTsgLt6SYxBrU/7RKLKlvUTaIRFecQm/hZuhThLcd91q40Oy3KcedSsUUaYljRbvg/nh6MeloVOvDM5VitqV07NwykA0pVrSqoFJDBHA="