-
Notifications
You must be signed in to change notification settings - Fork 10
/
appveyor.yml
215 lines (210 loc) · 6.34 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
platform: x64
environment:
matrix:
- DC: dmd
DVersion: 2.080.0
arch: x64
- DC: dmd
DVersion: 2.080.0
arch: x86
- DC: dmd
DVersion: 2.079.1
arch: x64
- DC: dmd
DVersion: 2.078.3
arch: x64
- DC: dmd
DVersion: 2.077.1
arch: x64
- DC: dmd
DVersion: 2.076.1
arch: x64
- DC: dmd
DVersion: 2.075.1
arch: x64
- DC: dmd
DVersion: 2.074.1
arch: x64
- DC: dmd
DVersion: 2.073.2
arch: x64
- DC: dmd
DVersion: 2.072.2
arch: x64
- DC: dmd
DVersion: 2.071.2
arch: x64
- DC: dmd
DVersion: 2.070.2
arch: x64
- DC: dmd
DVersion: 2.069.2
arch: x64
- DC: dmd
DVersion: 2.068.2
arch: x64
- DC: dmd
DVersion: 2.067.1
arch: x64
- DC: dmd
DVersion: 2.066.0
arch: x64
- DC: ldc
DVersion: 1.9.0
arch: x64
- DC: ldc
DVersion: 1.9.0
arch: x86
- DC: ldc
DVersion: 1.8.0
arch: x64
- DC: ldc
DVersion: 1.7.0
arch: x64
- DC: ldc
DVersion: 1.6.0
arch: x64
- DC: ldc
DVersion: 1.5.0
arch: x64
- DC: ldc
DVersion: 1.4.0
arch: x64
- DC: ldc
DVersion: 1.3.0
arch: x64
- DC: ldc
DVersion: 1.2.0
arch: x64
- DC: ldc
DVersion: 1.1.0
arch: x64
- DC: ldc
DVersion: 1.0.0
arch: x64
matrix:
allow_failures:
# I'm getting weird occasional errors of...
# LINK : fatal error LNK1104: cannot open file 'shell32.lib'
# ...just with this compiler version, and only on Windows/AppVeyor.
- DC: dmd
DVersion: 2.068.2
skip_tags: true
install:
- ps: function ResolveDMD
{
$version = $env:DVersion;
if($version -eq "stable") {
$latest = (Invoke-WebRequest "http://downloads.dlang.org/releases/LATEST").toString();
$urls = @("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];
$urls = @("http://downloads.dlang.org/pre-releases/2.x/$($latestVersion)/dmd.$($latest).windows.7z");
}elseif($version -eq "nightly") {
$urls = @("http://nightlies.dlang.org/dmd-master-2017-05-20/dmd.master.windows.7z");
}else {
$urls = @("http://downloads.dlang.org/releases/2.x/$($version)/dmd.$($version).windows.7z");
}
$env:PATH += ";C:\dmd2\windows\bin;";
return $urls;
}
- ps: function ResolveLDC
{
if($env:arch -eq "x86"){
$archBits = "32";
}
elseif($env:arch -eq "x64"){
$archBits = "64";
}
$version = $env:DVersion;
$arch = $env:arch;
if($version -eq "stable") {
$latest = (Invoke-WebRequest "https://ldc-developers.github.io/LATEST").toString().replace("`n","").replace("`r","");
$urls = @("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","");
$urls = @("https://github.com/ldc-developers/ldc/releases/download/v$($latest)/ldc2-$($latest)-windows-$($arch).7z");
} else {
$latest = $version;
$urls = @("https://github.com/ldc-developers/ldc/releases/download/v$($version)/ldc2-$($version)-windows-$($arch).7z");
$urls += "https://github.com/ldc-developers/ldc/releases/download/v$($version)/ldc2-$($version)-win$($archBits)-msvc.zip";
}
$env:PATH += ";C:\ldc2-$($latest)-windows-$($arch)\bin;C:\ldc2-$($latest)-win$($archBits)-msvc\bin";
$env:DC = "ldc2";
return $urls;
}
- ps: function SetUpDCompiler
{
$env:toolchain = "msvc";
if($env:DC -eq "dmd"){
$env:DMD = "dmd";
$urls = ResolveDMD;
}
elseif($env:DC -eq "ldc"){
$env:DC = "ldmd2";
$env:DMD = "ldmd2";
$urls = ResolveLDC;
}
echo "downloading...";
echo urls=$urls;
foreach($tryUrl in $urls){
$dloadOk = $true;
echo Trying $tryUrl;
try{
Invoke-WebRequest $tryUrl -OutFile "c:\compiler.archive";
}
catch [Net.WebException]{
$dloadOk = $false;
}
if($dloadOk -eq $true){
break;
}
}
echo "extracting...";
pushd c:\\;
7z x compiler.archive > $null;
popd;
echo "finished.";
}
- ps: SetUpDCompiler
- powershell -Command Invoke-WebRequest https://code.dlang.org/files/dub-1.9.0-windows-x86.zip -OutFile dub.zip
- 7z x dub.zip -odub > nul
- set PATH=%CD%\%binpath%;%CD%\dub;%PATH%
- dub --version
# Some older LDC/GDC compilers don't come with rdmd
- ps: function SetUpRDMD
{
if((Get-Command "rdmd.exe" -ErrorAction SilentlyContinue) -eq $null)
{
Invoke-WebRequest "http://downloads.dlang.org/releases/2.x/2.080.0/dmd.2.080.0.windows.7z" -OutFile "c:\rdmd-dmd.7z";
pushd c:\\;
7z x -ordmd-dmd rdmd-dmd.7z > $null;
popd;
}
}
- ps: SetUpRDMD
- set PATH=%PATH%;c:\rdmd-dmd\dmd2\windows\bin
before_build:
- 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%'
build_script:
- echo dummy build script - dont remove me
test_script:
- echo %PLATFORM%
- echo %Darch%
- echo %DC%
- echo %DMD%
- echo %PATH%
- '%DC% --help'
- dub add-local .
- dub test --arch=%Darch% --compiler=%DC%