try build matrix
This commit is contained in:
parent
9a8e6f327a
commit
a117e46a8a
|
@ -5,7 +5,13 @@ branches:
|
||||||
build_script:
|
build_script:
|
||||||
- ps: >-
|
- ps: >-
|
||||||
& "$env:APPVEYOR_BUILD_FOLDER\ci\msvc.ps1"
|
& "$env:APPVEYOR_BUILD_FOLDER\ci\msvc.ps1"
|
||||||
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- work\git -> appveyor.yml
|
- work\git -> appveyor.yml
|
||||||
|
|
||||||
|
environment:
|
||||||
|
matrix:
|
||||||
|
#mingw
|
||||||
|
- COMPILER: MINGW
|
||||||
|
#msvc
|
||||||
|
- COMPILER: MSVC
|
|
@ -1,25 +1,52 @@
|
||||||
Import-Module $env:APPVEYOR_BUILD_FOLDER\ci\ci.psm1 -Force
|
#Set environment variables for Visual Studio Command Prompt
|
||||||
|
#http://stackoverflow.com/questions/2124753/how-i-can-use-powershell-with-the-visual-studio-command-prompt
|
||||||
batCall "C:\Qt\5.5\msvc2013_64\bin\qtenv2.bat"
|
function batCall([string] $path, [string] $arg)
|
||||||
batCall "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
|
{
|
||||||
|
Write-Host "Calling $path $arg"
|
||||||
|
cmd /c "'$path' '$arg' & set" |
|
||||||
|
foreach {
|
||||||
|
if ($_ -match "=") {
|
||||||
|
#Write-Host "ENV:\$($v[0])=$($v[1])"
|
||||||
|
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$CMAKE_INSTALL_ROOT=$env:APPVEYOR_BUILD_FOLDER -replace "\\", "/"
|
$CMAKE_INSTALL_ROOT=$env:APPVEYOR_BUILD_FOLDER -replace "\\", "/"
|
||||||
|
|
||||||
$CMAKE_INSTALL_ROOT="$CMAKE_INSTALL_ROOT/work/install"
|
$CMAKE_INSTALL_ROOT="$CMAKE_INSTALL_ROOT/work/install"
|
||||||
|
|
||||||
|
|
||||||
mkdir $env:APPVEYOR_BUILD_FOLDER\work\install
|
mkdir $env:APPVEYOR_BUILD_FOLDER\work\install
|
||||||
mkdir $env:APPVEYOR_BUILD_FOLDER\work\build
|
mkdir $env:APPVEYOR_BUILD_FOLDER\work\build
|
||||||
mkdir $env:APPVEYOR_BUILD_FOLDER\work\build\extra-cmake-modules
|
mkdir $env:APPVEYOR_BUILD_FOLDER\work\build\extra-cmake-modules
|
||||||
mkdir $env:APPVEYOR_BUILD_FOLDER\work\build\snorenotify
|
mkdir $env:APPVEYOR_BUILD_FOLDER\work\build\snorenotify
|
||||||
|
|
||||||
|
|
||||||
If ( !(Test-Path "$env:APPVEYOR_BUILD_FOLDER\work\git")){
|
If ( !(Test-Path "$env:APPVEYOR_BUILD_FOLDER\work\git")){
|
||||||
mkdir $env:APPVEYOR_BUILD_FOLDER\work\git
|
mkdir $env:APPVEYOR_BUILD_FOLDER\work\git
|
||||||
cd $env:APPVEYOR_BUILD_FOLDER\work\git
|
cd $env:APPVEYOR_BUILD_FOLDER\work\git
|
||||||
git clone git://anongit.kde.org/extra-cmake-modules.git
|
git clone git://anongit.kde.org/extra-cmake-modules.git
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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", ""
|
||||||
|
$CMAKE_GENERATOR="MinGW Makefiles"
|
||||||
|
}
|
||||||
|
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
|
||||||
|
$CMAKE_GENERATOR="NMake Makefiles"
|
||||||
|
}
|
||||||
|
|
||||||
cd $env:APPVEYOR_BUILD_FOLDER\work\build\extra-cmake-modules
|
cd $env:APPVEYOR_BUILD_FOLDER\work\build\extra-cmake-modules
|
||||||
cmake -G"NMake Makefiles" $env:APPVEYOR_BUILD_FOLDER\work\git\extra-cmake-modules -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT"
|
cmake -G $CMAKE_GENERATOR $env:APPVEYOR_BUILD_FOLDER\work\git\extra-cmake-modules -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT"
|
||||||
nmake install
|
nmake install
|
||||||
|
|
||||||
cd $env:APPVEYOR_BUILD_FOLDER\work\build\snorenotify
|
cd $env:APPVEYOR_BUILD_FOLDER\work\build\snorenotify
|
||||||
cmake -G"NMake Makefiles" $env:APPVEYOR_BUILD_FOLDER -DWITH_SNORE_DAEMON=ON -DWITH_FRONTENDS=ON -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT"
|
cmake -G $CMAKE_GENERATOR $env:APPVEYOR_BUILD_FOLDER -DWITH_SNORE_DAEMON=ON -DWITH_FRONTENDS=ON -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT"
|
||||||
nmake
|
nmake
|
13
ci/ci.psm1
13
ci/ci.psm1
|
@ -1,13 +0,0 @@
|
||||||
#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 "=") {
|
|
||||||
#Write-Host "ENV:\$($v[0])=$($v[1])"
|
|
||||||
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue