blob: 1815563e7f5d4db0aebac92b1881d2e721ef87a3 [file] [log] [blame]
Sean Purcell5a2b8572017-03-14 15:59:57 -07001-
2 version: 1.0.{build}
3 branches:
4 only:
5 - dev
6 - master
7 environment:
8 matrix:
9 - COMPILER: "gcc"
10 HOST: "mingw"
11 PLATFORM: "x64"
12 SCRIPT: "make allarch && make -C tests test-symbols fullbench-dll fullbench-lib"
13 ARTIFACT: "true"
Sean Purcell8d2c6392017-03-24 11:45:02 -070014 BUILD: "true"
Sean Purcell5a2b8572017-03-14 15:59:57 -070015 - COMPILER: "gcc"
16 HOST: "mingw"
17 PLATFORM: "x86"
Sean Purcell5a61f362017-04-14 11:33:04 -070018 SCRIPT: "make allarch"
Sean Purcell5a2b8572017-03-14 15:59:57 -070019 ARTIFACT: "true"
Sean Purcell8d2c6392017-03-24 11:45:02 -070020 BUILD: "true"
Sean Purcell5a2b8572017-03-14 15:59:57 -070021 - COMPILER: "clang"
22 HOST: "mingw"
23 PLATFORM: "x64"
24 SCRIPT: "MOREFLAGS='--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion' make allarch"
Sean Purcell8d2c6392017-03-24 11:45:02 -070025 BUILD: "true"
inikep5e334be2016-05-18 09:07:28 +020026
Sean Purcell5a2b8572017-03-14 15:59:57 -070027 - COMPILER: "gcc"
28 HOST: "mingw"
29 PLATFORM: "x64"
30 SCRIPT: ""
31 TEST: "cmake"
32
Sean Purcell5a2b8572017-03-14 15:59:57 -070033 - COMPILER: "visual"
34 HOST: "visual"
35 PLATFORM: "x64"
36 CONFIGURATION: "Debug"
37 - COMPILER: "visual"
38 HOST: "visual"
39 PLATFORM: "Win32"
40 CONFIGURATION: "Debug"
41 - COMPILER: "visual"
42 HOST: "visual"
43 PLATFORM: "x64"
44 CONFIGURATION: "Release"
45 - COMPILER: "visual"
46 HOST: "visual"
47 PLATFORM: "Win32"
48 CONFIGURATION: "Release"
49
50 install:
inikep96abb5a2016-05-19 15:50:58 +020051 - ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION%
Sean Purcell5a2b8572017-03-14 15:59:57 -070052 - SET PATH_ORIGINAL=%PATH%
53 - if [%HOST%]==[mingw] (
Sean Purcellfcc55cc2017-03-29 13:08:10 -070054 SET "PATH_MINGW32=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin" &&
55 SET "PATH_MINGW64=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin" &&
56 COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin\make.exe &&
57 COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin\make.exe
Sean Purcell5a2b8572017-03-14 15:59:57 -070058 )
59 - IF [%HOST%]==[visual] IF [%PLATFORM%]==[x64] (
60 SET ADDITIONALPARAM=/p:LibraryPath="C:\Program Files\Microsoft SDKs\Windows\v7.1\lib\x64;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\lib\amd64;"
inikep5e334be2016-05-18 09:07:28 +020061 )
inikep7c4d0412016-05-16 14:48:04 +020062
Sean Purcell5a2b8572017-03-14 15:59:57 -070063 build_script:
64 - if [%HOST%]==[mingw] (
65 ( if [%PLATFORM%]==[x64] (
66 SET "PATH=%PATH_MINGW64%;%PATH_ORIGINAL%"
67 ) else if [%PLATFORM%]==[x86] (
68 SET "PATH=%PATH_MINGW32%;%PATH_ORIGINAL%"
Sean Purcell8d2c6392017-03-24 11:45:02 -070069 ) )
70 )
71 - if [%HOST%]==[mingw] if [%BUILD%]==[true] (
inikep0a0403d2016-07-19 12:23:32 +020072 make -v &&
Sean Purcell5a2b8572017-03-14 15:59:57 -070073 sh -c "%COMPILER% -v" &&
Sean Purcell8d2c6392017-03-24 11:45:02 -070074 ECHO Building zlib to static link &&
75 SET "CC=%COMPILER%" &&
76 sh -c "cd .. && git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib" &&
77 sh -c "cd ../zlib && make -f win32/Makefile.gcc libz.a"
78 ECHO Building zstd &&
79 SET "CPPFLAGS=-I../../zlib" &&
80 SET "LDFLAGS=../../zlib/libz.a" &&
81 sh -c "%SCRIPT%" &&
Sean Purcellfcc55cc2017-03-29 13:08:10 -070082 ( if [%COMPILER%]==[gcc] if [%ARTIFACT%]==[true]
83 lib\dll\example\build_package.bat &&
Sean Purcelle128ac02017-04-06 10:15:32 -070084 make -C programs DEBUGFLAGS= clean zstd &&
Yann Collet36153af2017-05-04 17:40:40 -070085 cd programs\ && 7z a -tzip -mx9 zstd-win-binary-%PLATFORM%.zip zstd.exe &&
Yann Collet9203dab2017-05-04 17:30:37 -070086 appveyor PushArtifact zstd-win-binary-%PLATFORM%.zip &&
Yann Collet36153af2017-05-04 17:40:40 -070087 cp zstd.exe ..\bin\zstd.exe &&
88 cd ..\bin\ && 7z a -tzip -mx9 zstd-win-release-%PLATFORM%.zip * &&
Sean Purcellfcc55cc2017-03-29 13:08:10 -070089 appveyor PushArtifact zstd-win-release-%PLATFORM%.zip
90 )
inikepf3302152016-05-18 16:38:36 +020091 )
Sean Purcell5a2b8572017-03-14 15:59:57 -070092 - if [%HOST%]==[visual] (
inikep5e334be2016-05-18 09:07:28 +020093 ECHO *** &&
inikep70ce21f2016-08-10 14:17:28 +020094 ECHO *** Building Visual Studio 2008 %PLATFORM%\%CONFIGURATION% in %APPVEYOR_BUILD_FOLDER% &&
inikep5e334be2016-05-18 09:07:28 +020095 ECHO *** &&
Yann Collet4c9a4c12016-09-19 14:58:14 +020096 msbuild "build\VS2008\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v90 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
97 DIR build\VS2008\bin\%PLATFORM%\%CONFIGURATION%\*.exe &&
98 MD5sum build/VS2008/bin/%PLATFORM%/%CONFIGURATION%/*.exe &&
99 COPY build\VS2008\bin\%PLATFORM%\%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2008_%PLATFORM%_%CONFIGURATION%.exe &&
inikep5e334be2016-05-18 09:07:28 +0200100 ECHO *** &&
101 ECHO *** Building Visual Studio 2010 %PLATFORM%\%CONFIGURATION% &&
102 ECHO *** &&
Yann Collet4c9a4c12016-09-19 14:58:14 +0200103 msbuild "build\VS2010\zstd.sln" %ADDITIONALPARAM% /m /verbosity:minimal /property:PlatformToolset=v100 /p:ForceImportBeforeCppTargets=%APPVEYOR_BUILD_FOLDER%\build\VS2010\CompileAsCpp.props /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
Przemyslaw Skibinskicba727c2016-11-14 15:59:57 +0100104 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
105 MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
Yann Collet4c9a4c12016-09-19 14:58:14 +0200106 msbuild "build\VS2010\zstd.sln" %ADDITIONALPARAM% /m /verbosity:minimal /property:PlatformToolset=v100 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
Przemyslaw Skibinskicba727c2016-11-14 15:59:57 +0100107 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
108 MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
109 COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2010_%PLATFORM%_%CONFIGURATION%.exe &&
inikep5e334be2016-05-18 09:07:28 +0200110 ECHO *** &&
111 ECHO *** Building Visual Studio 2012 %PLATFORM%\%CONFIGURATION% &&
112 ECHO *** &&
Yann Collet4c9a4c12016-09-19 14:58:14 +0200113 msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v110 /p:ForceImportBeforeCppTargets=%APPVEYOR_BUILD_FOLDER%\build\VS2010\CompileAsCpp.props /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
Przemyslaw Skibinskicba727c2016-11-14 15:59:57 +0100114 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
115 MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
Yann Collet4c9a4c12016-09-19 14:58:14 +0200116 msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v110 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
Przemyslaw Skibinskicba727c2016-11-14 15:59:57 +0100117 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
118 MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
119 COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2012_%PLATFORM%_%CONFIGURATION%.exe &&
inikep5e334be2016-05-18 09:07:28 +0200120 ECHO *** &&
121 ECHO *** Building Visual Studio 2013 %PLATFORM%\%CONFIGURATION% &&
122 ECHO *** &&
Yann Collet4c9a4c12016-09-19 14:58:14 +0200123 msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v120 /p:ForceImportBeforeCppTargets=%APPVEYOR_BUILD_FOLDER%\build\VS2010\CompileAsCpp.props /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
Przemyslaw Skibinskicba727c2016-11-14 15:59:57 +0100124 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
125 MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
Yann Collet4c9a4c12016-09-19 14:58:14 +0200126 msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v120 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
Przemyslaw Skibinskicba727c2016-11-14 15:59:57 +0100127 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
128 MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
129 COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2013_%PLATFORM%_%CONFIGURATION%.exe &&
inikep5e334be2016-05-18 09:07:28 +0200130 ECHO *** &&
131 ECHO *** Building Visual Studio 2015 %PLATFORM%\%CONFIGURATION% &&
132 ECHO *** &&
Yann Collet4c9a4c12016-09-19 14:58:14 +0200133 msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v140 /p:ForceImportBeforeCppTargets=%APPVEYOR_BUILD_FOLDER%\build\VS2010\CompileAsCpp.props /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
Przemyslaw Skibinskicba727c2016-11-14 15:59:57 +0100134 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
135 MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
Yann Collet4c9a4c12016-09-19 14:58:14 +0200136 msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v140 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
Przemyslaw Skibinskicba727c2016-11-14 15:59:57 +0100137 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
138 MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
139 COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2015_%PLATFORM%_%CONFIGURATION%.exe &&
140 COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe tests\
inikep5e334be2016-05-18 09:07:28 +0200141 )
inikep7c4d0412016-05-16 14:48:04 +0200142
Sean Purcell5a2b8572017-03-14 15:59:57 -0700143 test_script:
inikep96abb5a2016-05-19 15:50:58 +0200144 - ECHO Testing %COMPILER% %PLATFORM% %CONFIGURATION%
Sean Purcelldd79c5c2017-03-29 14:40:11 -0700145 - SET "CC=gcc"
146 - SET "CXX=g++"
Sean Purcell5a2b8572017-03-14 15:59:57 -0700147 - if [%TEST%]==[cmake] (
Przemyslaw Skibinskicb8d2d92017-02-10 12:01:14 +0100148 mkdir build\cmake\build &&
149 cd build\cmake\build &&
150 cmake -G "Visual Studio 14 2015 Win64" .. &&
151 cd ..\..\.. &&
Sean Purcell5a2b8572017-03-14 15:59:57 -0700152 make clean
153 )
Yann Colletc6915422017-04-27 16:24:53 -0700154 - SET "FUZZERTEST=-T30s"
Sean Purcell5a2b8572017-03-14 15:59:57 -0700155 - if [%HOST%]==[visual] if [%CONFIGURATION%]==[Release] (
inikep7feafdd2016-08-18 15:17:18 +0200156 CD tests &&
inikep1dcb2ff2016-05-30 11:33:52 +0200157 SET ZSTD=./zstd.exe &&
inikep1dcb2ff2016-05-30 11:33:52 +0200158 sh -e playTests.sh --test-large-data &&
inikepd57b4182016-05-31 11:46:16 +0200159 fullbench.exe -i1 &&
160 fullbench.exe -i1 -P0 &&
inikep7feafdd2016-08-18 15:17:18 +0200161 fuzzer_VS2008_%PLATFORM%_Release.exe %FUZZERTEST% &&
162 fuzzer_VS2010_%PLATFORM%_Release.exe %FUZZERTEST% &&
163 fuzzer_VS2012_%PLATFORM%_Release.exe %FUZZERTEST% &&
164 fuzzer_VS2013_%PLATFORM%_Release.exe %FUZZERTEST% &&
165 fuzzer_VS2015_%PLATFORM%_Release.exe %FUZZERTEST%
inikep5e334be2016-05-18 09:07:28 +0200166 )
inikepe9ae30a2016-09-12 14:17:26 +0200167
Sean Purcell5a2b8572017-03-14 15:59:57 -0700168-
169 version: 1.0.{build}
Sean Purcell5a2b8572017-03-14 15:59:57 -0700170 environment:
171 matrix:
172 - COMPILER: "gcc"
173 HOST: "mingw"
174 PLATFORM: "x64"
175 SCRIPT: "make allarch"
176 - COMPILER: "gcc"
177 HOST: "mingw"
178 PLATFORM: "x86"
Sean Purcell5a61f362017-04-14 11:33:04 -0700179 SCRIPT: "make allarch"
Sean Purcell5a2b8572017-03-14 15:59:57 -0700180 - COMPILER: "clang"
181 HOST: "mingw"
182 PLATFORM: "x64"
183 SCRIPT: "MOREFLAGS='--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion' make allarch"
Sean Purcelldaec40d2017-03-07 12:08:15 -0800184
Sean Purcell5a2b8572017-03-14 15:59:57 -0700185 - COMPILER: "visual"
186 HOST: "visual"
187 PLATFORM: "x64"
188 CONFIGURATION: "Debug"
189 - COMPILER: "visual"
190 HOST: "visual"
191 PLATFORM: "Win32"
192 CONFIGURATION: "Debug"
193 - COMPILER: "visual"
194 HOST: "visual"
195 PLATFORM: "x64"
196 CONFIGURATION: "Release"
197 - COMPILER: "visual"
198 HOST: "visual"
199 PLATFORM: "Win32"
200 CONFIGURATION: "Release"
inikepe9ae30a2016-09-12 14:17:26 +0200201
Sean Purcell5a2b8572017-03-14 15:59:57 -0700202 install:
203 - ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION%
204 - SET PATH_ORIGINAL=%PATH%
205 - if [%HOST%]==[mingw] (
Sean Purcellad8da882017-04-13 14:40:06 -0700206 SET "PATH_MINGW32=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin" &&
207 SET "PATH_MINGW64=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin" &&
208 COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin\make.exe &&
209 COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin\make.exe
Sean Purcell5a2b8572017-03-14 15:59:57 -0700210 )
211 - IF [%HOST%]==[visual] IF [%PLATFORM%]==[x64] (
212 SET ADDITIONALPARAM=/p:LibraryPath="C:\Program Files\Microsoft SDKs\Windows\v7.1\lib\x64;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\lib\amd64;"
213 )
214
215 build_script:
216 - ECHO Building %COMPILER% %PLATFORM% %CONFIGURATION%
217 - if [%HOST%]==[mingw] (
218 ( if [%PLATFORM%]==[x64] (
219 SET "PATH=%PATH_MINGW64%;%PATH_ORIGINAL%"
220 ) else if [%PLATFORM%]==[x86] (
221 SET "PATH=%PATH_MINGW32%;%PATH_ORIGINAL%"
222 ) ) &&
223 make -v &&
224 sh -c "%COMPILER% -v" &&
Sean Purcell5a61f362017-04-14 11:33:04 -0700225 set "CC=%COMPILER%" &&
226 sh -c "%SCRIPT%"
Sean Purcell5a2b8572017-03-14 15:59:57 -0700227 )
228 - if [%HOST%]==[visual] (
229 ECHO *** &&
230 ECHO *** Building Visual Studio 2015 %PLATFORM%\%CONFIGURATION% &&
231 ECHO *** &&
232 msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v140 /p:ForceImportBeforeCppTargets=%APPVEYOR_BUILD_FOLDER%\build\VS2010\CompileAsCpp.props /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
233 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
234 MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
235 msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v140 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
236 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
237 MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
238 COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2015_%PLATFORM%_%CONFIGURATION%.exe &&
239 COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe tests\
240 )