Skip to content

Commit

Permalink
Merge pull request #1878 from bluca/newver
Browse files Browse the repository at this point in the history
Problem: want to do a new release
  • Loading branch information
somdoron authored Mar 22, 2018
2 parents e6f9086 + c2e705b commit 1725692
Show file tree
Hide file tree
Showing 7 changed files with 194 additions and 13 deletions.
56 changes: 56 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This is a skeleton created by zproject.
# You can add hand-written code here.

BasedOnStyle: LLVM
IndentWidth: 4
UseTab: Never
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: false
IndentBraces: false

AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: true
BinPackArguments: true
BinPackParameters: false
AlignTrailingComments: true
AllowShortBlocksOnASingleLine: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: InlineOnly
AlwaysBreakTemplateDeclarations: false
ColumnLimit: 80
MaxEmptyLinesToKeep: 2
KeepEmptyLinesAtTheStartOfBlocks: false
ContinuationIndentWidth: 2
PointerAlignment: Right
ReflowComments: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Always
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11

SortIncludes: false

FixNamespaceComments: false
BreakBeforeBinaryOperators: NonAssignment
SpaceAfterTemplateKeyword: true
AlignAfterOpenBracket: Align
AlignOperands: true
BreakConstructorInitializers: AfterColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
SpaceAfterCStyleCast: true
BreakBeforeTernaryOperators: true
72 changes: 72 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,75 @@
CZMQ version 4.1.1 stable, released on 20xx/xx/xx
=================================================

* New DRAFT APIs have been added to the zsys class to get and set
the zsys_interrupted global variable:
- zsys_is_interrupted
- zsys_set_interrupted
The following DRAFT APIs wrap a new libzmq context API (minimum
libzmq version with DRAFTs enabled required: 4.2.4):
- zsys_set_zero_copy_recv
- zsys_zero_copy_recv
See zsys manpage for more info.

* New DRAFT APIs have been added to the zproc class to set and get
the command line arguments string:
- zproc_args
- zproc_set_argsx
The zproc_set_args and zproc_set_env DRAFT APIs have had their
signature changed.
See the zproc manpage for more details.

* Existing DRAFT APIs have been deleted from to the zproc class as they
are redundant and already offered by zsys:
- zproc_log_debug
- zproc_log_info
- zproc_log_notice
- zproc_log_warning
- zproc_log_error
- zproc_set_log_system
- zproc_set_log_sender
- zproc_set_log_ident
- zproc_biface
- zproc_set_biface
- zproc_set_max_sockets
- zproc_set_io_threads
- zproc_run_as
- zproc_daemonize
- zproc_hostname
- zproc_has_curve
- zproc_interrupted
- zproc_czmq_version

* Exising DRAFT APIs to create DRAFT sockets will now return ENOTSUP
instead of EINVAL when libzmq does not support the socket type:
- zsock_new_server
- zsock_new_client
- zsock_new_radio
- zsock_new_dish
- zsock_new_scatter
- zsock_new_gather
- zsock_join
- zsock_leave

* Fixed #1828 - fix build on GNU/Hurd

* Fixed #1829 - fix build on FreeBSD 10.4 and 11.1

* Fixed #1840 - implement basic zproc support for Windows

* Fixed #1847 - fix test segfault when no USER env variable exists

* Fixed #1848 - fix zsock_resolve when using many thousands of sockets

* Fixed #1853 - use SIGTERM on Windows as SIGKILL does not exist

* Fixed #1858 - fix build on MINGGW

* Fixed #1875 - fix build with GCC 8

* Fixed #1876 - fix crash in zsys_shutdown with libzmq 4.2.4 built with
Tweetnacl

CZMQ version 4.1.0 stable, released on 2017/12/31
=================================================

