move my ci helper script to own repo

This commit is contained in:
Patrick von Reth 2015-07-21 15:40:56 +02:00
parent 69dd2d2d97
commit b69f5dcd74
2 changed files with 6 additions and 69 deletions

View File

@ -3,6 +3,7 @@ branches:
only:
- master
build_script:
- ps: if ( !(Test-Path "ci\appveyorHelp.psm1")) {Start-FileDownload https://raw.githubusercontent.com/TheOneRing/appVeyorHelp/master/appveyorHelp.psm1 -FileName ci\appveyorHelp.psm1 }
- ps: .\ci\appveyor.ps1
test: off
@ -12,6 +13,8 @@ cache:
- work\install -> ci\appveyor.ps1
- C:\ProgramData\chocolatey\bin -> ci\appveyor.ps1
- C:\ProgramData\chocolatey\lib -> ci\appveyor.ps1
- C:\tools -> ci\appveyor.ps1
- ci\appveyorHelp.psm1 -> ci\appveyor.ps1
environment:
matrix:

View File

@ -1,74 +1,8 @@
#Set environment variables for Visual Studio Command Prompt
#http://stackoverflow.com/questions/2124753/how-i-can-use-powershell-with-the-visual-studio-command-prompt
function batCall([string] $path, [string] $arg)
{
Write-Host "Calling `"$path`" `"$arg`""
cmd /c "$path" "$arg" `& set |
foreach {
if ($_ -match "=") {
$v = $_.split("=")
#Write-Host "ENV:\$($v[0])=$($v[1])"
set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
}
}
function fixCmakeDestDir([string] $prefix, [string] $destDir)
{
$prefix=$prefix -replace "/", "\\"
$destDir=$destDir -replace "/", "\\"
if( $prefix.substring(1,1) -eq ":")
{
$prefix=$prefix.substring(3)
}
Write-Host "move $destDir\$prefix to $destDir"
mv "$destDir\$prefix\*" "$destDir"
$rootLeftOver = $prefix.substring(0, $prefix.indexOf("\\"))
Write-Host "rm $destDir\$rootLeftOver"
rm -Recurse "$destDir\$rootLeftOver"
}
$INSTALL_DIR="$env:APPVEYOR_BUILD_FOLDER\work\install"
$CMAKE_INSTALL_ROOT=$INSTALL_DIR -replace "\\", "/"
Import-Module .\appveyorHelp.psm1 -Force
$env:PATH="$env:PATH;$INSTALL_DIR"
INIT @("ninja", "extra-cmake-modules")
if ( $env:COMPILER -eq "MINGW" )
{
batCall "C:\Qt\5.5\mingw492_32\bin\qtenv2.bat"
#remove sh.exe from path
$env:PATH=$env:PATH -replace "C:\\Program Files \(x86\)\\Git\\bin", ""
}
elseif ( $env:COMPILER -eq "MSVC" )
{
batCall "C:\Qt\5.5\msvc2013_64\bin\qtenv2.bat"
batCall "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
}
mkdir $env:APPVEYOR_BUILD_FOLDER\work\image
mkdir $env:APPVEYOR_BUILD_FOLDER\work\build
mkdir $env:APPVEYOR_BUILD_FOLDER\work\build\extra-cmake-modules
mkdir $env:APPVEYOR_BUILD_FOLDER\work\build\snorenotify
if ( !(Test-Path "$env:APPVEYOR_BUILD_FOLDER\work\install" ) )
{
mkdir $env:APPVEYOR_BUILD_FOLDER\work\install
mkdir $env:APPVEYOR_BUILD_FOLDER\work\git
cinst ninja
cd $env:APPVEYOR_BUILD_FOLDER\work\git
git clone -q git://anongit.kde.org/extra-cmake-modules.git
cd $env:APPVEYOR_BUILD_FOLDER\work\build\extra-cmake-modules
cmake -G"Ninja" $env:APPVEYOR_BUILD_FOLDER\work\git\extra-cmake-modules -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT"
ninja install
}
cd $env:APPVEYOR_BUILD_FOLDER\work\build\snorenotify
cmake -G"Ninja" $env:APPVEYOR_BUILD_FOLDER -DCMAKE_BUILD_TYPE=Release -DWITH_SNORE_DAEMON=ON -DWITH_FRONTENDS=ON -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT"
ninja install DESTDIR="$env:APPVEYOR_BUILD_FOLDER\work\image"
fixCmakeDestDir $CMAKE_INSTALL_ROOT "$env:APPVEYOR_BUILD_FOLDER\work\image"
CMAKE-IMAGE-INSTALL "$env:APPVEYOR_BUILD_FOLDER\work\image"