forked from xspec/xspec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
117 lines (75 loc) · 3.59 KB
/
appveyor.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
environment:
global:
# full path to Saxon jar
SAXON_JAR: '%TEMP%\xspec\saxon\saxon9he.jar'
# latest Ant
ANT_VERSION: 1.10.5
# full path to XML Resolver jar
XML_RESOLVER_JAR: '%TEMP%\xspec\xml-resolver\resolver.jar'
matrix:
# latest Saxon 9.9 version and Jing
# * XML Calabash will use Saxon jar in its own lib directory.
# * BaseX test requires XML Calabash.
- SAXON_VERSION: 9.9.1-5
JING_VERSION: 20181222
XMLCALABASH_VERSION: 1.1.27-99
BASEX_VERSION: 8.6.4
# latest Saxon 9.8 version
- SAXON_VERSION: 9.8.0-15
# Saxon and Ant used in oXygen
- SAXON_VERSION: 9.8.0-12
ANT_VERSION: 1.9.8
install:
- ps: >-
# install Saxon
curl.exe -fsSL --create-dirs --retry 5 -o "${env:SAXON_JAR}" "http://central.maven.org/maven2/net/sf/saxon/Saxon-HE/${env:SAXON_VERSION}/Saxon-HE-${env:SAXON_VERSION}.jar"
# install XML Calabash
if( -Not( Test-Path -Path env:\XMLCALABASH_VERSION ) ) {
echo "XMLCalabash will not be installed as it uses a higher version of Saxon"
}
else {
curl.exe -fsSL --create-dirs --retry 5 -o "${env:TEMP}\xspec\xmlcalabash\xmlcalabash.zip" "https://github.com/ndw/xmlcalabash1/releases/download/${env:XMLCALABASH_VERSION}/xmlcalabash-${env:XMLCALABASH_VERSION}.zip"
7z x "${env:TEMP}\xspec\xmlcalabash\xmlcalabash.zip" -o"${env:TEMP}\xspec\xmlcalabash"
${env:XMLCALABASH_JAR} = "${env:TEMP}\xspec\xmlcalabash\xmlcalabash-${env:XMLCALABASH_VERSION}\xmlcalabash-${env:XMLCALABASH_VERSION}.jar"
}
# install BaseX
if( -Not( Test-Path -Path env:\BASEX_VERSION ) ) {
echo "BaseX will not be installed as it requires to run XMLCalabash with a higher version of Saxon";
}
else {
curl.exe -fsSL --create-dirs --retry 5 -o "${env:TEMP}\xspec\basex\basex.zip" "http://files.basex.org/releases/${env:BASEX_VERSION}/BaseX$(${env:BASEX_VERSION}.Replace('.','')).zip"
7z x "${env:TEMP}\xspec\basex\basex.zip" -o"${env:TEMP}\xspec\basex"
${env:BASEX_JAR} = "${env:TEMP}\xspec\basex\basex\BaseX.jar"
}
# install Ant without installing JDK
appveyor-retry choco install ant --ignore-dependencies --no-progress --version "${env:ANT_VERSION}"
# install XML Resolver
curl.exe -fsSL --create-dirs --retry 5 -o "${env:XML_RESOLVER_JAR}" "http://central.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar"
# install Jing
if( -Not( Test-Path -Path env:\JING_VERSION ) ) {
echo "Jing will not be installed"
}
else {
${env:JING_JAR} = "${env:TEMP}\xspec\jing\jing.jar"
curl.exe -fsSL --create-dirs --retry 5 -o "${env:JING_JAR}" "http://central.maven.org/maven2/org/relaxng/jing/${env:JING_VERSION}/jing-${env:JING_VERSION}.jar"
}
build: off
test_script:
- cmd: >-
rem Print Java version
java -version
rem Print Ant version
ant -version
rem Print Saxon version
java -cp "%SAXON_JAR%" net.sf.saxon.Version
rem execute bats-like unit tests
test\run-bats.cmd
rem execute XSpec unit tests
test\run-xspec-tests-ant.cmd -silent
rem execute XSpec end-to-end tests
test\end-to-end\run-e2e-tests.cmd -silent
rem compile java
"%ProgramFiles%\Java\jdk1.8.0\bin\javac" -cp "%SAXON_JAR%" java\com\jenitennison\xslt\tests\XSLTCoverageTraceListener.java
rem check git status
git status --porcelain | %SYSTEMROOT%\system32\find /v "" & if errorlevel 1 ( verify > NUL ) else ( verify other 2> NUL )
deploy: off