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