forked from javafxports/openjdk-jfx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
109 lines (100 loc) · 5.83 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
version: "{branch} {build}"
image: Visual Studio 2017
environment:
JAVA_HOME: C:\jdk10
VCINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9"
shallow_clone: true
build_script:
- ps: |
choco install ant
$client = New-Object net.webclient
$client.DownloadFile('http://downloads.sourceforge.net/gnuwin32/zip-3.0-bin.zip', 'C:\Users\appveyor\zip-3.0.zip')
Expand-Archive -Path 'C:\Users\appveyor\zip-3.0.zip' -DestinationPath 'C:\Users\appveyor\zip'
$client.DownloadFile('http://downloads.sourceforge.net/gnuwin32/zip-3.0-dep.zip', 'C:\Users\appveyor\zip-3.0-deps.zip')
Expand-Archive -Path 'C:\Users\appveyor\zip-3.0-deps.zip' -DestinationPath 'C:\Users\appveyor\zip'
$env:PATH = "C:\Users\appveyor\zip\bin;$env:PATH"
$openJdk10 = 'https://github.com/AdoptOpenJDK/openjdk10-nightly/releases/download/jdk-10%2B23-20180524/OpenJDK10_x64_Win_20180524.zip'
$client.DownloadFile($openJdk10, 'C:\Users\appveyor\openjdk10.zip')
Expand-Archive -Path 'C:\Users\appveyor\openjdk10.zip' -DestinationPath 'C:\Users\appveyor\openjdk10'
Copy-Item -Path 'C:\Users\appveyor\openjdk10\*\' -Destination 'C:\jdk10' -Recurse -Force
choco install gradle --version 4.3.0
$msvcToolsVer = Get-Content "$env:VCINSTALLDIR\Microsoft.VCToolsVersion.default.txt"
if ([string]::IsNullOrWhitespace($msvcToolsVer)) {
# The MSVC tools version file can have txt *or* props extension.
$msvcToolsVer = Get-Content "$env:VCINSTALLDIR\Microsoft.VCToolsVersion.default.props"
}
$env:MSVC_VER = $msvcToolsVer
$env:VS150COMNTOOLS = $env:VCINSTALLDIR
$env:VSVARS32FILE = "$env:VCINSTALLDIR\vcvars32.bat"
refreshenv
# Must invoke gradle with cmd.exe so stderr output doesn't fail the build:
- cmd: gradlew all test -PCOMPILE_WEBKIT=false -PCONF=DebugNative --stacktrace -x :web:test --info --no-daemon
on_finish:
- ps: |
$dbgDir = ".\javafx-debug-symbols\"
$dbgArchive = "javafx-debug-symbols.zip"
if ((Get-ChildItem -Include @("*.pdb","*.map") -Recurse | Where { -not $_.PSIsContainer}).Count -gt 0) {
# The build generated at least one map or pdb file, so bundle them and upload to Appveyor.
Get-ChildItem -Include @("*.pdb","*.map") -Recurse | Copy-Item -Destination (New-Item -Type directory -Force $dbgDir) -Force
Compress-Archive -Path $($dbgDir + '*') -DestinationPath $dbgArchive -CompressionLevel Optimal
Push-AppveyorArtifact $dbgArchive -Verbose
}
$crashes = Get-ChildItem -Include hs_err_pid*.log -Recurse
$javaExe = $env:JAVA_HOME + '\bin'
ForEach ($crash in $crashes) {
$env:Path += ";C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\"
$env:Path += ";C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\"
$env:Path += ";C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x64\"
$env:Path += ";C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\"
Write-Host "Printing crash dump (${crash}):"
Get-Content $crash
$crashDump = $crash.DirectoryName + '\' + $crash.Basename + '.mdmp'
Write-Host "\n\n--- NATIVE BACK TRACE ---"
# https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/cdb-command-line-options
# !sym noisy = Activates noisy symbol loading.
# ~* = Thread status for all threads in the process.
# .kframes 100 = Set stack length to 100 frames.
# kP = Display stack backtrace with the full parameters for each function that is called in the stack trace.
# .ecxr = Display exception context record.
# dpp = Display referenced memory (32-bit or 64-bit depending on architecture) in DWORD or QWORD.
# r. = Displays the registers used in the current instruction.
# q = Quit.
cdb -v -z $crashDump -c '!sym noisy;~*;kP;dpp;r.;q' -i $javaExe -lines -y "srv*C:\MSSymbols*http://msdl.microsoft.com/download/symbols;$($env:APPVEYOR_BUILD_FOLDER)\javafx-debug-symbols\"
Write-Host "\n\n--- END NATIVE BACK TRACE ---"
}
# This technically works but is really inefficient as it requires an HTTP request for every
# single test. Ideally we want to batch the results. We can do this by POSTing to:
# $APPVEYOR_API_URL/api/tests/batch
# With JSON body:
# https://www.appveyor.com/docs/build-worker-api/#rest-3
# In order to do this we will need to iterate over all the XML files and convert them into
# a big JSON array.
Write-Host 'Uploading test results to AppVeyor…'
$wc = New-Object 'System.Net.WebClient'
$modules = @("javafx.base", "javafx.graphics", "javafx.controls", "javafx.fxml")
$ErrorActionPreference = "SilentlyContinue"
ForEach ($module in $modules) {
ForEach ($file in Get-ChildItem ".\modules\${module}\build\test-results\test\TEST-*.xml") {
try {
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", $file) 2>&1 | Out-Null
} catch [System.Net.WebException] {
# Ignore.
} finally {
$ErrorActionPreference = "Continue"
}
}
}
on_success:
- ps: |
$modules = "javafx-modules.zip"
Compress-Archive -Path ".\build\modular-sdk" -DestinationPath $modules -CompressionLevel Optimal
Push-AppveyorArtifact $modules -Verbose
cache:
- C:\Users\appveyor\.gradle\caches
- C:\Users\appveyor\.gradle\wrapper -> .gradle-wrapper\gradle-wrapper.properties
- '%JAVA_HOME% -> appveyor.yml'
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
- C:\ProgramData\chocolatey\cache -> appveyor.yml
- C:\MSSymbols -> appveyor.yml