Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
42e0ab1
Add continuous integration (CI)
ProgramMax May 17, 2020
98e8ada
Use const instead of z_const
ProgramMax May 17, 2020
9587041
Use local test_results
ProgramMax May 17, 2020
11e7565
Reuse scope block in RETURN_ON_ERROR_WITH_MESSAGE
ProgramMax May 17, 2020
aefb525
Merge the two macros
ProgramMax May 17, 2020
96fc561
Add RETURN_SUCCESS macro
ProgramMax May 17, 2020
162f125
Add macro usage on NO_GZCOMPRESS
ProgramMax May 17, 2020
65e9ba9
Remove extra scope
ProgramMax May 17, 2020
0608a37
Use better macro names
ProgramMax May 17, 2020
25e5a58
Make function K&R compliant
ProgramMax May 17, 2020
3c2ba52
Fix incorrect output location
ProgramMax May 18, 2020
e96bd6f
Initialized all values, even if unused.
ProgramMax May 18, 2020
f6f7607
test/example.c: allow setting --junit via environment, prepare to add…
dankegel May 18, 2020
41e1023
test/example.c: no longer need to cast argc to void; also update stal…
dankegel May 18, 2020
c05856f
text/example.c: add --fail_fast option, default it to false as Google…
dankegel May 18, 2020
ab62b11
test/example.c: add --force_fail option
dankegel May 18, 2020
aecb63c
test/example.c: Add test_self_verbose
dankegel May 20, 2020
65acd67
test/example.c: refactor handle_test_results. Human output now alway…
dankegel May 18, 2020
f2c2f34
test/example.c: jiggle junit format slightly to be compatible with ci…
dankegel May 19, 2020
70b4ffc
ci: appveyor: use ctest to run tests.
dankegel May 19, 2020
ab78fb5
ci: add cirrus builders for linux, bsd, osx, and windows
dankegel May 18, 2020
2d1f3a8
README.md: add Cirrus CI badge, point badges to temporary demo builders
dankegel May 19, 2020
31649da
ci: force a test failure on both appveyor and cirrus-ci
dankegel May 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
check_ubu1804_task:
container:
dockerfile: tooling/cirrus/ubu1804/Dockerfile
test_script:
- cc --version
- mkdir btmp; cd btmp; cmake -G Ninja .. && ninja && ctest -V
always:
junit_artifacts:
path: "btmp/*-results.xml"
type: text/xml
format: junit

check_ubu2004_task:
container:
dockerfile: tooling/cirrus/ubu2004/Dockerfile
test_script:
- cc --version
- mkdir btmp; cd btmp; cmake -G Ninja .. && ninja && ctest -V
env:
- ZLIBTEST_FORCE_FAIL: 1
always:
junit_artifacts:
path: "btmp/*-results.xml"
type: text/xml
format: junit

check_mac_task:
osx_instance:
image: catalina-xcode
install_script:
- brew install ninja
test_script:
- cc --version
- ninja --version
- mkdir btmp; cd btmp; cmake -G Ninja .. && cmake --build . && ctest -V
always:
junit_artifacts:
path: "btmp/*-results.xml"
type: text/xml
format: junit

check_bsd_task:
freebsd_instance:
image_family: freebsd-12-1
install_script:
- pkg install -y gcc cmake ninja
test_script:
- cc --version
- mkdir btmp; cd btmp; cmake -G Ninja .. && ninja && ctest -V
always:
junit_artifacts:
path: "btmp/*-results.xml"
type: text/xml
format: junit

check_win_task:
windows_container:
image: cirrusci/windowsservercore:cmake
install_script:
- choco install -y --no-progress ninja
test_script:
- cmake --version
- ninja --version
- echo "Setting compiler to MSVC rather than the default (GCC from chocolatey)"
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && where cl && set CC=cl && mkdir btmp && cd btmp && cmake -G Ninja .. && ninja && ctest -V
always:
junit_artifacts:
path: "btmp/*-results.xml"
type: text/xml
format: junit
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ endif()

add_executable(example test/example.c)
target_link_libraries(example zlib)
add_test(example example)
# Note: would like to put it in $<CONFIG> subdir, but generator expressions are not expanded as one would expect?
add_test(example example --junit "${CMAKE_CURRENT_BINARY_DIR}/example-results.xml")

add_executable(minigzip test/minigzip.c)
target_link_libraries(minigzip zlib)
Expand All @@ -241,7 +242,7 @@ if(HAVE_OFF64_T)
add_executable(example64 test/example.c)
target_link_libraries(example64 zlib)
set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
add_test(example64 example64)
add_test(example64 example64 --junit "${CMAKE_CURRENT_BINARY_DIR}/example64-results.xml")

add_executable(minigzip64 test/minigzip.c)
target_link_libraries(minigzip64 zlib)
Expand Down
11 changes: 9 additions & 2 deletions README → README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ZLIB DATA COMPRESSION LIBRARY

[![AppVeyor CI status][appveyor-shield]][appveyor-link][![Cirrus CI status][cirrus-shield]][cirrus-link]

zlib 1.2.11.1 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
Expand Down Expand Up @@ -102,8 +104,7 @@ Copyright notice:
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
Jean-loup Gailly (jloup@gzip.org) & Mark Adler (madler@alumni.caltech.edu)

If you use the zlib library in a product, we would appreciate *not* receiving
lengthy legal documents to sign. The sources are provided for free but without
Expand All @@ -116,3 +117,9 @@ any third parties.
If you redistribute modified sources, we would appreciate that you include in
the file ChangeLog history information documenting your changes. Please read
the FAQ for more information on the distribution of modified source versions.

<!-- fix following four lines when merging -->
[appveyor-shield]: https://ci.appveyor.com/api/projects/status/h80iqyhbe09p29n0/branch/develop?svg=true
[appveyor-link]: https://ci.appveyor.com/project/dankegel/zlib/branch/develop
[cirrus-shield]: https://api.cirrus-ci.com/github/dankegel/zlib.svg?branch=develop
[cirrus-link]: https://cirrus-ci.com/github/dankegel/zlib/develop
Loading