Skip to content

cmake now produces output identical to configure/make, and CI verifies this.#6

Closed
dankegel wants to merge 25 commits intodevelopfrom
issue497-identical-builds
Closed

cmake now produces output identical to configure/make, and CI verifies this.#6
dankegel wants to merge 25 commits intodevelopfrom
issue497-identical-builds

Conversation

@dankegel
Copy link
Copy Markdown
Owner

Fixes madler#497, at least on Linux, Mac, and FreeBSD.

Also: don't let Make build accidentally include a stale zconf.h. (So also fixes madler#499.)

ProgramMax and others added 24 commits May 17, 2020 13:25
To make it easier to accept contributions to zlib we should establish automated testing.

This commit uses the existing test/example.c testing. It connects those tests to AppVeyor, allowing AppVeyor to mark commits as passing or failing the tests. It also automatically runs tests when a pull request is submitted or updated.

There is some room for future expansion enabled, such as tracking the file and line of a failing test. This is thanks to @dankegel, who also got this working on CI providers other than AppVeyor.
…rrus/github

- pass file and line the way cirrus' junit parser expects
- pass executable name as 'classname' in junit output so executable name shows up in github annotations
- don't output file or line on success, since annotating those on github just adds clutter
CMakeLists.txt: output junit result file for each test executable to ${CMAKE_CURRENT_BINARY_DIRECTORY}.

(Would have liked to output them to the $<CONFIG> subdir on Windows
for multi-config generators like Visual Studio, but
alas, I couldn't coax cmake's generator expressions
into working portably without complicating CMakeLists.txt
beyond reason.  Happily, it's uncommon to run both
Release and Debug build and test in same tree on CI builders.)
…#497

- default build type to Release
- set -DHIDDEN properly
- pass .c files to compiler in same order
- on linux/bsd, link libz.so with -lc explicitly (as Makefile.in does, but why?)
- output same libz.pc and zconf.h as Make
@dankegel dankegel force-pushed the issue497-identical-builds branch 3 times, most recently from 21e6e59 to ec4b989 Compare May 25, 2020 03:22
…and madler#499

Run cmake first and configure/make second, see
issue madler#499 (build breaks due to zconf.h missing)

ci: add fedora, debian; use matrix and a template in .cirrus.yml
@dankegel dankegel force-pushed the issue497-identical-builds branch from 5670645 to 18f9f4d Compare May 26, 2020 02:33
@dankegel dankegel force-pushed the develop branch 2 times, most recently from b9ee2d6 to 0af1b78 Compare May 26, 2020 21:53
@dankegel
Copy link
Copy Markdown
Owner Author

Closing in favor of madler#500

@dankegel dankegel closed this May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants