forked from Jebbs/DSFML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
204 lines (190 loc) · 6.43 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
# Build version format
version: 2.1.{build}
os: Visual Studio 2015
clone_depth: 1
#Let's blacklist gh-pages
branches:
except:
- gh-pages
environment:
matrix:
- 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: dmd
DVersion: 2.067.1
arch: x86
- DC: dmd
DVersion: 2.067.1
arch: x64
- DC: dmd
DVersion: 2.066.1
arch: x86
- DC: dmd
DVersion: 2.066.1
arch: x64
- DC: gdc
DVersion: 5.2.0
arch: x86
- DC: gdc
DVersion: 5.2.0
arch: x64
- DC: gdc
DVersion: 4.9.3
arch: x86
- DC: gdc
DVersion: 4.9.3
arch: x64
- DC: ldc
DVersion: 0.16.1
arch: x64
#0.15.1 doesn't work properly on Windows due to poor x64 support.
# - DC: ldc
# DVersion: 0.15.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;
}
}
install:
#Install the D compiler
- ps: SetUpDCompiler
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";
if($env:arch -eq "x86"){
$env:makecommand = "nmake & implib";
}
}
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 DSFMLC and then build DSFML with it
build_script:
- echo %VCINSTALLDIR%
- '"%compilersetup%" %compilersetupargs%'
- cd ..
- git clone --depth=1 --branch 2.3-stringpassthrough https://github.com/aubade/DSFMLC.git
- cd DSFMLC
- ps: if($env:toolchain -eq "mingw"){
$env:Path = $env:compilerpath + $env:cmakepath;
}
- cmake -G"%maketype%" .
- '%makecommand%'
- cd "C:\\projects\\dsfml"
- 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.exe -%DConf% -unittest:C:\projects\DSFMLC\lib\'