2020-12-25 00:21:42 +00:00
# Following tests are run _only_ on `release` branch
# and on selected feature branch named `appveyorTest` or `visual*`
2019-11-06 06:42:00 +00:00
2017-05-06 10:17:59 +00:00
-
version : 1.0 .{build}
branches :
only :
2020-12-25 00:21:42 +00:00
- release
2017-05-06 10:17:59 +00:00
- master
2020-12-25 00:21:42 +00:00
- /appveyor*/
2018-12-29 06:51:10 +00:00
- /visual*/
2017-05-06 10:17:59 +00:00
environment :
matrix :
- COMPILER : "gcc"
HOST : "mingw"
PLATFORM : "x64"
2020-12-25 00:21:42 +00:00
SCRIPT : "make allzstd MOREFLAGS=-static"
2017-05-06 10:17:59 +00:00
ARTIFACT : "true"
BUILD : "true"
- COMPILER : "gcc"
HOST : "mingw"
PLATFORM : "x86"
2017-11-09 15:38:02 +00:00
SCRIPT : "make allzstd MOREFLAGS=-static"
2017-05-06 10:17:59 +00:00
ARTIFACT : "true"
BUILD : "true"
2017-04-15 19:47:16 +00:00
2023-01-25 01:20:16 +00:00
- COMPILER : "clang-cl"
HOST : "cmake-visual"
2017-05-06 10:17:59 +00:00
PLATFORM : "x64"
CONFIGURATION : "Release"
2023-01-25 01:20:16 +00:00
CMAKE_GENERATOR : "Visual Studio 15 2017"
CMAKE_GENERATOR_PLATFORM : "x64"
CMAKE_GENERATOR_TOOLSET : "LLVM"
APPVEYOR_BUILD_WORKER_IMAGE : "Visual Studio 2017"
2017-05-06 10:17:59 +00:00
install :
2017-04-15 19:47:16 +00:00
- ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION%
2017-05-06 10:17:59 +00:00
- SET PATH_ORIGINAL=%PATH%
- if [%HOST%]==[mingw] (
SET "PATH_MINGW32=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin" &&
SET "PATH_MINGW64=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin" &&
COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin\make.exe &&
COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin\make.exe
2017-04-15 19:47:16 +00:00
)
2017-05-06 10:17:59 +00:00
- IF [%HOST%]==[visual] IF [%PLATFORM%]==[x64] (
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;"
2017-04-15 19:47:16 +00:00
)
2017-05-06 10:17:59 +00:00
build_script :
- if [%HOST%]==[mingw] (
( if [%PLATFORM%]==[x64] (
SET "PATH=%PATH_MINGW64%;%PATH_ORIGINAL%"
) else if [%PLATFORM%]==[x86] (
SET "PATH=%PATH_MINGW32%;%PATH_ORIGINAL%"
) )
2017-04-15 19:47:16 +00:00
)
2017-05-06 10:17:59 +00:00
- if [%HOST%]==[mingw] if [%BUILD%]==[true] (
make -v &&
sh -c "%COMPILER% -v" &&
ECHO Building zlib to static link &&
SET "CC=%COMPILER%" &&
sh -c "cd .. && git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib" &&
sh -c "cd ../zlib && make -f win32/Makefile.gcc libz.a"
ECHO Building zstd &&
SET "CPPFLAGS=-I../../zlib" &&
SET "LDFLAGS=../../zlib/libz.a" &&
sh -c "%SCRIPT%" &&
( if [%COMPILER%]==[gcc] if [%ARTIFACT%]==[true]
2018-10-22 19:50:43 +00:00
ECHO Creating artifacts &&
ECHO %cd% &&
2017-05-06 10:17:59 +00:00
lib\dll\example\build_package.bat &&
make -C programs DEBUGFLAGS= clean zstd &&
2017-07-14 14:51:28 +00:00
cd programs\ && 7z a -tzip -mx9 zstd-win-binary-%PLATFORM%.zip zstd.exe &&
appveyor PushArtifact zstd-win-binary-%PLATFORM%.zip &&
cp zstd.exe ..\bin\zstd.exe &&
2020-12-25 00:21:42 +00:00
git clone --depth 1 --branch release https://github.com/facebook/zstd &&
2018-10-22 19:50:43 +00:00
cd zstd &&
2020-12-25 00:21:42 +00:00
git archive --format=tar release -o zstd-src.tar &&
2018-10-22 19:50:43 +00:00
..\zstd -19 zstd-src.tar &&
appveyor PushArtifact zstd-src.tar.zst &&
certUtil -hashfile zstd-src.tar.zst SHA256 > zstd-src.tar.zst.sha256.sig &&
appveyor PushArtifact zstd-src.tar.zst.sha256.sig &&
cd ..\..\bin\ &&
7z a -tzip -mx9 zstd-win-release-%PLATFORM%.zip * &&
2017-05-06 10:17:59 +00:00
appveyor PushArtifact zstd-win-release-%PLATFORM%.zip
)
2017-04-15 19:47:16 +00:00
)
2023-01-25 01:20:16 +00:00
- if [%HOST%]==[cmake-visual] (
2017-04-15 19:47:16 +00:00
ECHO *** &&
2023-01-25 01:20:16 +00:00
ECHO *** Building %CMAKE_GENERATOR% ^(%CMAKE_GENERATOR_TOOLSET%^) %PLATFORM%\%CONFIGURATION% &&
PUSHD build\cmake &&
cmake -DBUILD_TESTING=ON . &&
cmake --build . --config %CONFIGURATION% -j4 &&
POPD &&
ECHO ***
2017-04-15 19:47:16 +00:00
)
2017-05-06 10:17:59 +00:00
test_script :
2017-04-15 19:47:16 +00:00
- ECHO Testing %COMPILER% %PLATFORM% %CONFIGURATION%
2017-05-06 10:17:59 +00:00
- SET "CC=gcc"
- SET "CXX=g++"
- if [%TEST%]==[cmake] (
2017-04-15 19:47:16 +00:00
mkdir build\cmake\build &&
cd build\cmake\build &&
2020-12-25 00:21:42 +00:00
SET FUZZERTEST=-T2mn &&
SET ZSTREAM_TESTTIME=-T2mn &&
2017-04-15 19:47:16 +00:00
cmake -G "Visual Studio 14 2015 Win64" .. &&
cd ..\..\.. &&
2017-05-06 10:17:59 +00:00
make clean
)
2017-04-15 19:47:16 +00:00
2019-11-06 06:42:00 +00:00
# The following tests are for regular pushes
# into `dev` or some feature branch
# There run less tests, for shorter feedback loop
2017-05-06 10:17:59 +00:00
-
version : 1.0 .{build}
environment :
matrix :
- COMPILER : "visual"
HOST : "visual"
PLATFORM : "x64"
CONFIGURATION : "Debug"
- COMPILER : "visual"
HOST : "visual"
PLATFORM : "Win32"
CONFIGURATION : "Debug"
- COMPILER : "visual"
HOST : "visual"
PLATFORM : "x64"
CONFIGURATION : "Release"
- COMPILER : "visual"
HOST : "visual"
PLATFORM : "Win32"
CONFIGURATION : "Release"
2023-01-25 01:20:16 +00:00
- COMPILER : "gcc"
HOST : "cygwin"
PLATFORM : "x64"
- COMPILER : "clang-cl"
HOST : "cmake-visual"
PLATFORM : "x64"
CONFIGURATION : "Release"
CMAKE_GENERATOR : "Visual Studio 15 2017"
CMAKE_GENERATOR_PLATFORM : "x64"
CMAKE_GENERATOR_TOOLSET : "LLVM"
APPVEYOR_BUILD_WORKER_IMAGE : "Visual Studio 2017"
2017-05-06 10:17:59 +00:00
install :
- ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION%
- SET PATH_ORIGINAL=%PATH%
2020-05-23 20:37:33 +00:00
- if [%HOST%]==[cygwin] (
ECHO Installing Cygwin Packages &&
C:\cygwin64\setup-x86_64.exe -qnNdO -R "C:\cygwin64" -g -P ^
gcc,^
cmake,^
make
)
2017-05-06 10:17:59 +00:00
- IF [%HOST%]==[visual] IF [%PLATFORM%]==[x64] (
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;"
)
2017-04-15 19:47:16 +00:00
2017-05-06 10:17:59 +00:00
build_script :
- ECHO Building %COMPILER% %PLATFORM% %CONFIGURATION%
2020-05-23 20:37:33 +00:00
- if [%HOST%]==[cygwin] (
set CHERE_INVOKING=yes &&
set CC=%COMPILER% &&
C:\cygwin64\bin\bash --login -c "
set -e;
cd build/cmake;
2023-01-25 01:20:16 +00:00
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 .;
make VERBOSE=1 -j;
2020-05-23 20:37:33 +00:00
ctest -V -L Medium;
"
)
2023-01-25 01:20:16 +00:00
- if [%HOST%]==[cmake-visual] (
ECHO *** &&
ECHO *** Building %CMAKE_GENERATOR% ^(%CMAKE_GENERATOR_TOOLSET%^) %PLATFORM%\%CONFIGURATION% &&
PUSHD build\cmake &&
cmake -DBUILD_TESTING=ON . &&
cmake --build . --config %CONFIGURATION% -j4 &&
POPD &&
ECHO ***
2017-05-06 10:17:59 +00:00
)
- if [%HOST%]==[visual] (
ECHO *** &&
2023-01-25 01:20:16 +00:00
ECHO *** Building Visual Studio 2012 %PLATFORM%\%CONFIGURATION% &&
2017-05-06 10:17:59 +00:00
ECHO *** &&
2023-01-25 01:20:16 +00:00
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" &&
2017-05-06 10:17:59 +00:00
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
2023-01-25 01:20:16 +00:00
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" &&
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe
2017-05-06 10:17:59 +00:00
)
2019-11-06 06:42:00 +00:00
test_script :
- ECHO Testing %COMPILER% %PLATFORM% %CONFIGURATION%
2023-01-25 01:20:16 +00:00
- SET "FUZZERTEST=-T10s"
2019-11-06 06:42:00 +00:00
- if [%HOST%]==[mingw] (
set "CC=%COMPILER%" &&
2020-12-25 00:21:42 +00:00
make clean &&
2019-11-06 06:42:00 +00:00
make check
2023-01-25 01:20:16 +00:00
)