Expand Down
2 changes: 1 addition & 1 deletion builds/cmake/Modules/ClangFormat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ file(GLOB_RECURSE ALL_SOURCE_FILES
${CMAKE_SOURCE_DIR}/perf/*.h ${CMAKE_SOURCE_DIR}/perf/*.hpp
${CMAKE_SOURCE_DIR}/tools/*.c ${CMAKE_SOURCE_DIR}/tools/*.cc ${CMAKE_SOURCE_DIR}/tools/*.cpp
${CMAKE_SOURCE_DIR}/tools/*.h ${CMAKE_SOURCE_DIR}/tools/*.hpp
${CMAKE_SOURCE_DIR}/include/*.h
${CMAKE_SOURCE_DIR}/include/*.h ${CMAKE_SOURCE_DIR}/include/*.hpp
)

if("${CLANG_FORMAT}" STREQUAL "")
Expand Down
4 changes: 4 additions & 0 deletions builds/cmake/ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ fi
mkdir -p tmp
BUILD_PREFIX=$PWD/tmp

# Use tools from prerequisites we might have built
PATH="${BUILD_PREFIX}/sbin:${BUILD_PREFIX}/bin:${PATH}"
export PATH

CONFIG_OPTS=()
CONFIG_OPTS+=("CFLAGS=-I${BUILD_PREFIX}/include")
CONFIG_OPTS+=("CPPFLAGS=-I${BUILD_PREFIX}/include")
Expand Down
26 changes: 17 additions & 9 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ case "$CI_TRACE" in
esac

case "$BUILD_TYPE" in
default|default-Werror|default-with-docs|valgrind)
default|default-Werror|default-with-docs|valgrind|clang-format-check)
LANG=C
LC_ALL=C
export LANG LC_ALL
Expand All @@ -37,9 +37,11 @@ default|default-Werror|default-with-docs|valgrind)
mkdir -p tmp
BUILD_PREFIX=$PWD/tmp

PATH="`echo "$PATH" | sed -e 's,^/usr/lib/ccache/?:,,' -e 's,:/usr/lib/ccache/?:,,' -e 's,:/usr/lib/ccache/?$,,' -e 's,^/usr/lib/ccache/?$,,'2`"
PATH="`echo "$PATH" | sed -e 's,^/usr/lib/ccache/?:,,' -e 's,:/usr/lib/ccache/?:,,' -e 's,:/usr/lib/ccache/?$,,' -e 's,^/usr/lib/ccache/?$,,'`"
CCACHE_PATH="$PATH"
CCACHE_DIR="${HOME}/.ccache"
# Use tools from prerequisites we might have built
PATH="${BUILD_PREFIX}/sbin:${BUILD_PREFIX}/bin:${PATH}"
export CCACHE_PATH CCACHE_DIR PATH
HAVE_CCACHE=no
if which ccache && ls -la /usr/lib/ccache ; then
Expand Down Expand Up @@ -259,13 +261,19 @@ default|default-Werror|default-with-docs|valgrind)
CONFIG_OPTS+=("${CONFIG_OPT_WERROR}")
$CI_TIME ./autogen.sh 2> /dev/null
$CI_TIME ./configure --enable-drafts=yes "${CONFIG_OPTS[@]}"
if [ "$BUILD_TYPE" == "valgrind" ] ; then
# Build and check this project
$CI_TIME make VERBOSE=1 memcheck && exit
echo "Re-running failed ($?) memcheck with greater verbosity" >&2
$CI_TIME make VERBOSE=1 memcheck-verbose
exit $?
fi
case "$BUILD_TYPE" in
valgrind)
# Build and check this project
$CI_TIME make VERBOSE=1 memcheck && exit
echo "Re-running failed ($?) memcheck with greater verbosity" >&2
$CI_TIME make VERBOSE=1 memcheck-verbose
exit $?
;;
clang-format-check)
$CI_TIME make VERBOSE=1 clang-format-check-CI
exit $?
;;
esac
$CI_TIME make VERBOSE=1 all

echo "=== Are GitIgnores good after 'make all' with drafts?"
Expand Down
10 changes: 7 additions & 3 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ SUFFIXES=.txt .adoc .xml .xml7 .1 .3 .7
asciidoc -d manpage -b docbook -f $(srcdir)/asciidoc.conf \
-aczmq_version=@PACKAGE_VERSION@ -o$@ $<
.xml.1:
xmlto man $<
xmlto -o $(@D) man $<
.xml.3:
xmlto man $<
xmlto -o $(@D) man $<

# Special handling for project overview whose basename may collide
# with a main or class name
.adoc.xml7:
asciidoc -d manpage -b docbook -f $(srcdir)/asciidoc.conf \
-aczmq_version=@PACKAGE_VERSION@ -o$@ $<
.xml7.7:
xmlto man $<
xmlto -o $(@D) man $<

# List of *.txt and *.doc files generated during build from comments
# in project program source files and further processed into manpages.
Expand Down Expand Up @@ -200,8 +200,12 @@ GENERATED_DOCS += zrex.txt zrex.doc
zrex.txt: $(top_srcdir)/src/zrex.c
"$(srcdir)/mkman" "zrex" "$(builddir)/zrex.txt" "$(srcdir)/.."

### Note: for mains, we keep the source name rather than flattened name:c
### so that the manpages for binary programs match their name, at expense
### of perhaps being built in a subdirectory under doc/.
GENERATED_DOCS += zmakecert.txt zmakecert.doc
zmakecert.txt: $(top_srcdir)/src/zmakecert.c
mkdir -p "$(builddir)/$(@D)"
"$(srcdir)/mkman" "zmakecert" "$(builddir)/zmakecert.txt" "$(srcdir)/.."


Expand Down
37 changes: 37 additions & 0 deletions src/Makemodule.am
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,15 @@ ALL_SOURCE_FILES = $(wildcard \
$(top_srcdir)/tools/*.h \
$(top_srcdir)/tools/*.hpp \
$(top_srcdir)/include/*.h \
$(top_srcdir)/include/*.hpp \
)

# Check if any sources need to be fixed, report the filenames and an error code
clang-format-check: $(ALL_SOURCE_FILES)
@if test -z "$(CLANG_FORMAT)" ; then \
echo "FAILURE: CLANG_FORMAT program was not specified or found" >&2 ; \
exit 1 ; \
fi
@FAILED=0 ; IFS=";" ; IDS="`printf '\n\b'`" ; export IFS IDS; \
for FILE in $(ALL_SOURCE_FILES) ; do \
test -s $$FILE || continue ; \
Expand All @@ -355,16 +360,48 @@ clang-format-check: $(ALL_SOURCE_FILES)

# Change source formatting
clang-format: $(ALL_SOURCE_FILES)
@if test -z "$(CLANG_FORMAT)" ; then \
echo "FAILURE: CLANG_FORMAT program was not specified or found" >&2 ; \
exit 1 ; \
fi
$(CLANG_FORMAT) -style=file -i $(ALL_SOURCE_FILES)

# Change source formatting AND report the diff
clang-format-diff: clang-format
git diff $(ALL_SOURCE_FILES)

# A destructive (will change code in workspace) but informative check; this is
# primarily intended for CI temporary workspaces where mutilation is acceptable.
# The envvar/makearg CI_REQUIRE_GOOD_CLANG_FORMAT manages if this test is fatal.
clang-format-check-CI:
@echo "CI-checking code style ..." >&2
@if $(MAKE) clang-format-check ; then \
echo "SUCCESS : Style checks have passed" >&2 ; \
else \
echo "" >&2 ; \
if test -n "$(CLANG_FORMAT)" ; then \
echo "Style mismatches were found by clang-format; detailing below:" >&2 ; \
$(MAKE) VERBOSE=1 clang-format-diff ; \
fi ; \
if test x"$(CI_REQUIRE_GOOD_CLANG_FORMAT)" = xtrue ; then \
echo "FAILED : Style checks have failed and CI_REQUIRE_GOOD_CLANG_FORMAT==true" >&2 ; \
exit 1 ; \
fi ; \
echo "WARNING : Style checks have failed, but the result is not-fatal because CI_REQUIRE_GOOD_CLANG_FORMAT!=true" >&2 ; \
fi

else
clang-format clang-format-check clang-format-diff:
@echo "Install the clang-format program, reconfigure and re-run this request"
@exit 1

clang-format-check-CI:
@echo "Install the clang-format program, reconfigure and re-run this request"
@if test x"$(CI_REQUIRE_GOOD_CLANG_FORMAT)" = xtrue ; then \
echo "FAILED : Style checks have failed and CI_REQUIRE_GOOD_CLANG_FORMAT==true" >&2 ; \
exit 1 ; \
fi ; \
echo "WARNING : Style checks have failed, but the result is not-fatal because CI_REQUIRE_GOOD_CLANG_FORMAT!=true" >&2
endif

# Note: analysis is not a target executed by default, so there is no
Expand Down

0 comments on commit 1725692

Please sign in to comment.