Permalink
Browse files

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.
  • Loading branch information...
isilkor committed Sep 27, 2018
1 parent 354b6be commit 9691c1e41ae0de5ac70d911320a9a3c96e6fcbd1
Showing with 19 additions and 23 deletions.
  1. +10 −3 appveyor.yml
  2. +3 −10 tools/ci/appv-AfterBuild.ps1
  3. +3 −7 tools/ci/appv-BeforeBuild.ps1
  4. +2 −2 tools/ci/appv-Install.ps1
  5. +1 −1 tools/ci/appv-Test.ps1
View
@@ -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
@@ -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,26 +92,19 @@ 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') {
# For all executable files
$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
}
}
}
@@ -1,21 +1,17 @@
$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'
}
}
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) {
@@ -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
@@ -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)

0 comments on commit 9691c1e

Please sign in to comment.