1# Following tests are run _only_ on `release` branch 2# and on selected feature branch named `appveyorTest` or `visual*` 3 4- 5 version: 1.0.{build} 6 branches: 7 only: 8 - release 9 - master 10 - /appveyor*/ 11 - /visual*/ 12 environment: 13 matrix: 14 - COMPILER: "gcc" 15 HOST: "mingw" 16 PLATFORM: "x64" 17 SCRIPT: "make allzstd MOREFLAGS=-static" 18 ARTIFACT: "true" 19 BUILD: "true" 20 - COMPILER: "gcc" 21 HOST: "mingw" 22 PLATFORM: "x86" 23 SCRIPT: "make allzstd MOREFLAGS=-static" 24 ARTIFACT: "true" 25 BUILD: "true" 26 27 - COMPILER: "clang-cl" 28 HOST: "cmake-visual" 29 PLATFORM: "x64" 30 CONFIGURATION: "Release" 31 CMAKE_GENERATOR: "Visual Studio 15 2017" 32 CMAKE_GENERATOR_PLATFORM: "x64" 33 CMAKE_GENERATOR_TOOLSET: "LLVM" 34 APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017" 35 36 install: 37 - ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION% 38 - SET PATH_ORIGINAL=%PATH% 39 - if [%HOST%]==[mingw] ( 40 SET "PATH_MINGW32=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin" && 41 SET "PATH_MINGW64=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin" && 42 COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin\make.exe && 43 COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin\make.exe 44 ) 45 - IF [%HOST%]==[visual] IF [%PLATFORM%]==[x64] ( 46 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;" 47 ) 48 49 build_script: 50 - if [%HOST%]==[mingw] ( 51 ( if [%PLATFORM%]==[x64] ( 52 SET "PATH=%PATH_MINGW64%;%PATH_ORIGINAL%" 53 ) else if [%PLATFORM%]==[x86] ( 54 SET "PATH=%PATH_MINGW32%;%PATH_ORIGINAL%" 55 ) ) 56 ) 57 - if [%HOST%]==[mingw] if [%BUILD%]==[true] ( 58 make -v && 59 sh -c "%COMPILER% -v" && 60 ECHO Building zlib to static link && 61 SET "CC=%COMPILER%" && 62 sh -c "cd .. && git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib" && 63 sh -c "cd ../zlib && make -f win32/Makefile.gcc libz.a" 64 ECHO Building zstd && 65 SET "CPPFLAGS=-I../../zlib" && 66 SET "LDFLAGS=../../zlib/libz.a" && 67 sh -c "%SCRIPT%" && 68 ( if [%COMPILER%]==[gcc] if [%ARTIFACT%]==[true] 69 ECHO Creating artifacts && 70 ECHO %cd% && 71 lib\dll\example\build_package.bat && 72 make -C programs DEBUGFLAGS= clean zstd && 73 cd programs\ && 7z a -tzip -mx9 zstd-win-binary-%PLATFORM%.zip zstd.exe && 74 appveyor PushArtifact zstd-win-binary-%PLATFORM%.zip && 75 cp zstd.exe ..\bin\zstd.exe && 76 git clone --depth 1 --branch release https://github.com/facebook/zstd && 77 cd zstd && 78 git archive --format=tar release -o zstd-src.tar && 79 ..\zstd -19 zstd-src.tar && 80 appveyor PushArtifact zstd-src.tar.zst && 81 certUtil -hashfile zstd-src.tar.zst SHA256 > zstd-src.tar.zst.sha256.sig && 82 appveyor PushArtifact zstd-src.tar.zst.sha256.sig && 83 cd ..\..\bin\ && 84 7z a -tzip -mx9 zstd-win-release-%PLATFORM%.zip * && 85 appveyor PushArtifact zstd-win-release-%PLATFORM%.zip 86 ) 87 ) 88 - if [%HOST%]==[cmake-visual] ( 89 ECHO *** && 90 ECHO *** Building %CMAKE_GENERATOR% ^(%CMAKE_GENERATOR_TOOLSET%^) %PLATFORM%\%CONFIGURATION% && 91 PUSHD build\cmake && 92 cmake -DBUILD_TESTING=ON . && 93 cmake --build . --config %CONFIGURATION% -j4 && 94 POPD && 95 ECHO *** 96 ) 97 98 test_script: 99 - ECHO Testing %COMPILER% %PLATFORM% %CONFIGURATION% 100 - SET "CC=gcc" 101 - SET "CXX=g++" 102 - if [%TEST%]==[cmake] ( 103 mkdir build\cmake\build && 104 cd build\cmake\build && 105 SET FUZZERTEST=-T2mn && 106 SET ZSTREAM_TESTTIME=-T2mn && 107 cmake -G "Visual Studio 14 2015 Win64" .. && 108 cd ..\..\.. && 109 make clean 110 ) 111 112 113# The following tests are for regular pushes 114# into `dev` or some feature branch 115# There run less tests, for shorter feedback loop 116 117- 118 version: 1.0.{build} 119 environment: 120 matrix: 121 - COMPILER: "visual" 122 HOST: "visual" 123 PLATFORM: "x64" 124 CONFIGURATION: "Debug" 125 - COMPILER: "visual" 126 HOST: "visual" 127 PLATFORM: "Win32" 128 CONFIGURATION: "Debug" 129 - COMPILER: "visual" 130 HOST: "visual" 131 PLATFORM: "x64" 132 CONFIGURATION: "Release" 133 - COMPILER: "visual" 134 HOST: "visual" 135 PLATFORM: "Win32" 136 CONFIGURATION: "Release" 137 138 - COMPILER: "gcc" 139 HOST: "cygwin" 140 PLATFORM: "x64" 141 142 - COMPILER: "clang-cl" 143 HOST: "cmake-visual" 144 PLATFORM: "x64" 145 CONFIGURATION: "Release" 146 CMAKE_GENERATOR: "Visual Studio 15 2017" 147 CMAKE_GENERATOR_PLATFORM: "x64" 148 CMAKE_GENERATOR_TOOLSET: "LLVM" 149 APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017" 150 151 install: 152 - ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION% 153 - SET PATH_ORIGINAL=%PATH% 154 - if [%HOST%]==[cygwin] ( 155 ECHO Installing Cygwin Packages && 156 C:\cygwin64\setup-x86_64.exe -qnNdO -R "C:\cygwin64" -g -P ^ 157 gcc,^ 158 cmake,^ 159 make 160 ) 161 - IF [%HOST%]==[visual] IF [%PLATFORM%]==[x64] ( 162 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;" 163 ) 164 165 build_script: 166 - ECHO Building %COMPILER% %PLATFORM% %CONFIGURATION% 167 - if [%HOST%]==[cygwin] ( 168 set CHERE_INVOKING=yes && 169 set CC=%COMPILER% && 170 C:\cygwin64\bin\bash --login -c " 171 set -e; 172 cd build/cmake; 173 CFLAGS='-Werror' cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Debug -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_FUZZER_FLAGS=-T20s -DZSTD_ZSTREAM_FLAGS=-T20s -DZSTD_FULLBENCH_FLAGS=-i0 .; 174 make VERBOSE=1 -j; 175 ctest -V -L Medium; 176 " 177 ) 178 - if [%HOST%]==[cmake-visual] ( 179 ECHO *** && 180 ECHO *** Building %CMAKE_GENERATOR% ^(%CMAKE_GENERATOR_TOOLSET%^) %PLATFORM%\%CONFIGURATION% && 181 PUSHD build\cmake && 182 cmake -DBUILD_TESTING=ON . && 183 cmake --build . --config %CONFIGURATION% -j4 && 184 POPD && 185 ECHO *** 186 ) 187 - if [%HOST%]==[visual] ( 188 ECHO *** && 189 ECHO *** Building Visual Studio 2012 %PLATFORM%\%CONFIGURATION% && 190 ECHO *** && 191 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" && 192 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe && 193 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" && 194 DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe 195 ) 196 197 198 test_script: 199 - ECHO Testing %COMPILER% %PLATFORM% %CONFIGURATION% 200 - SET "FUZZERTEST=-T10s" 201 - if [%HOST%]==[mingw] ( 202 set "CC=%COMPILER%" && 203 make clean && 204 make check 205 )