Enable testing on Windows with AppVeyor
This commit is contained in:
parent
1d3f4b32fb
commit
15dde026f8
|
@ -0,0 +1,123 @@
|
||||||
|
platform: x64
|
||||||
|
environment:
|
||||||
|
matrix:
|
||||||
|
- DC: dmd
|
||||||
|
DVersion: nightly
|
||||||
|
arch: x64
|
||||||
|
- DC: dmd
|
||||||
|
DVersion: nightly
|
||||||
|
arch: x86
|
||||||
|
- DC: dmd
|
||||||
|
DVersion: beta
|
||||||
|
arch: x64
|
||||||
|
- DC: dmd
|
||||||
|
DVersion: beta
|
||||||
|
arch: x86
|
||||||
|
- DC: dmd
|
||||||
|
DVersion: stable
|
||||||
|
arch: x64
|
||||||
|
- DC: dmd
|
||||||
|
DVersion: stable
|
||||||
|
arch: x86
|
||||||
|
- DC: ldc
|
||||||
|
DVersion: beta
|
||||||
|
arch: x86
|
||||||
|
- DC: ldc
|
||||||
|
DVersion: beta
|
||||||
|
arch: x64
|
||||||
|
- DC: ldc
|
||||||
|
DVersion: stable
|
||||||
|
arch: x86
|
||||||
|
- DC: ldc
|
||||||
|
DVersion: stable
|
||||||
|
arch: x64
|
||||||
|
|
||||||
|
skip_tags: false
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
|
install:
|
||||||
|
- ps: function ResolveLatestDMD
|
||||||
|
{
|
||||||
|
$version = $env:DVersion;
|
||||||
|
if($version -eq "stable") {
|
||||||
|
$latest = (Invoke-WebRequest "http://downloads.dlang.org/releases/LATEST").toString();
|
||||||
|
$url = "http://downloads.dlang.org/releases/2.x/$($latest)/dmd.$($latest).windows.7z";
|
||||||
|
}elseif($version -eq "beta") {
|
||||||
|
$latest = (Invoke-WebRequest "http://downloads.dlang.org/pre-releases/LATEST").toString();
|
||||||
|
$latestVersion = $latest.split("-")[0].split("~")[0];
|
||||||
|
$url = "http://downloads.dlang.org/pre-releases/2.x/$($latestVersion)/dmd.$($latest).windows.7z";
|
||||||
|
}elseif($version -eq "nightly") {
|
||||||
|
$url = "http://nightlies.dlang.org/dmd-master-2017-05-20/dmd.master.windows.7z"
|
||||||
|
}else {
|
||||||
|
$url = "http://downloads.dlang.org/releases/2.x/$($version)/dmd.$($version).windows.7z";
|
||||||
|
}
|
||||||
|
$env:PATH += ";C:\dmd2\windows\bin;";
|
||||||
|
return $url;
|
||||||
|
}
|
||||||
|
- ps: function ResolveLatestLDC
|
||||||
|
{
|
||||||
|
$version = $env:DVersion;
|
||||||
|
if($version -eq "stable") {
|
||||||
|
$latest = (Invoke-WebRequest "https://ldc-developers.github.io/LATEST").toString().replace("`n","").replace("`r","");
|
||||||
|
$url = "https://github.com/ldc-developers/ldc/releases/download/v$($latest)/ldc2-$($latest)-win64-msvc.zip";
|
||||||
|
}elseif($version -eq "beta") {
|
||||||
|
$latest = (Invoke-WebRequest "https://ldc-developers.github.io/LATEST_BETA").toString().replace("`n","").replace("`r","");
|
||||||
|
$url = "https://github.com/ldc-developers/ldc/releases/download/v$($latest)/ldc2-$($latest)-win64-msvc.zip";
|
||||||
|
} else {
|
||||||
|
$latest = $version;
|
||||||
|
$url = "https://github.com/ldc-developers/ldc/releases/download/v$($version)/ldc2-$($version)-win64-msvc.zip";
|
||||||
|
}
|
||||||
|
$env:PATH += ";C:\ldc2-$($latest)-win64-msvc\bin";
|
||||||
|
$env:DC = "ldc2";
|
||||||
|
return $url;
|
||||||
|
}
|
||||||
|
- ps: function SetUpDCompiler
|
||||||
|
{
|
||||||
|
$env:toolchain = "msvc";
|
||||||
|
if($env:DC -eq "dmd"){
|
||||||
|
echo "downloading ...";
|
||||||
|
$url = ResolveLatestDMD;
|
||||||
|
echo $url;
|
||||||
|
Invoke-WebRequest $url -OutFile "c:\dmd.7z";
|
||||||
|
echo "finished.";
|
||||||
|
pushd c:\\;
|
||||||
|
7z x dmd.7z > $null;
|
||||||
|
popd;
|
||||||
|
}
|
||||||
|
elseif($env:DC -eq "ldc"){
|
||||||
|
echo "downloading ...";
|
||||||
|
$url = ResolveLatestLDC;
|
||||||
|
echo $url;
|
||||||
|
Invoke-WebRequest $url -OutFile "c:\ldc.zip";
|
||||||
|
echo "finished.";
|
||||||
|
pushd c:\\;
|
||||||
|
7z x ldc.zip > $null;
|
||||||
|
popd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- ps: SetUpDCompiler
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- ps: if($env:arch -eq "x86"){
|
||||||
|
$env:compilersetupargs = "x86";
|
||||||
|
$env:Darch = "x86";
|
||||||
|
$env:DConf = "m32";
|
||||||
|
}elseif($env:arch -eq "x64"){
|
||||||
|
$env:compilersetupargs = "amd64";
|
||||||
|
$env:Darch = "x86_64";
|
||||||
|
$env:DConf = "m64";
|
||||||
|
}
|
||||||
|
- ps: $env:compilersetup = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall";
|
||||||
|
- '"%compilersetup%" %compilersetupargs%'
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
- echo %PLATFORM%
|
||||||
|
- echo %Darch%
|
||||||
|
- echo %DC%
|
||||||
|
- echo %PATH%
|
||||||
|
- '%DC% --version'
|
||||||
|
- dub test --arch=%Darch% --compiler=%DC%
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
- build.bat
|
|
@ -1,3 +1,5 @@
|
||||||
|
IF "%DC%"=="" SET DC="dmd"
|
||||||
|
|
||||||
set containers_modules=
|
set containers_modules=
|
||||||
for /r "containers/src" %%F in (*.d) do call set containers_modules=%%containers_modules%% "%%F"
|
for /r "containers/src" %%F in (*.d) do call set containers_modules=%%containers_modules%% "%%F"
|
||||||
|
|
||||||
|
@ -19,7 +21,7 @@ for /r "msgpack-d/src" %%F in (*.d) do call set msgspack_modules=%%msgspack_modu
|
||||||
set client_name=bin\dcd-client
|
set client_name=bin\dcd-client
|
||||||
set server_name=bin\dcd-server
|
set server_name=bin\dcd-server
|
||||||
|
|
||||||
dmd^
|
%DC%^
|
||||||
src\client\client.d^
|
src\client\client.d^
|
||||||
src\common\messages.d^
|
src\common\messages.d^
|
||||||
src\common\dcd_version.d^
|
src\common\dcd_version.d^
|
||||||
|
@ -29,7 +31,7 @@ dmd^
|
||||||
-release -inline -O -wi^
|
-release -inline -O -wi^
|
||||||
-of%client_name%
|
-of%client_name%
|
||||||
|
|
||||||
dmd^
|
%DC%^
|
||||||
%server_modules%^
|
%server_modules%^
|
||||||
%dsymbol_modules%^
|
%dsymbol_modules%^
|
||||||
%libdparse_modules%^
|
%libdparse_modules%^
|
||||||
|
|
Loading…
Reference in New Issue