extzstd 0.0.3.CONCEPT → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/HISTORY.ja.md +39 -0
- data/LICENSE +6 -6
- data/README.md +26 -45
- data/contrib/zstd/CHANGELOG +555 -0
- data/contrib/zstd/CODE_OF_CONDUCT.md +5 -0
- data/contrib/zstd/CONTRIBUTING.md +392 -0
- data/contrib/zstd/COPYING +339 -0
- data/contrib/zstd/LICENSE +13 -9
- data/contrib/zstd/Makefile +414 -0
- data/contrib/zstd/README.md +170 -45
- data/contrib/zstd/TESTING.md +44 -0
- data/contrib/zstd/appveyor.yml +289 -0
- data/contrib/zstd/lib/BUCK +234 -0
- data/contrib/zstd/lib/Makefile +354 -0
- data/contrib/zstd/lib/README.md +179 -0
- data/contrib/zstd/{common → lib/common}/bitstream.h +170 -130
- data/contrib/zstd/lib/common/compiler.h +175 -0
- data/contrib/zstd/lib/common/cpu.h +215 -0
- data/contrib/zstd/lib/common/debug.c +24 -0
- data/contrib/zstd/lib/common/debug.h +114 -0
- data/contrib/zstd/{common → lib/common}/entropy_common.c +79 -94
- data/contrib/zstd/lib/common/error_private.c +55 -0
- data/contrib/zstd/lib/common/error_private.h +80 -0
- data/contrib/zstd/{common → lib/common}/fse.h +153 -93
- data/contrib/zstd/{common → lib/common}/fse_decompress.c +37 -82
- data/contrib/zstd/lib/common/huf.h +340 -0
- data/contrib/zstd/{common → lib/common}/mem.h +154 -78
- data/contrib/zstd/lib/common/pool.c +344 -0
- data/contrib/zstd/lib/common/pool.h +84 -0
- data/contrib/zstd/lib/common/threading.c +121 -0
- data/contrib/zstd/lib/common/threading.h +155 -0
- data/contrib/zstd/{common → lib/common}/xxhash.c +85 -75
- data/contrib/zstd/{common → lib/common}/xxhash.h +85 -73
- data/contrib/zstd/lib/common/zstd_common.c +83 -0
- data/contrib/zstd/lib/common/zstd_errors.h +94 -0
- data/contrib/zstd/lib/common/zstd_internal.h +447 -0
- data/contrib/zstd/{compress → lib/compress}/fse_compress.c +194 -303
- data/contrib/zstd/lib/compress/hist.c +183 -0
- data/contrib/zstd/lib/compress/hist.h +75 -0
- data/contrib/zstd/lib/compress/huf_compress.c +798 -0
- data/contrib/zstd/lib/compress/zstd_compress.c +4278 -0
- data/contrib/zstd/lib/compress/zstd_compress_internal.h +1125 -0
- data/contrib/zstd/lib/compress/zstd_compress_literals.c +158 -0
- data/contrib/zstd/lib/compress/zstd_compress_literals.h +29 -0
- data/contrib/zstd/lib/compress/zstd_compress_sequences.c +419 -0
- data/contrib/zstd/lib/compress/zstd_compress_sequences.h +54 -0
- data/contrib/zstd/lib/compress/zstd_compress_superblock.c +845 -0
- data/contrib/zstd/lib/compress/zstd_compress_superblock.h +32 -0
- data/contrib/zstd/lib/compress/zstd_cwksp.h +525 -0
- data/contrib/zstd/lib/compress/zstd_double_fast.c +521 -0
- data/contrib/zstd/lib/compress/zstd_double_fast.h +38 -0
- data/contrib/zstd/lib/compress/zstd_fast.c +496 -0
- data/contrib/zstd/lib/compress/zstd_fast.h +37 -0
- data/contrib/zstd/lib/compress/zstd_lazy.c +1138 -0
- data/contrib/zstd/lib/compress/zstd_lazy.h +67 -0
- data/contrib/zstd/lib/compress/zstd_ldm.c +619 -0
- data/contrib/zstd/lib/compress/zstd_ldm.h +110 -0
- data/contrib/zstd/lib/compress/zstd_opt.c +1200 -0
- data/contrib/zstd/lib/compress/zstd_opt.h +56 -0
- data/contrib/zstd/lib/compress/zstdmt_compress.c +2143 -0
- data/contrib/zstd/lib/compress/zstdmt_compress.h +192 -0
- data/contrib/zstd/lib/decompress/huf_decompress.c +1248 -0
- data/contrib/zstd/lib/decompress/zstd_ddict.c +244 -0
- data/contrib/zstd/lib/decompress/zstd_ddict.h +44 -0
- data/contrib/zstd/lib/decompress/zstd_decompress.c +1885 -0
- data/contrib/zstd/lib/decompress/zstd_decompress_block.c +1432 -0
- data/contrib/zstd/lib/decompress/zstd_decompress_block.h +59 -0
- data/contrib/zstd/lib/decompress/zstd_decompress_internal.h +189 -0
- data/contrib/zstd/{common → lib/deprecated}/zbuff.h +86 -69
- data/contrib/zstd/lib/deprecated/zbuff_common.c +26 -0
- data/contrib/zstd/lib/deprecated/zbuff_compress.c +147 -0
- data/contrib/zstd/lib/deprecated/zbuff_decompress.c +75 -0
- data/contrib/zstd/lib/dictBuilder/cover.c +1236 -0
- data/contrib/zstd/lib/dictBuilder/cover.h +157 -0
- data/contrib/zstd/{dictBuilder → lib/dictBuilder}/divsufsort.c +3 -3
- data/contrib/zstd/{dictBuilder → lib/dictBuilder}/divsufsort.h +5 -5
- data/contrib/zstd/lib/dictBuilder/fastcover.c +757 -0
- data/contrib/zstd/{dictBuilder → lib/dictBuilder}/zdict.c +437 -347
- data/contrib/zstd/lib/dictBuilder/zdict.h +305 -0
- data/contrib/zstd/lib/legacy/zstd_legacy.h +415 -0
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v01.c +272 -292
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v01.h +26 -32
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v02.c +162 -392
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v02.h +26 -32
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v03.c +162 -391
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v03.h +27 -33
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v04.c +195 -604
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v04.h +26 -32
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v05.c +300 -575
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v05.h +22 -31
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v06.c +165 -592
- data/contrib/zstd/{legacy → lib/legacy}/zstd_v06.h +54 -67
- data/contrib/zstd/lib/legacy/zstd_v07.c +4541 -0
- data/contrib/zstd/lib/legacy/zstd_v07.h +187 -0
- data/contrib/zstd/lib/libzstd.pc.in +15 -0
- data/contrib/zstd/lib/zstd.h +2090 -0
- data/ext/depend +2 -0
- data/ext/extconf.rb +18 -5
- data/ext/extzstd.c +296 -214
- data/ext/extzstd.h +81 -36
- data/ext/extzstd_nogvls.h +0 -117
- data/ext/extzstd_stream.c +622 -0
- data/ext/libzstd_conf.h +8 -0
- data/ext/zstd_common.c +11 -0
- data/ext/zstd_compress.c +15 -0
- data/ext/zstd_decompress.c +6 -0
- data/ext/zstd_dictbuilder.c +10 -0
- data/ext/zstd_dictbuilder_fastcover.c +3 -0
- data/ext/zstd_legacy_v01.c +3 -1
- data/ext/zstd_legacy_v02.c +3 -1
- data/ext/zstd_legacy_v03.c +3 -1
- data/ext/zstd_legacy_v04.c +3 -1
- data/ext/zstd_legacy_v05.c +3 -1
- data/ext/zstd_legacy_v06.c +3 -1
- data/ext/zstd_legacy_v07.c +3 -0
- data/gemstub.rb +27 -21
- data/lib/extzstd.rb +82 -161
- data/lib/extzstd/version.rb +1 -1
- data/test/test_basic.rb +19 -6
- metadata +127 -59
- data/contrib/zstd/common/error_private.h +0 -125
- data/contrib/zstd/common/error_public.h +0 -77
- data/contrib/zstd/common/huf.h +0 -228
- data/contrib/zstd/common/zstd.h +0 -475
- data/contrib/zstd/common/zstd_common.c +0 -91
- data/contrib/zstd/common/zstd_internal.h +0 -238
- data/contrib/zstd/compress/huf_compress.c +0 -577
- data/contrib/zstd/compress/zbuff_compress.c +0 -327
- data/contrib/zstd/compress/zstd_compress.c +0 -3074
- data/contrib/zstd/compress/zstd_opt.h +0 -1046
- data/contrib/zstd/decompress/huf_decompress.c +0 -894
- data/contrib/zstd/decompress/zbuff_decompress.c +0 -294
- data/contrib/zstd/decompress/zstd_decompress.c +0 -1362
- data/contrib/zstd/dictBuilder/zdict.h +0 -113
- data/contrib/zstd/legacy/zstd_legacy.h +0 -140
- data/ext/extzstd_buffered.c +0 -265
- data/ext/zstd_amalgam.c +0 -18
@@ -0,0 +1,44 @@
|
|
1
|
+
Testing
|
2
|
+
=======
|
3
|
+
|
4
|
+
Zstandard CI testing is split up into three sections:
|
5
|
+
short, medium, and long tests.
|
6
|
+
|
7
|
+
Short Tests
|
8
|
+
-----------
|
9
|
+
Short tests run on CircleCI for new commits on every branch and pull request.
|
10
|
+
They consist of the following tests:
|
11
|
+
- Compilation on all supported targets (x86, x86_64, ARM, AArch64, PowerPC, and PowerPC64)
|
12
|
+
- Compilation on various versions of gcc, clang, and g++
|
13
|
+
- `tests/playTests.sh` on x86_64, without the tests on long data (CLI tests)
|
14
|
+
- Small tests (`tests/legacy.c`, `tests/longmatch.c`) on x64_64
|
15
|
+
|
16
|
+
Medium Tests
|
17
|
+
------------
|
18
|
+
Medium tests run on every commit and pull request to `dev` branch, on TravisCI.
|
19
|
+
They consist of the following tests:
|
20
|
+
- The following tests run with UBsan and Asan on x86_64 and x86, as well as with
|
21
|
+
Msan on x86_64
|
22
|
+
- `tests/playTests.sh --test-large-data`
|
23
|
+
- Fuzzer tests: `tests/fuzzer.c`, `tests/zstreamtest.c`, and `tests/decodecorpus.c`
|
24
|
+
- `tests/zstreamtest.c` under Tsan (streaming mode, including multithreaded mode)
|
25
|
+
- Valgrind Test (`make -C tests valgrindTest`) (testing CLI and fuzzer under valgrind)
|
26
|
+
- Fuzzer tests (see above) on ARM, AArch64, PowerPC, and PowerPC64
|
27
|
+
|
28
|
+
Long Tests
|
29
|
+
----------
|
30
|
+
Long tests run on all commits to `master` branch,
|
31
|
+
and once a day on the current version of `dev` branch,
|
32
|
+
on TravisCI.
|
33
|
+
They consist of the following tests:
|
34
|
+
- Entire test suite (including fuzzers and some other specialized tests) on:
|
35
|
+
- x86_64 and x86 with UBsan and Asan
|
36
|
+
- x86_64 with Msan
|
37
|
+
- ARM, AArch64, PowerPC, and PowerPC64
|
38
|
+
- Streaming mode fuzzer with Tsan (for the `zstdmt` testing)
|
39
|
+
- ZlibWrapper tests, including under valgrind
|
40
|
+
- Versions test (ensuring `zstd` can decode files from all previous versions)
|
41
|
+
- `pzstd` with asan and tsan, as well as in 32-bits mode
|
42
|
+
- Testing `zstd` with legacy mode off
|
43
|
+
- Testing `zbuff` (old streaming API)
|
44
|
+
- Entire test suite and make install on macOS
|
@@ -0,0 +1,289 @@
|
|
1
|
+
# Following tests are run _only_ on master branch
|
2
|
+
# To reproduce these tests, it's possible to push into a branch `appveyorTest`
|
3
|
+
# or a branch `visual*`, they will intentionnally trigger `master` tests
|
4
|
+
|
5
|
+
-
|
6
|
+
version: 1.0.{build}
|
7
|
+
branches:
|
8
|
+
only:
|
9
|
+
- master
|
10
|
+
- appveyorTest
|
11
|
+
- /visual*/
|
12
|
+
environment:
|
13
|
+
matrix:
|
14
|
+
- COMPILER: "gcc"
|
15
|
+
HOST: "mingw"
|
16
|
+
PLATFORM: "x64"
|
17
|
+
SCRIPT: "make allzstd MOREFLAGS=-static && make -C tests fullbench-lib"
|
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
|
+
- COMPILER: "clang"
|
27
|
+
HOST: "mingw"
|
28
|
+
PLATFORM: "x64"
|
29
|
+
SCRIPT: "MOREFLAGS='--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion' make allzstd"
|
30
|
+
BUILD: "true"
|
31
|
+
|
32
|
+
- COMPILER: "gcc"
|
33
|
+
HOST: "mingw"
|
34
|
+
PLATFORM: "x64"
|
35
|
+
SCRIPT: ""
|
36
|
+
TEST: "cmake"
|
37
|
+
|
38
|
+
- COMPILER: "visual"
|
39
|
+
HOST: "visual"
|
40
|
+
PLATFORM: "x64"
|
41
|
+
CONFIGURATION: "Debug"
|
42
|
+
- COMPILER: "visual"
|
43
|
+
HOST: "visual"
|
44
|
+
PLATFORM: "Win32"
|
45
|
+
CONFIGURATION: "Debug"
|
46
|
+
- COMPILER: "visual"
|
47
|
+
HOST: "visual"
|
48
|
+
PLATFORM: "x64"
|
49
|
+
CONFIGURATION: "Release"
|
50
|
+
- COMPILER: "visual"
|
51
|
+
HOST: "visual"
|
52
|
+
PLATFORM: "Win32"
|
53
|
+
CONFIGURATION: "Release"
|
54
|
+
|
55
|
+
install:
|
56
|
+
- ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION%
|
57
|
+
- SET PATH_ORIGINAL=%PATH%
|
58
|
+
- if [%HOST%]==[mingw] (
|
59
|
+
SET "PATH_MINGW32=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin" &&
|
60
|
+
SET "PATH_MINGW64=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin" &&
|
61
|
+
COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin\make.exe &&
|
62
|
+
COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin\make.exe
|
63
|
+
)
|
64
|
+
- IF [%HOST%]==[visual] IF [%PLATFORM%]==[x64] (
|
65
|
+
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;"
|
66
|
+
)
|
67
|
+
|
68
|
+
build_script:
|
69
|
+
- if [%HOST%]==[mingw] (
|
70
|
+
( if [%PLATFORM%]==[x64] (
|
71
|
+
SET "PATH=%PATH_MINGW64%;%PATH_ORIGINAL%"
|
72
|
+
) else if [%PLATFORM%]==[x86] (
|
73
|
+
SET "PATH=%PATH_MINGW32%;%PATH_ORIGINAL%"
|
74
|
+
) )
|
75
|
+
)
|
76
|
+
- if [%HOST%]==[mingw] if [%BUILD%]==[true] (
|
77
|
+
make -v &&
|
78
|
+
sh -c "%COMPILER% -v" &&
|
79
|
+
ECHO Building zlib to static link &&
|
80
|
+
SET "CC=%COMPILER%" &&
|
81
|
+
sh -c "cd .. && git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib" &&
|
82
|
+
sh -c "cd ../zlib && make -f win32/Makefile.gcc libz.a"
|
83
|
+
ECHO Building zstd &&
|
84
|
+
SET "CPPFLAGS=-I../../zlib" &&
|
85
|
+
SET "LDFLAGS=../../zlib/libz.a" &&
|
86
|
+
sh -c "%SCRIPT%" &&
|
87
|
+
( if [%COMPILER%]==[gcc] if [%ARTIFACT%]==[true]
|
88
|
+
ECHO Creating artifacts &&
|
89
|
+
ECHO %cd% &&
|
90
|
+
lib\dll\example\build_package.bat &&
|
91
|
+
make -C programs DEBUGFLAGS= clean zstd &&
|
92
|
+
cd programs\ && 7z a -tzip -mx9 zstd-win-binary-%PLATFORM%.zip zstd.exe &&
|
93
|
+
appveyor PushArtifact zstd-win-binary-%PLATFORM%.zip &&
|
94
|
+
cp zstd.exe ..\bin\zstd.exe &&
|
95
|
+
git clone --depth 1 --branch master https://github.com/facebook/zstd &&
|
96
|
+
cd zstd &&
|
97
|
+
git archive --format=tar master -o zstd-src.tar &&
|
98
|
+
..\zstd -19 zstd-src.tar &&
|
99
|
+
appveyor PushArtifact zstd-src.tar.zst &&
|
100
|
+
certUtil -hashfile zstd-src.tar.zst SHA256 > zstd-src.tar.zst.sha256.sig &&
|
101
|
+
appveyor PushArtifact zstd-src.tar.zst.sha256.sig &&
|
102
|
+
cd ..\..\bin\ &&
|
103
|
+
7z a -tzip -mx9 zstd-win-release-%PLATFORM%.zip * &&
|
104
|
+
appveyor PushArtifact zstd-win-release-%PLATFORM%.zip
|
105
|
+
)
|
106
|
+
)
|
107
|
+
- if [%HOST%]==[visual] (
|
108
|
+
ECHO *** &&
|
109
|
+
ECHO *** Building Visual Studio 2008 %PLATFORM%\%CONFIGURATION% in %APPVEYOR_BUILD_FOLDER% &&
|
110
|
+
ECHO *** &&
|
111
|
+
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" &&
|
112
|
+
DIR build\VS2008\bin\%PLATFORM%\%CONFIGURATION%\*.exe &&
|
113
|
+
MD5sum build/VS2008/bin/%PLATFORM%/%CONFIGURATION%/*.exe &&
|
114
|
+
COPY build\VS2008\bin\%PLATFORM%\%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2008_%PLATFORM%_%CONFIGURATION%.exe &&
|
115
|
+
ECHO *** &&
|
116
|
+
ECHO *** Building Visual Studio 2010 %PLATFORM%\%CONFIGURATION% &&
|
117
|
+
ECHO *** &&
|
118
|
+
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" &&
|
119
|
+
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
|
120
|
+
MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
|
121
|
+
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" &&
|
122
|
+
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
|
123
|
+
MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
|
124
|
+
COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2010_%PLATFORM%_%CONFIGURATION%.exe &&
|
125
|
+
ECHO *** &&
|
126
|
+
ECHO *** Building Visual Studio 2012 %PLATFORM%\%CONFIGURATION% &&
|
127
|
+
ECHO *** &&
|
128
|
+
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" &&
|
129
|
+
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
|
130
|
+
MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
|
131
|
+
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" &&
|
132
|
+
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
|
133
|
+
MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
|
134
|
+
COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2012_%PLATFORM%_%CONFIGURATION%.exe &&
|
135
|
+
ECHO *** &&
|
136
|
+
ECHO *** Building Visual Studio 2013 %PLATFORM%\%CONFIGURATION% &&
|
137
|
+
ECHO *** &&
|
138
|
+
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" &&
|
139
|
+
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
|
140
|
+
MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
|
141
|
+
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" &&
|
142
|
+
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
|
143
|
+
MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
|
144
|
+
COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2013_%PLATFORM%_%CONFIGURATION%.exe &&
|
145
|
+
ECHO *** &&
|
146
|
+
ECHO *** Building Visual Studio 2015 %PLATFORM%\%CONFIGURATION% &&
|
147
|
+
ECHO *** &&
|
148
|
+
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" &&
|
149
|
+
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
|
150
|
+
MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
|
151
|
+
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" &&
|
152
|
+
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
|
153
|
+
MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
|
154
|
+
COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2015_%PLATFORM%_%CONFIGURATION%.exe &&
|
155
|
+
COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe tests\
|
156
|
+
)
|
157
|
+
|
158
|
+
test_script:
|
159
|
+
- ECHO Testing %COMPILER% %PLATFORM% %CONFIGURATION%
|
160
|
+
- SET "CC=gcc"
|
161
|
+
- SET "CXX=g++"
|
162
|
+
- if [%TEST%]==[cmake] (
|
163
|
+
mkdir build\cmake\build &&
|
164
|
+
cd build\cmake\build &&
|
165
|
+
cmake -G "Visual Studio 14 2015 Win64" .. &&
|
166
|
+
cd ..\..\.. &&
|
167
|
+
make clean
|
168
|
+
)
|
169
|
+
- SET "FUZZERTEST=-T30s"
|
170
|
+
- if [%HOST%]==[visual] if [%CONFIGURATION%]==[Release] (
|
171
|
+
CD tests &&
|
172
|
+
SET ZSTD_BIN=./zstd.exe&&
|
173
|
+
SET DATAGEN_BIN=./datagen.exe&&
|
174
|
+
sh -e playTests.sh --test-large-data &&
|
175
|
+
fullbench.exe -i1 &&
|
176
|
+
fullbench.exe -i1 -P0 &&
|
177
|
+
fuzzer_VS2012_%PLATFORM%_Release.exe %FUZZERTEST% &&
|
178
|
+
fuzzer_VS2013_%PLATFORM%_Release.exe %FUZZERTEST% &&
|
179
|
+
fuzzer_VS2015_%PLATFORM%_Release.exe %FUZZERTEST%
|
180
|
+
)
|
181
|
+
|
182
|
+
|
183
|
+
# The following tests are for regular pushes
|
184
|
+
# into `dev` or some feature branch
|
185
|
+
# There run less tests, for shorter feedback loop
|
186
|
+
|
187
|
+
-
|
188
|
+
version: 1.0.{build}
|
189
|
+
environment:
|
190
|
+
matrix:
|
191
|
+
- COMPILER: "gcc"
|
192
|
+
HOST: "cygwin"
|
193
|
+
PLATFORM: "x64"
|
194
|
+
- COMPILER: "gcc"
|
195
|
+
HOST: "mingw"
|
196
|
+
PLATFORM: "x64"
|
197
|
+
SCRIPT: "CPPFLAGS=-DDEBUGLEVEL=2 CFLAGS=-Werror make -j allzstd DEBUGLEVEL=2"
|
198
|
+
- COMPILER: "gcc"
|
199
|
+
HOST: "mingw"
|
200
|
+
PLATFORM: "x86"
|
201
|
+
SCRIPT: "CFLAGS=-Werror make -j allzstd"
|
202
|
+
- COMPILER: "clang"
|
203
|
+
HOST: "mingw"
|
204
|
+
PLATFORM: "x64"
|
205
|
+
SCRIPT: "CFLAGS='--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion' make -j allzstd"
|
206
|
+
|
207
|
+
- COMPILER: "visual"
|
208
|
+
HOST: "visual"
|
209
|
+
PLATFORM: "x64"
|
210
|
+
CONFIGURATION: "Debug"
|
211
|
+
- COMPILER: "visual"
|
212
|
+
HOST: "visual"
|
213
|
+
PLATFORM: "Win32"
|
214
|
+
CONFIGURATION: "Debug"
|
215
|
+
- COMPILER: "visual"
|
216
|
+
HOST: "visual"
|
217
|
+
PLATFORM: "x64"
|
218
|
+
CONFIGURATION: "Release"
|
219
|
+
- COMPILER: "visual"
|
220
|
+
HOST: "visual"
|
221
|
+
PLATFORM: "Win32"
|
222
|
+
CONFIGURATION: "Release"
|
223
|
+
|
224
|
+
install:
|
225
|
+
- ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION%
|
226
|
+
- SET PATH_ORIGINAL=%PATH%
|
227
|
+
- if [%HOST%]==[cygwin] (
|
228
|
+
ECHO Installing Cygwin Packages &&
|
229
|
+
C:\cygwin64\setup-x86_64.exe -qnNdO -R "C:\cygwin64" -g -P ^
|
230
|
+
gcc-g++,^
|
231
|
+
gcc,^
|
232
|
+
cmake,^
|
233
|
+
make
|
234
|
+
)
|
235
|
+
- if [%HOST%]==[mingw] (
|
236
|
+
SET "PATH_MINGW32=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin" &&
|
237
|
+
SET "PATH_MINGW64=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin" &&
|
238
|
+
COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin\make.exe &&
|
239
|
+
COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin\make.exe
|
240
|
+
)
|
241
|
+
- IF [%HOST%]==[visual] IF [%PLATFORM%]==[x64] (
|
242
|
+
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;"
|
243
|
+
)
|
244
|
+
|
245
|
+
build_script:
|
246
|
+
- ECHO Building %COMPILER% %PLATFORM% %CONFIGURATION%
|
247
|
+
- if [%HOST%]==[cygwin] (
|
248
|
+
set CHERE_INVOKING=yes &&
|
249
|
+
set CC=%COMPILER% &&
|
250
|
+
C:\cygwin64\bin\bash --login -c "
|
251
|
+
set -e;
|
252
|
+
cd build/cmake;
|
253
|
+
CFLAGS='-Werror' cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Debug -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_FUZZER_FLAGS=-T30s -DZSTD_ZSTREAM_FLAGS=-T30s .;
|
254
|
+
make -j4;
|
255
|
+
ctest -V -L Medium;
|
256
|
+
"
|
257
|
+
)
|
258
|
+
- if [%HOST%]==[mingw] (
|
259
|
+
( if [%PLATFORM%]==[x64] (
|
260
|
+
SET "PATH=%PATH_MINGW64%;%PATH_ORIGINAL%"
|
261
|
+
) else if [%PLATFORM%]==[x86] (
|
262
|
+
SET "PATH=%PATH_MINGW32%;%PATH_ORIGINAL%"
|
263
|
+
) ) &&
|
264
|
+
make -v &&
|
265
|
+
sh -c "%COMPILER% -v" &&
|
266
|
+
set "CC=%COMPILER%" &&
|
267
|
+
sh -c "%SCRIPT%"
|
268
|
+
)
|
269
|
+
- if [%HOST%]==[visual] (
|
270
|
+
ECHO *** &&
|
271
|
+
ECHO *** Building Visual Studio 2015 %PLATFORM%\%CONFIGURATION% &&
|
272
|
+
ECHO *** &&
|
273
|
+
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" &&
|
274
|
+
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
|
275
|
+
MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
|
276
|
+
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" &&
|
277
|
+
DIR build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe &&
|
278
|
+
MD5sum build/VS2010/bin/%PLATFORM%_%CONFIGURATION%/*.exe &&
|
279
|
+
COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\fuzzer.exe tests\fuzzer_VS2015_%PLATFORM%_%CONFIGURATION%.exe &&
|
280
|
+
COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe tests\
|
281
|
+
)
|
282
|
+
|
283
|
+
|
284
|
+
test_script:
|
285
|
+
- ECHO Testing %COMPILER% %PLATFORM% %CONFIGURATION%
|
286
|
+
- if [%HOST%]==[mingw] (
|
287
|
+
set "CC=%COMPILER%" &&
|
288
|
+
make check
|
289
|
+
)
|
@@ -0,0 +1,234 @@
|
|
1
|
+
cxx_library(
|
2
|
+
name='zstd',
|
3
|
+
header_namespace='',
|
4
|
+
exported_headers=['zstd.h'],
|
5
|
+
visibility=['PUBLIC'],
|
6
|
+
deps=[
|
7
|
+
':common',
|
8
|
+
':compress',
|
9
|
+
':decompress',
|
10
|
+
':deprecated',
|
11
|
+
],
|
12
|
+
)
|
13
|
+
|
14
|
+
cxx_library(
|
15
|
+
name='compress',
|
16
|
+
header_namespace='',
|
17
|
+
visibility=['PUBLIC'],
|
18
|
+
exported_headers=subdir_glob([
|
19
|
+
('compress', 'zstd*.h'),
|
20
|
+
]),
|
21
|
+
srcs=glob(['compress/zstd*.c', 'compress/hist.c']),
|
22
|
+
deps=[':common'],
|
23
|
+
)
|
24
|
+
|
25
|
+
cxx_library(
|
26
|
+
name='decompress',
|
27
|
+
header_namespace='',
|
28
|
+
visibility=['PUBLIC'],
|
29
|
+
headers=subdir_glob([
|
30
|
+
('decompress', '*_impl.h'),
|
31
|
+
]),
|
32
|
+
srcs=glob(['decompress/zstd*.c']),
|
33
|
+
deps=[
|
34
|
+
':common',
|
35
|
+
':legacy',
|
36
|
+
],
|
37
|
+
)
|
38
|
+
|
39
|
+
cxx_library(
|
40
|
+
name='deprecated',
|
41
|
+
header_namespace='',
|
42
|
+
visibility=['PUBLIC'],
|
43
|
+
exported_headers=subdir_glob([
|
44
|
+
('deprecated', '*.h'),
|
45
|
+
]),
|
46
|
+
srcs=glob(['deprecated/*.c']),
|
47
|
+
deps=[':common'],
|
48
|
+
)
|
49
|
+
|
50
|
+
cxx_library(
|
51
|
+
name='legacy',
|
52
|
+
header_namespace='',
|
53
|
+
visibility=['PUBLIC'],
|
54
|
+
exported_headers=subdir_glob([
|
55
|
+
('legacy', '*.h'),
|
56
|
+
]),
|
57
|
+
srcs=glob(['legacy/*.c']),
|
58
|
+
deps=[':common'],
|
59
|
+
exported_preprocessor_flags=[
|
60
|
+
'-DZSTD_LEGACY_SUPPORT=4',
|
61
|
+
],
|
62
|
+
)
|
63
|
+
|
64
|
+
cxx_library(
|
65
|
+
name='zdict',
|
66
|
+
header_namespace='',
|
67
|
+
visibility=['PUBLIC'],
|
68
|
+
exported_headers=subdir_glob([
|
69
|
+
('dictBuilder', 'zdict.h'),
|
70
|
+
]),
|
71
|
+
headers=subdir_glob([
|
72
|
+
('dictBuilder', 'divsufsort.h'),
|
73
|
+
('dictBuilder', 'cover.h'),
|
74
|
+
]),
|
75
|
+
srcs=glob(['dictBuilder/*.c']),
|
76
|
+
deps=[':common'],
|
77
|
+
)
|
78
|
+
|
79
|
+
cxx_library(
|
80
|
+
name='compiler',
|
81
|
+
header_namespace='',
|
82
|
+
visibility=['PUBLIC'],
|
83
|
+
exported_headers=subdir_glob([
|
84
|
+
('common', 'compiler.h'),
|
85
|
+
]),
|
86
|
+
)
|
87
|
+
|
88
|
+
cxx_library(
|
89
|
+
name='cpu',
|
90
|
+
header_namespace='',
|
91
|
+
visibility=['PUBLIC'],
|
92
|
+
exported_headers=subdir_glob([
|
93
|
+
('common', 'cpu.h'),
|
94
|
+
]),
|
95
|
+
)
|
96
|
+
|
97
|
+
cxx_library(
|
98
|
+
name='bitstream',
|
99
|
+
header_namespace='',
|
100
|
+
visibility=['PUBLIC'],
|
101
|
+
exported_headers=subdir_glob([
|
102
|
+
('common', 'bitstream.h'),
|
103
|
+
]),
|
104
|
+
)
|
105
|
+
|
106
|
+
cxx_library(
|
107
|
+
name='entropy',
|
108
|
+
header_namespace='',
|
109
|
+
visibility=['PUBLIC'],
|
110
|
+
exported_headers=subdir_glob([
|
111
|
+
('common', 'fse.h'),
|
112
|
+
('common', 'huf.h'),
|
113
|
+
]),
|
114
|
+
srcs=[
|
115
|
+
'common/entropy_common.c',
|
116
|
+
'common/fse_decompress.c',
|
117
|
+
'compress/fse_compress.c',
|
118
|
+
'compress/huf_compress.c',
|
119
|
+
'decompress/huf_decompress.c',
|
120
|
+
],
|
121
|
+
deps=[
|
122
|
+
':debug',
|
123
|
+
':bitstream',
|
124
|
+
':compiler',
|
125
|
+
':errors',
|
126
|
+
':mem',
|
127
|
+
],
|
128
|
+
)
|
129
|
+
|
130
|
+
cxx_library(
|
131
|
+
name='errors',
|
132
|
+
header_namespace='',
|
133
|
+
visibility=['PUBLIC'],
|
134
|
+
exported_headers=subdir_glob([
|
135
|
+
('common', 'error_private.h'),
|
136
|
+
('common', 'zstd_errors.h'),
|
137
|
+
]),
|
138
|
+
srcs=['common/error_private.c'],
|
139
|
+
)
|
140
|
+
|
141
|
+
cxx_library(
|
142
|
+
name='mem',
|
143
|
+
header_namespace='',
|
144
|
+
visibility=['PUBLIC'],
|
145
|
+
exported_headers=subdir_glob([
|
146
|
+
('common', 'mem.h'),
|
147
|
+
]),
|
148
|
+
)
|
149
|
+
|
150
|
+
cxx_library(
|
151
|
+
name='pool',
|
152
|
+
header_namespace='',
|
153
|
+
visibility=['PUBLIC'],
|
154
|
+
exported_headers=subdir_glob([
|
155
|
+
('common', 'pool.h'),
|
156
|
+
]),
|
157
|
+
srcs=['common/pool.c'],
|
158
|
+
deps=[
|
159
|
+
':threading',
|
160
|
+
':zstd_common',
|
161
|
+
],
|
162
|
+
)
|
163
|
+
|
164
|
+
cxx_library(
|
165
|
+
name='threading',
|
166
|
+
header_namespace='',
|
167
|
+
visibility=['PUBLIC'],
|
168
|
+
exported_headers=subdir_glob([
|
169
|
+
('common', 'threading.h'),
|
170
|
+
]),
|
171
|
+
srcs=['common/threading.c'],
|
172
|
+
exported_preprocessor_flags=[
|
173
|
+
'-DZSTD_MULTITHREAD',
|
174
|
+
],
|
175
|
+
exported_linker_flags=[
|
176
|
+
'-pthread',
|
177
|
+
],
|
178
|
+
)
|
179
|
+
|
180
|
+
cxx_library(
|
181
|
+
name='xxhash',
|
182
|
+
header_namespace='',
|
183
|
+
visibility=['PUBLIC'],
|
184
|
+
exported_headers=subdir_glob([
|
185
|
+
('common', 'xxhash.h'),
|
186
|
+
]),
|
187
|
+
srcs=['common/xxhash.c'],
|
188
|
+
exported_preprocessor_flags=[
|
189
|
+
'-DXXH_NAMESPACE=ZSTD_',
|
190
|
+
],
|
191
|
+
)
|
192
|
+
|
193
|
+
cxx_library(
|
194
|
+
name='zstd_common',
|
195
|
+
header_namespace='',
|
196
|
+
visibility=['PUBLIC'],
|
197
|
+
exported_headers=subdir_glob([
|
198
|
+
('', 'zstd.h'),
|
199
|
+
('common', 'zstd_internal.h'),
|
200
|
+
]),
|
201
|
+
srcs=['common/zstd_common.c'],
|
202
|
+
deps=[
|
203
|
+
':compiler',
|
204
|
+
':errors',
|
205
|
+
':mem',
|
206
|
+
],
|
207
|
+
)
|
208
|
+
|
209
|
+
cxx_library(
|
210
|
+
name='debug',
|
211
|
+
header_namespace='',
|
212
|
+
visibility=['PUBLIC'],
|
213
|
+
exported_headers=subdir_glob([
|
214
|
+
('common', 'debug.h'),
|
215
|
+
]),
|
216
|
+
srcs=['common/debug.c'],
|
217
|
+
)
|
218
|
+
|
219
|
+
cxx_library(
|
220
|
+
name='common',
|
221
|
+
deps=[
|
222
|
+
':debug',
|
223
|
+
':bitstream',
|
224
|
+
':compiler',
|
225
|
+
':cpu',
|
226
|
+
':entropy',
|
227
|
+
':errors',
|
228
|
+
':mem',
|
229
|
+
':pool',
|
230
|
+
':threading',
|
231
|
+
':xxhash',
|
232
|
+
':zstd_common',
|
233
|
+
]
|
234
|
+
)
|