forked from eXist-db/exist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
52 lines (44 loc) · 2.45 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
version: '{branch}-{build}'
environment:
MAVEN_VERSION: 3.6.1
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
JAVA_HOME: C:\Program Files\Java\jdk1.8.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
JAVA_HOME: C:\Program Files\Java\jdk11
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1804
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1804
JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
# install a newer Maven on AppVeyor Windows CI
install:
- ps: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
if ($IsWindows -And !(Test-Path -Path "C:\maven" )) {
Write-Host "Downloading Maven $env:MAVEN_VERSION"
(new-object System.Net.WebClient).DownloadFile("https://repo1.maven.org/maven2/org/apache/maven/apache-maven/$env:MAVEN_VERSION/apache-maven-$env:MAVEN_VERSION-bin.zip", 'C:\maven-bin.zip')
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven")
}
build_script:
- cmd: SET M2_HOME=C:\maven\apache-maven-%MAVEN_VERSION%
- cmd: SET PATH=%M2_HOME%\bin;%JAVA_HOME%\bin;%PATH%
- cmd: mvn -T 2C -DskipTests=true -Dmaven.javadoc.skip=true -Ddocker=false install -B -V -q
- sh: mvn -T 2C -DskipTests=true -Dmaven.javadoc.skip=true -Ddocker=true install -B -V -q
test_script:
- cmd: mvn -T 2C -Ddocker=false test -B
- sh: mvn -T 2C -Ddocker=true test -B
after_test:
- ps: |
$wc = New-Object 'System.Net.WebClient'
foreach ($file in Get-ChildItem -Path "$($env:APPVEYOR_BUILD_FOLDER)\exist-core\target\surefire-reports\" -Filter *.xml) {
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", $file.FullName)
}
on_failure:
- cmd: 7z a exist-core-surefire-reports.zip %APPVEYOR_BUILD_FOLDER%\exist-core\target\surefire-reports\ && appveyor PushArtifact exist-core-surefire-reports.zip
- cmd: 7z a exist-core-test-logs.zip %APPVEYOR_BUILD_FOLDER%\exist-core\target\test-logs-* && appveyor PushArtifact exist-core-test-logs.zip
- sh: tar czvf exist-core-surefire-reports.tgz $APPVEYOR_BUILD_FOLDER/exist-core/target/surefire-reports/ && appveyor PushArtifact exist-core-surefire-reports.tgz
- sh: tar czvf exist-core-test-logs.tgz $APPVEYOR_BUILD_FOLDER/exist-core/target/test-logs-* && appveyor PushArtifact exist-core-test-logs.tgz
cache:
- '%USERPROFILE%\.m2'
- C:\maven -> appveyor.yml
- '$HOME/.m2'