Appveyor: Build on Visual Studio 2017 x64 only

There is no pre-built binary package of Qt for 32 bit Visual Studio
2017, so we'll drop it for now.
master
Nicolas Hake 2018-09-27 19:58:55 +02:00
parent 354b6be1c6
commit 9691c1e41a
5 changed files with 19 additions and 23 deletions

View File

@ -5,9 +5,9 @@ shallow_clone: true
cache: ..\openclonk-cache
image: Visual Studio 2017
configuration: RelWithDebInfo
platform:
- Win32
- x64
install:
@ -16,10 +16,17 @@ before_build:
- ps: "& $env:APPVEYOR_BUILD_FOLDER\\tools\\ci\\appv-BeforeBuild.ps1"
build:
project: ../openclonk-build/openclonk.sln
parallel: true
verbosity: minimal
# The after_build and test_script scripts need to be called in a real
# powershell instance because they call into the MSBuild API, which has issues
# finding its data files when called from AppVeyor's powershell host, because
# it attempts to read the application config instead of the registry to find
# them (starting with MSBuild 15, which ships with Visual Studio 2017).
after_build:
- ps: "& $env:APPVEYOR_BUILD_FOLDER\\tools\\ci\\appv-AfterBuild.ps1"
- cmd: powershell -NoLogo -NoProfile -ExecutionPolicy Unrestricted -Command "& $env:APPVEYOR_BUILD_FOLDER\\tools\\ci\\appv-AfterBuild.ps1"
test_script:
- ps: "& $env:APPVEYOR_BUILD_FOLDER\\tools\\ci\\appv-Test.ps1"
- cmd: powershell -NoLogo -NoProfile -ExecutionPolicy Unrestricted -Command "& $env:APPVEYOR_BUILD_FOLDER\\tools\\ci\\appv-Test.ps1"
deploy: off

View File

@ -1,7 +1,7 @@
pushd $env:BUILD_TARGET_FOLDER
trap {popd}
[void]([System.Reflection.Assembly]::LoadWithPartialName('Microsoft.Build'))
Add-Type -Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Build.dll"
$projects = New-Object Microsoft.Build.Evaluation.ProjectCollection
$projects.SetGlobalProperty('Configuration', $env:CONFIGURATION)
@ -92,13 +92,6 @@ SRCSRV: source files ---------------------------------------
}
}
if (-not $env:APPVEYOR) {
function Push-AppveyorArtifact {
param([string]$Path)
"Uploading $Path.... (dry run)"
}
}
Get-Item *.vcxproj | %{
$p = $projects.LoadProject($_.FullName)
if ($p.GetPropertyValue('ConfigurationType') -eq 'Application') {
@ -106,12 +99,12 @@ Get-Item *.vcxproj | %{
$binary = $p.GetPropertyValue('TargetPath')
if (Test-Path $binary) {
# Upload the executable itself as an artifact
Push-AppveyorArtifact $binary
appveyor PushArtifact $binary
$pdb = $p.ItemDefinitions['Link'].GetMetadataValue('ProgramDataBaseFile')
if (Test-Path $pdb) {
# If we generated a .pdb file, add source server information
Add-SourceServerData $pdb
Push-AppveyorArtifact $pdb
appveyor PushArtifact $pdb
}
}
}

View File

@ -1,13 +1,9 @@
$ErrorActionPreference='Stop'
switch ($env:PLATFORM) {
'Win32' {
$cmake_generator = 'Visual Studio 14 2015'
$qt = 'C:\Qt\5.7\msvc2015'
}
'x64' {
$cmake_generator = 'Visual Studio 14 2015 Win64'
$qt = 'C:\Qt\5.7\msvc2015_64'
$cmake_generator = 'Visual Studio 15 2017 Win64'
$qt = 'C:\Qt\5.11.1\msvc2017_64'
}
}
@ -15,7 +11,7 @@ pushd $env:BUILD_TARGET_FOLDER
try {
$(cmake --version)[0]
$ErrorActionPreference='SilentlyContinue'
cmake -G $cmake_generator -DCMAKE_PREFIX_PATH:PATH="$env:BUILD_DEPS_FOLDER\$env:PLATFORM;$qt_path" $env:APPVEYOR_BUILD_FOLDER 2>&1
cmake -G $cmake_generator -DCMAKE_PREFIX_PATH:PATH="$env:BUILD_DEPS_FOLDER\$env:PLATFORM;$qt" $env:APPVEYOR_BUILD_FOLDER 2>&1
$ErrorActionPreference='Stop'
if ($LASTEXITCODE -ne 0) {
if (Test-Path CMakeFiles\CMakeOutput.log) {

View File

@ -92,8 +92,8 @@ pushd $deps_path
try {
# If you want to use the build dependencies for yourself, please note that
# this archive is a tarbomb, i.e. it doesn't contain a single root directory
Update-BuildCache 'https://autobuild.openclonk.org/static/binaries/appveyor-deps.tar.xz'
Update-BuildCache 'https://www.nosebud.de/~nh/openclonk/appveyor-deps.tar.xz'
cmake -E tar xJ $cache_path\appveyor-deps.tar.xz
} finally {
popd
}
}

View File

@ -1,7 +1,7 @@
pushd $env:BUILD_TARGET_FOLDER
trap {popd}
[void]([System.Reflection.Assembly]::LoadWithPartialName('Microsoft.Build'))
Add-Type -Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Build.dll"
$projects = New-Object Microsoft.Build.Evaluation.ProjectCollection
$projects.SetGlobalProperty('Configuration', $env:CONFIGURATION)