forked from Jebbs/DSFML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
238 lines (220 loc) · 7.09 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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# Build version format
version: 2.4.{build}
os: Visual Studio 2015
clone_depth: 1
#Let's blacklist gh-pages
branches:
except:
- gh-pages
environment:
matrix:
- DC: dmd
DVersion: 2.075.0
arch: x86
- DC: dmd
DVersion: 2.075.0
arch: x64
- DC: dmd
DVersion: 2.074.1
arch: x86
- DC: dmd
DVersion: 2.074.1
arch: x64
- DC: dmd
DVersion: 2.073.2
arch: x86
- DC: dmd
DVersion: 2.073.2
arch: x64
- DC: dmd
DVersion: 2.072.2
arch: x86
- DC: dmd
DVersion: 2.072.2
arch: x64
- DC: dmd
DVersion: 2.071.2
arch: x86
- DC: dmd
DVersion: 2.071.2
arch: x64
- DC: dmd
DVersion: 2.070.2
arch: x86
- DC: dmd
DVersion: 2.070.2
arch: x64
- DC: dmd
DVersion: 2.069.2
arch: x86
- DC: dmd
DVersion: 2.069.2
arch: x64
- DC: dmd
DVersion: 2.068.2
arch: x86
- DC: dmd
DVersion: 2.068.2
arch: x64
- DC: ldc
DVersion: 1.3.0
arch: x64
- DC: ldc
DVersion: 1.2.0
arch: x64
- DC: ldc
DVersion: 1.1.1
arch: x64
#Set up our powershell functions
init:
#putting these in here for now, will export to different script to be imported later maybe?
- ps: function SetUpDCompiler
{
if($env:DC -eq "dmd"){
if($env:arch -eq "x86"){
$env:DConf = "m32";
}
elseif($env:arch -eq "x64"){
$env:DConf = "m64";
}
$env:toolchain = "msvc";
$version = $env:DVersion;
$WebLocation = "http://downloads.dlang.org/releases/2.x/$($version)/dmd.$($version).windows.zip";
$DownloadLocation = "c:\dmd.zip";
(new-object net.webclient).DownloadFile($WebLocation, $DownloadLocation);
pushd c:\\;
7z x dmd.zip > $null;
popd;
}
elseif($env:DC -eq "gdc"){
if($env:arch -eq "x86"){
$env:DConf = "m32";
$version = $env:DVersion;
$WebLocation = "ftp://ftp.gdcproject.org/binaries/$($version)/i686-w64-mingw32/gdc-$($version)+2.066.1.7z";
$mingwWebLocation = "http://dsfml.com/bins/mingw/i686-5.2.0-release-posix-dwarf-rt_v4-rev0.7z";
}
elseif($env:arch -eq "x64"){
$env:DConf = "m64";
$version = $env:DVersion;
$WebLocation = "ftp://ftp.gdcproject.org/binaries/$($version)/x86_64-w64-mingw32/gdc-$($version)+2.066.1.7z";
$mingwWebLocation = "http://dsfml.com/bins/mingw/x86_64-5.2.0-release-posix-seh-rt_v4-rev0.7z";
}
$env:toolchain = "mingw";
$DownloadLocation = "c:\gdc.7z";
$mingwDownloadLocation = "c:\mingw.7z";
(new-object net.webclient).DownloadFile($WebLocation, $DownloadLocation);
(new-object net.webclient).DownloadFile($mingwWebLocation, $mingwDownloadLocation);
pushd c:\\;
7z x gdc.7z > $null;
7z x mingw.7z > $null;
popd;
}
elseif($env:DC -eq "ldc"){
if($env:arch -eq "x86"){
$env:DConf = "m32";
}
elseif($env:arch -eq "x64"){
$env:DConf = "m64";
}
$env:toolchain = "msvc";
$version = $env:DVersion;
$WebLocation = "https://github.com/ldc-developers/ldc/releases/download/v$($version)/ldc2-$($version)-win64-msvc.zip";
$DownloadLocation = "c:\ldc.zip";
(new-object net.webclient).DownloadFile($WebLocation, $DownloadLocation);
pushd c:\\;
7z x ldc.zip > $null;
popd;
}
}
#downloads and installs sfml binaries
- ps: function InstallSFML
{
$version = $env:arch;
$curdir = Convert-Path .;
$WebLocation = "http://dsfml.com/bins/ci/windows/sfml-$($version).zip";
$DownloadLocation = "C:\\projects\\dsfml\\sfml\\lib\\sfml-$($version).zip";
(new-object net.webclient).DownloadFile($WebLocation, $DownloadLocation);
pushd sfml\\lib;
7z x "sfml-$($version).zip" > $null;
popd
}
install:
# setup sfml sources
- git submodule update --init --recursive
#Install the D compiler
- ps: SetUpDCompiler
#add a sub folder for the sfml download
- mkdir sfml\\lib
#download and unpack sfml binaries
- ps: InstallSFML
before_build:
#Set's up MSVC and MinGW
#We can't use the default PATH when using MinGW because another MinGW is on the path and it messes things up.
#We also have to set up MSVC because I couldn't get the script to work with IF statements. :(
- ps: if($env:toolchain -eq "msvc"){
if($env:arch -eq "x86"){
$env:compilersetup = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall";
$env:compilersetupargs = "x86";
}
elseif($env:arch -eq "x64"){
$env:compilersetup = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall";
$env:compilersetupargs = "amd64";
}
$env:maketype = "NMake Makefiles";
$env:makecommand = "nmake";
}
elseif($env:toolchain -eq "mingw"){
if($env:arch -eq "x86"){
$env:compilerpath = "C:\mingw32\bin;";
$env:cmakepath = "C:\Program Files (x86)\CMake\bin";
}
elseif($env:arch -eq "x64"){
$env:compilerpath = "C:\mingw64\bin;";
$env:cmakepath = "C:\Program Files (x86)\CMake\bin";
}
$env:compilersetup = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall";
$env:compilersetupargs = "x86";
$env:maketype = "MinGW Makefiles";
$env:makecommand = "mingw32-make";
}
#Set's up our D compiler
- ps : if($env:DC -eq "dmd"){
$env:Dcompilerpath = "C:\dmd2\windows\bin;";
$env:outputfile = "-ofbuild.exe";
}
elseif($env:DC -eq "gdc"){
$env:outputfile = "-obuild.exe";
if($env:arch -eq "x86"){
$env:Dcompilerpath = "C:\i686-w64-mingw32\bin;";
}
elseif($env:arch -eq "x64"){
$env:Dcompilerpath = "C:\x86_64-w64-mingw32\bin;";
}
}
elseif($env:DC -eq "ldc"){
$version = $env:DVersion;
$env:Dcompilerpath = "C:\ldc2-$($version)-win64-msvc\bin;";
$env:outputfile = "-of=build.exe";
$env:DC = "ldc2";
}
#Build SFML and then build DSFML
build_script:
- echo %VCINSTALLDIR%
- '"%compilersetup%" %compilersetupargs%'
#- cd SFML
#- ps: if($env:toolchain -eq "mingw"){
# $env:Path = $env:compilerpath + $env:cmakepath;
# }
#- cmake -G"%maketype%" .
#- '%makecommand%'
#- cd ..
- ps : $env:Path = $env:Dcompilerpath + $env:Path
- ps: if($env:DC -eq "ldc2"){
$env:compilersetup = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall";
}
- '"%compilersetup%" %compilersetupargs%'
- '%DC% build.d %outputfile%'
#build static libraries
- 'build.exe --%DConf%'
#build unit tests
- 'build.exe --%DConf% --unittest'