-
Notifications
You must be signed in to change notification settings - Fork 22
/
appveyor.yml
129 lines (125 loc) · 4.15 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
platform: x64
environment:
matrix:
- DC: dmd
DVersion: nightly
arch: x64
- DC: dmd
DVersion: nightly
arch: x86_mscoff
- DC: dmd
DVersion: beta
arch: x64
- DC: dmd
DVersion: beta
arch: x86_mscoff
- DC: dmd
DVersion: stable
arch: x64
- DC: dmd
DVersion: stable
arch: x86_mscoff
- DC: dmd
DVersion: 2.099.1
arch: x64
- DC: dmd
DVersion: 2.099.1
arch: x86_mscoff
- DC: ldc
DVersion: beta
arch: x64
- DC: ldc
DVersion: stable
arch: x64
- DC: ldc
DVersion: 1.31.0
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 = "https://downloads.dlang.org/nightlies/dmd-master/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;
$arch = $env:arch;
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)-windows-$($arch).7z";
}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)-windows-$($arch).7z";
} else {
$latest = $version;
$url = "https://github.com/ldc-developers/ldc/releases/download/v$($version)/ldc2-$($version)-windows-$($arch).7z";
}
$env:PATH += ";C:\ldc2-$($latest)-windows-$($arch)\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.7z";
echo "finished.";
pushd c:\\;
7z x ldc.7z > $null;
popd;
}
}
- ps: SetUpDCompiler
build_script:
- ps: if($env:arch -eq "x86_mscoff"){
$env:compilersetupargs = "x86";
$env:Darch = "x86_mscoff";
$env:DConf = "m32";
}elseif($env:arch -eq "x64"){
$env:compilersetupargs = "amd64";
$env:Darch = "x86_64";
$env:DConf = "m64";
}elseif($env:arch -eq "x86"){
$env:compilersetupargs = "x86";
$env:Darch = "x86";
$env:DConf = "m32";
}
- 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%