xref: /freebsd/sys/contrib/zstd/appveyor.yml (revision c6879c6c14eedbd060ba588a3129a6c60ebbe783)
1-
2  version: 1.0.{build}
3  branches:
4    only:
5    - master
6  environment:
7    matrix:
8    - COMPILER: "gcc"
9      HOST:     "mingw"
10      PLATFORM: "x64"
11      SCRIPT:   "make allzstd MOREFLAGS=-static && make -C tests test-symbols fullbench-lib"
12      ARTIFACT: "true"
13      BUILD:    "true"
14    - COMPILER: "gcc"
15      HOST:     "mingw"
16      PLATFORM: "x86"
17      SCRIPT:   "make allzstd MOREFLAGS=-static"
18      ARTIFACT: "true"
19      BUILD:    "true"
20    - COMPILER: "clang"
21      HOST:     "mingw"
22      PLATFORM: "x64"
23      SCRIPT:   "MOREFLAGS='--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion' make allzstd"
24      BUILD:    "true"
25
26    - COMPILER: "gcc"
27      HOST:     "mingw"
28      PLATFORM: "x64"
29      SCRIPT:   ""
30      TEST:     "cmake"
31
32    - COMPILER: "visual"
33      HOST:     "visual"
34      PLATFORM: "x64"
35      CONFIGURATION: "Debug"
36    - COMPILER: "visual"
37      HOST:     "visual"
38      PLATFORM: "Win32"
39      CONFIGURATION: "Debug"
40    - COMPILER: "visual"
41      HOST:     "visual"
42      PLATFORM: "x64"
43      CONFIGURATION: "Release"
44    - COMPILER: "visual"
45      HOST:     "visual"
46      PLATFORM: "Win32"
47      CONFIGURATION: "Release"
48
49  install:
50  - ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION%
51  - SET PATH_ORIGINAL=%PATH%
52  - if [%HOST%]==[mingw] (
53      SET "PATH_MINGW32=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin" &&
54      SET "PATH_MINGW64=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin" &&
55      COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin\make.exe &&
56      COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin\make.exe
57    )
58  - IF [%HOST%]==[visual] IF [%PLATFORM%]==[x64] (
59      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;"
60    )
61
62  build_script:
63  - if [%HOST%]==[mingw] (
64      ( if [%PLATFORM%]==[x64] (
65        SET "PATH=%PATH_MINGW64%;%PATH_ORIGINAL%"
66      ) else if [%PLATFORM%]==[x86] (
67        SET "PATH=%PATH_MINGW32%;%PATH_ORIGINAL%"
68      ) )
69    )
70  - if [%HOST%]==[mingw] if [%BUILD%]==[true] (
71      make -v &&
72      sh -c "%COMPILER% -v" &&
73      ECHO Building zlib to static link &&
74      SET "CC=%COMPILER%" &&
75      sh -c "cd .. && git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib" &&
76      sh -c "cd ../zlib && make -f win32/Makefile.gcc libz.a"
77      ECHO Building zstd &&
78      SET "CPPFLAGS=-I../../zlib" &&
79      SET "LDFLAGS=../../zlib/libz.a" &&
80      sh -c "%SCRIPT%" &&
81      ( if [%COMPILER%]==[gcc] if [%ARTIFACT%]==[true]
82          ECHO Creating artifacts &&
83          ECHO %cd% &&
84          lib\dll\example\build_package.bat &&
85          make -C programs DEBUGFLAGS= clean zstd &&
86          cd programs\ && 7z a -tzip -mx9 zstd-win-binary-%PLATFORM%.zip zstd.exe &&
87          appveyor PushArtifact zstd-win-binary-%PLATFORM%.zip &&
88          cp zstd.exe ..\bin\zstd.exe &&
89          git clone --depth 1 --branch master https://github.com/facebook/zstd &&
90          cd zstd &&
91          git archive --format=tar master -o zstd-src.tar &&
92          ..\zstd -19 zstd-src.tar &&
93          appveyor PushArtifact zstd-src.tar.zst &&
94          certUtil -hashfile zstd-src.tar.zst SHA256 > zstd-src.tar.zst.sha256.sig &&
95          appveyor PushArtifact zstd-src.tar.zst.sha256.sig &&
96          cd ..\..\bin\ &&
97          7z a -tzip -mx9 zstd-win-release-%PLATFORM%.zip * &&
98          appveyor PushArtifact zstd-win-release-%PLATFORM%.zip
99      )
100    )
101  - if [%HOST%]==[visual] (
102      ECHO *** &&
103      ECHO *** Building Visual Studio 2008 %PLATFORM%\%CONFIGURATION% in %APPVEYOR_BUILD_FOLDER% &&
104      ECHO *** &&
105      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" &&
106      DIR build\VS2008\bin\%PLATFORM%\%CONFIGURATION%\*.exe &&
107      MD5sum build/VS2008/bin/%PLATFORM%/%CONFIGURATION%/*.exe &&
108      COPY build\VS2008\bin\%PLATFORM%\%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2008_%PLATFORM%_%CONFIGURATION%.exe &&
109      ECHO *** &&
110      ECHO *** Building Visual Studio 2010 %PLATFORM%\%CONFIGURATION% &&
111      ECHO *** &&
112      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" &&
113      DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
114      MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
115      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" &&
116      DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
117      MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
118      COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2010_%PLATFORM%_%CONFIGURATION%.exe &&
119      ECHO *** &&
120      ECHO *** Building Visual Studio 2012 %PLATFORM%\%CONFIGURATION% &&
121      ECHO *** &&
122      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" &&
123      DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
124      MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
125      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" &&
126      DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
127      MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
128      COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2012_%PLATFORM%_%CONFIGURATION%.exe &&
129      ECHO *** &&
130      ECHO *** Building Visual Studio 2013 %PLATFORM%\%CONFIGURATION% &&
131      ECHO *** &&
132      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" &&
133      DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
134      MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
135      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" &&
136      DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
137      MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
138      COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2013_%PLATFORM%_%CONFIGURATION%.exe &&
139      ECHO *** &&
140      ECHO *** Building Visual Studio 2015 %PLATFORM%\%CONFIGURATION% &&
141      ECHO *** &&
142      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" &&
143      DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
144      MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
145      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" &&
146      DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
147      MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
148      COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2015_%PLATFORM%_%CONFIGURATION%.exe &&
149      COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe tests\
150    )
151
152  test_script:
153  - ECHO Testing %COMPILER% %PLATFORM% %CONFIGURATION%
154  - SET "CC=gcc"
155  - SET "CXX=g++"
156  - if [%TEST%]==[cmake] (
157      mkdir build\cmake\build &&
158      cd build\cmake\build &&
159      cmake -G "Visual Studio 14 2015 Win64" .. &&
160      cd ..\..\.. &&
161      make clean
162    )
163  - SET "FUZZERTEST=-T30s"
164  - if [%HOST%]==[visual] if [%CONFIGURATION%]==[Release] (
165      CD tests &&
166      SET ZSTD=./zstd.exe &&
167      sh -e playTests.sh --test-large-data &&
168      fullbench.exe -i1 &&
169      fullbench.exe -i1 -P0 &&
170      fuzzer_VS2008_%PLATFORM%_Release.exe %FUZZERTEST% &&
171      fuzzer_VS2010_%PLATFORM%_Release.exe %FUZZERTEST% &&
172      fuzzer_VS2012_%PLATFORM%_Release.exe %FUZZERTEST% &&
173      fuzzer_VS2013_%PLATFORM%_Release.exe %FUZZERTEST% &&
174      fuzzer_VS2015_%PLATFORM%_Release.exe %FUZZERTEST%
175    )
176
177-
178  version: 1.0.{build}
179  environment:
180    matrix:
181    - COMPILER: "gcc"
182      HOST:     "mingw"
183      PLATFORM: "x64"
184      SCRIPT:   "CPPFLAGS=-DDEBUGLEVEL=2 CFLAGS=-Werror make -j allzstd DEBUGLEVEL=2"
185    - COMPILER: "gcc"
186      HOST:     "mingw"
187      PLATFORM: "x86"
188      SCRIPT:   "CFLAGS=-Werror make -j allzstd"
189    - COMPILER: "clang"
190      HOST:     "mingw"
191      PLATFORM: "x64"
192      SCRIPT:   "CFLAGS='--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion' make -j allzstd"
193
194    - COMPILER: "visual"
195      HOST:     "visual"
196      PLATFORM: "x64"
197      CONFIGURATION: "Debug"
198    - COMPILER: "visual"
199      HOST:     "visual"
200      PLATFORM: "Win32"
201      CONFIGURATION: "Debug"
202    - COMPILER: "visual"
203      HOST:     "visual"
204      PLATFORM: "x64"
205      CONFIGURATION: "Release"
206    - COMPILER: "visual"
207      HOST:     "visual"
208      PLATFORM: "Win32"
209      CONFIGURATION: "Release"
210
211  install:
212  - ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION%
213  - SET PATH_ORIGINAL=%PATH%
214  - if [%HOST%]==[mingw] (
215      SET "PATH_MINGW32=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin" &&
216      SET "PATH_MINGW64=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin" &&
217      COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin\make.exe &&
218      COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin\make.exe
219    )
220  - IF [%HOST%]==[visual] IF [%PLATFORM%]==[x64] (
221      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;"
222    )
223
224  build_script:
225  - ECHO Building %COMPILER% %PLATFORM% %CONFIGURATION%
226  - if [%HOST%]==[mingw] (
227      ( if [%PLATFORM%]==[x64] (
228        SET "PATH=%PATH_MINGW64%;%PATH_ORIGINAL%"
229      ) else if [%PLATFORM%]==[x86] (
230        SET "PATH=%PATH_MINGW32%;%PATH_ORIGINAL%"
231      ) ) &&
232      make -v &&
233      sh -c "%COMPILER% -v" &&
234      set "CC=%COMPILER%" &&
235      sh -c "%SCRIPT%"
236    )
237  - if [%HOST%]==[visual] (
238      ECHO *** &&
239      ECHO *** Building Visual Studio 2015 %PLATFORM%\%CONFIGURATION% &&
240      ECHO *** &&
241      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" &&
242      DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
243      MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
244      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" &&
245      DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
246      MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
247      COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2015_%PLATFORM%_%CONFIGURATION%.exe &&
248      COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe tests\
249    )
250