From 0ac562102c269a8f7f31e75d8b3cebe3704336d4 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Thu, 7 Dec 2017 06:22:50 +0100 Subject: [PATCH 1/3] Add AppVeyor config file to test win32.mak --- appveyor.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..609558f6ef --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,22 @@ +platform: x64 +environment: + matrix: + - DC: dmd + DVersion: nightly + arch: x64 + - DC: dmd + DVersion: nightly + arch: x86 +skip_tags: false +build_script: + - ps: wget https://raw.githubusercontent.com/wilzbach/installer/appveyor-script/script/install.ps1 -OutFile install.ps1 + - ps: .\install.ps1 + - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %compilersetupargs% + +test_script: + - echo %PLATFORM% + - echo %Darch% + - echo %DC% + - echo %PATH% + - '%DC% --version' + - make -f win32.mak rdmd dustmite From bc47a3d1a7a45bf26ee988405968220dac7f4081 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Mon, 18 Dec 2017 08:06:48 +0100 Subject: [PATCH 2/3] Inline AppVeyor build script --- appveyor.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 609558f6ef..b647d8412c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,8 +9,52 @@ environment: arch: x86 skip_tags: false build_script: - - ps: wget https://raw.githubusercontent.com/wilzbach/installer/appveyor-script/script/install.ps1 -OutFile install.ps1 - - ps: .\install.ps1 + - 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") { + $latest = (Invoke-WebRequest "https://nightlies.dlang.org/dmd-nightly/LATEST").toString().replace("`n","").replace("`r",""); + $url = "https://nightlies.dlang.org/dmd-$($latest)/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; + } + function SetUpDCompiler + { + $env:toolchain = "msvc"; + echo "downloading ..."; + $url = ResolveLatestDMD; + echo $url; + Invoke-WebRequest $url -OutFile "c:\dmd.7z"; + echo "finished."; + pushd c:\\; + 7z x dmd.7z > $null; + popd; + } + SetUpDCompiler + + 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"; + } + # This needs to be done more generically (currently only works on AppVeyor) + $env:compilersetup = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall"; + - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %compilersetupargs% test_script: From 6a32bae327be98c3e9ec101adf56af539f6481af Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Mon, 18 Dec 2017 08:07:41 +0100 Subject: [PATCH 3/3] Add more binaries target to AppVeyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index b647d8412c..75da0940ac 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -63,4 +63,4 @@ test_script: - echo %DC% - echo %PATH% - '%DC% --version' - - make -f win32.mak rdmd dustmite + - make -f win32.mak rdmd dustmite ddemangle changed