Skip to content

Commit

Permalink
Problem: out of date with zproject
Browse files Browse the repository at this point in the history
Solution: regenerate
  • Loading branch information
bluca committed Jan 8, 2017
1 parent 2a5f8aa commit 26d646c
Show file tree
Hide file tree
Showing 22 changed files with 416 additions and 155 deletions.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ IF (ENABLE_DRAFTS)
)
ENDIF (ENABLE_DRAFTS)

IF (ENABLE_DRAFTS)
list (APPEND czmq_sources
src/czmq_private_selftest.c
)
ENDIF (ENABLE_DRAFTS)

source_group("Source Files" FILES ${czmq_sources})
if (NOT DEFINED BUILD_SHARED_LIBS)
SET(BUILD_SHARED_LIBS ON)
Expand Down Expand Up @@ -297,6 +303,9 @@ set_target_properties(
zmakecert
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${SOURCE_DIR}/src"
)
install(TARGETS zmakecert
RUNTIME DESTINATION bin
)
add_executable(
czmq_selftest
"${SOURCE_DIR}/src/czmq_selftest.c"
Expand Down Expand Up @@ -366,6 +375,12 @@ IF (ENABLE_DRAFTS)
)
ENDIF (ENABLE_DRAFTS)

IF (ENABLE_DRAFTS)
list (APPEND TEST_CLASSES
private_classes
)
ENDIF (ENABLE_DRAFTS)

foreach(TEST_CLASS ${TEST_CLASSES})
add_test(
NAME ${TEST_CLASS}
Expand Down
2 changes: 1 addition & 1 deletion bindings/jni/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
plugins {
id 'java'
id 'maven-publish'
id "com.jfrog.bintray" version "1.7.2"
id "com.jfrog.bintray" version "1.7.3"
}

group = "org.zeromq"
Expand Down
64 changes: 43 additions & 21 deletions bindings/jni/ci_build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
#!/usr/bin/env bash

set -x
set -e

# Set this to enable verbose profiling
[ -n "${CI_TIME-}" ] || CI_TIME=""
case "$CI_TIME" in
[Yy][Ee][Ss]|[Oo][Nn]|[Tt][Rr][Uu][Ee])
CI_TIME="time -p " ;;
[Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee])
CI_TIME="" ;;
esac

# Set this to enable verbose tracing
[ -n "${CI_TRACE-}" ] || CI_TRACE="no"
case "$CI_TRACE" in
[Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee])
set +x ;;
[Yy][Ee][Ss]|[Oo][Nn]|[Tt][Rr][Uu][Ee])
set -x ;;
esac

########################################################################
# Build and check the jni binding
########################################################################
Expand All @@ -17,45 +34,50 @@ CONFIG_OPTS+=("LDFLAGS=-L${BUILD_PREFIX}/lib")
CONFIG_OPTS+=("PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig")
CONFIG_OPTS+=("--prefix=${BUILD_PREFIX}")
CONFIG_OPTS+=("--with-docs=no")
CONFIG_OPTS+=("--quiet")
if [ -z "${CI_CONFIG_QUIET-}" ] || [ "${CI_CONFIG_QUIET-}" = yes ] || [ "${CI_CONFIG_QUIET-}" = true ]; then
CONFIG_OPTS+=("--quiet")
fi

pushd ../../..

# Clone and build dependencies
git clone --quiet --depth 1 https://github.com/zeromq/libzmq.git libzmq
[ -z "$CI_TIME" ] || echo "`date`: Starting build of dependencies (if any)..."
$CI_TIME git clone --quiet --depth 1 https://github.com/zeromq/libzmq.git libzmq
cd libzmq
git --no-pager log --oneline -n1
if [ -e autogen.sh ]; then
./autogen.sh 2> /dev/null
$CI_TIME ./autogen.sh 2> /dev/null
fi
if [ -e buildconf ]; then
./buildconf 2> /dev/null
$CI_TIME ./buildconf 2> /dev/null
fi
if [ ! -e autogen.sh ] && [ ! -e buildconf ] && [ ! -e ./configure ] && [ -s ./configure.ac ]; then
libtoolize --copy --force && \
aclocal -I . && \
autoheader && \
automake --add-missing --copy && \
autoconf || \
autoreconf -fiv
$CI_TIME libtoolize --copy --force && \
$CI_TIME aclocal -I . && \
$CI_TIME autoheader && \
$CI_TIME automake --add-missing --copy && \
$CI_TIME autoconf || \
$CI_TIME autoreconf -fiv
fi
./configure "${CONFIG_OPTS[@]}"
make -j4
make install
$CI_TIME ./configure "${CONFIG_OPTS[@]}"
$CI_TIME make -j4
$CI_TIME make install
cd ..

popd
pushd ../..

./autogen.sh 2> /dev/null
./configure "${CONFIG_OPTS[@]}"
make -j4
make install
[ -z "$CI_TIME" ] || echo "`date`: Starting build of currently tested project..."
$CI_TIME ./autogen.sh 2> /dev/null
$CI_TIME ./configure "${CONFIG_OPTS[@]}"
$CI_TIME make -j4
$CI_TIME make install
[ -z "$CI_TIME" ] || echo "`date`: Build completed without fatal errors!"

popd

TERM=dumb PKG_CONFIG_PATH=$BUILD_PREFIX/lib/pkgconfig ./gradlew build jar
TERM=dumb ./gradlew clean
TERM=dumb PKG_CONFIG_PATH=$BUILD_PREFIX/lib/pkgconfig $CI_TIME ./gradlew build jar
TERM=dumb $CI_TIME ./gradlew clean

########################################################################
# Build and check the jni android binding
Expand All @@ -69,6 +91,6 @@ popd

pushd android

TERM=dumb PKG_CONFIG_PATH=$BUILD_PREFIX/lib/pkgconfig ./build.sh
TERM=dumb PKG_CONFIG_PATH=$BUILD_PREFIX/lib/pkgconfig $CI_TIME ./build.sh

popd
28 changes: 23 additions & 5 deletions builds/android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@ cache="/tmp/android_build/${TOOLCHAIN_NAME}"
rm -rf "${cache}"
mkdir -p "${cache}"

# Set this to enable verbose profiling
[ -n "${CI_TIME-}" ] || CI_TIME=""
case "$CI_TIME" in
[Yy][Ee][Ss]|[Oo][Nn]|[Tt][Rr][Uu][Ee])
CI_TIME="time -p " ;;
[Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee])
CI_TIME="" ;;
esac

# Set this to enable verbose tracing
[ -n "${CI_TRACE-}" ] || CI_TRACE="no"
case "$CI_TRACE" in
[Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee])
set +x ;;
[Yy][Ee][Ss]|[Oo][Nn]|[Tt][Rr][Uu][Ee])
set -x ;;
esac

# Check for environment variable to clear the prefix and do a clean build
if [[ $ANDROID_BUILD_CLEAN ]]; then
echo "Doing a clean build (removing previous build and depedencies)..."
Expand All @@ -49,7 +67,7 @@ fi
}

##
# Build czmq from local source
[ -z "$CI_TIME" ] || echo "`date`: Build czmq from local source"

(android_build_verify_so "libczmq.so" "libzmq.so" &> /dev/null) || {
rm -rf "${cache}/czmq"
Expand All @@ -58,10 +76,10 @@ fi

export LIBTOOL_EXTRA_LDFLAGS='-avoid-version'

(cd "${cache}/czmq" && ./autogen.sh 2> /dev/null \
&& ./configure --quiet "${ANDROID_BUILD_OPTS[@]}" --without-docs \
&& make -j 4 \
&& make install) || exit 1
(cd "${cache}/czmq" && $CI_TIME ./autogen.sh 2> /dev/null \
&& $CI_TIME ./configure --quiet "${ANDROID_BUILD_OPTS[@]}" --without-docs \
&& $CI_TIME make -j 4 \
&& $CI_TIME make install) || exit 1
}

##
Expand Down
19 changes: 13 additions & 6 deletions builds/check_zproject/ci_build.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,39 @@
#!/usr/bin/env bash
set -ex

cd $REPO_DIR/..
# NOTE: This script is not standalone, it is included from project root
# ci_build.sh script, which sets some envvars (like REPO_DIR below).
[ -n "${REPO_DIR-}" ] || exit 1

# Verify all required dependencies with repos can be checked out
cd "$REPO_DIR/.."
git clone --quiet --depth 1 https://github.com/zeromq/libzmq.git libzmq
cd -

if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list zproject >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions zproject >/dev/null 2>&1)); then
cd $REPO_DIR/..
cd "$REPO_DIR/.."
git clone --quiet --depth 1 https://github.com/zeromq/zproject zproject
cd zproject
export PATH=$PATH:`pwd`
PATH="`pwd`:$PATH"
fi

if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list generator-scripting-language >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions gsl >/dev/null 2>&1)); then
cd $REPO_DIR/..
cd "$REPO_DIR/.."
git clone https://github.com/imatix/gsl.git gsl
cd gsl/src
make
export PATH=$PATH:`pwd`
PATH="`pwd`:$PATH"
fi
export PATH

# Verify that zproject template is up-to-date with files it can overwrite
# As we will overwrite this script file make sure bash loads the
# next lines into memory before executing
# http://stackoverflow.com/questions/21096478/overwrite-executing-bash-script-files
{
cd $REPO_DIR
cd "$REPO_DIR"
gsl project.xml

# keep an eye on git version used by CI
Expand Down
4 changes: 4 additions & 0 deletions builds/check_zproto/ci_build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env bash
set -ex

# NOTE: This script is not standalone, it is included from project root
# ci_build.sh script, which sets some envvars (like REPO_DIR below).
[ -n "${REPO_DIR-}" ] || exit 1

docker run -e GSL_BUILD_DIR=/code/src -v "$REPO_DIR":/code zeromqorg/zproto -zproject:1 -q sockopts.xml
docker run -e GSL_BUILD_DIR=/code/src -v "$REPO_DIR":/code zeromqorg/zproto -zproject:1 -q zgossip.xml
docker run -e GSL_BUILD_DIR=/code/src -v "$REPO_DIR":/code zeromqorg/zproto -zproject:1 -q zgossip_msg.xml
Expand Down
75 changes: 55 additions & 20 deletions builds/cmake/ci_build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
#!/usr/bin/env bash
set -ex
set -e

mkdir tmp
# Set this to enable verbose profiling
[ -n "${CI_TIME-}" ] || CI_TIME=""
case "$CI_TIME" in
[Yy][Ee][Ss]|[Oo][Nn]|[Tt][Rr][Uu][Ee])
CI_TIME="time -p " ;;
[Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee])
CI_TIME="" ;;
esac

# Set this to enable verbose tracing
[ -n "${CI_TRACE-}" ] || CI_TRACE="no"
case "$CI_TRACE" in
[Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee])
set +x ;;
[Yy][Ee][Ss]|[Oo][Nn]|[Tt][Rr][Uu][Ee])
set -x ;;
esac

LANG=C
LC_ALL=C
export LANG LC_ALL

if [ -d "./tmp" ]; then
rm -rf ./tmp
fi
mkdir -p tmp
BUILD_PREFIX=$PWD/tmp

CONFIG_OPTS=()
Expand All @@ -12,7 +37,9 @@ CONFIG_OPTS+=("LDFLAGS=-L${BUILD_PREFIX}/lib")
CONFIG_OPTS+=("PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig")
CONFIG_OPTS+=("--prefix=${BUILD_PREFIX}")
CONFIG_OPTS+=("--with-docs=no")
CONFIG_OPTS+=("--quiet")
if [ -z "${CI_CONFIG_QUIET-}" ] || [ "${CI_CONFIG_QUIET-}" = yes ] || [ "${CI_CONFIG_QUIET-}" = true ]; then
CONFIG_OPTS+=("--quiet")
fi

CMAKE_OPTS=()
CMAKE_OPTS+=("-DCMAKE_INSTALL_PREFIX:PATH=${BUILD_PREFIX}")
Expand All @@ -21,37 +48,45 @@ CMAKE_OPTS+=("-DCMAKE_LIBRARY_PATH:PATH=${BUILD_PREFIX}/lib")
CMAKE_OPTS+=("-DCMAKE_INCLUDE_PATH:PATH=${BUILD_PREFIX}/include")

# Clone and build dependencies
[ -z "$CI_TIME" ] || echo "`date`: Starting build of dependencies (if any)..."
if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libzmq3-dev >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions libzmq >/dev/null 2>&1)); then
git clone --quiet --depth 1 https://github.com/zeromq/libzmq.git libzmq
$CI_TIME git clone --quiet --depth 1 https://github.com/zeromq/libzmq.git libzmq
BASE_PWD=${PWD}
cd libzmq
CCACHE_BASEDIR=${PWD}
export CCACHE_BASEDIR
git --no-pager log --oneline -n1
if [ -e autogen.sh ]; then
./autogen.sh 2> /dev/null
$CI_TIME ./autogen.sh 2> /dev/null
fi
if [ -e buildconf ]; then
./buildconf 2> /dev/null
$CI_TIME ./buildconf 2> /dev/null
fi
if [ ! -e autogen.sh ] && [ ! -e buildconf ] && [ ! -e ./configure ] && [ -s ./configure.ac ]; then
libtoolize --copy --force && \
aclocal -I . && \
autoheader && \
automake --add-missing --copy && \
autoconf || \
autoreconf -fiv
$CI_TIME libtoolize --copy --force && \
$CI_TIME aclocal -I . && \
$CI_TIME autoheader && \
$CI_TIME automake --add-missing --copy && \
$CI_TIME autoconf || \
$CI_TIME autoreconf -fiv
fi
./configure "${CONFIG_OPTS[@]}"
make -j4
make install
cd ..
$CI_TIME ./configure "${CONFIG_OPTS[@]}"
$CI_TIME make -j4
$CI_TIME make install
cd "${BASE_PWD}"
fi

# Build and check this project
cd ../..
PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig cmake "${CMAKE_OPTS[@]}" .
make all VERBOSE=1 -j4
ctest -V
make install
[ -z "$CI_TIME" ] || echo "`date`: Starting build of currently tested project..."
CCACHE_BASEDIR=${PWD}
export CCACHE_BASEDIR
PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig $CI_TIME cmake "${CMAKE_OPTS[@]}" .
$CI_TIME make all VERBOSE=1 -j4
$CI_TIME ctest -V
$CI_TIME make install
[ -z "$CI_TIME" ] || echo "`date`: Builds completed without fatal errors!"

echo "=== Are GitIgnores good after making the project '$BUILD_TYPE'? (should have no output below)"
git status -s || true
Expand Down
3 changes: 2 additions & 1 deletion builds/cygwin/Makefile.cygwin
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ INCDIR=-I$(PREFIX)/include -I.
LIBDIR=-L$(PREFIX)/lib
CFLAGS=-Wall -Os -g -DCZMQ_EXPORTS $(INCDIR)

OBJS = zactor.o zarmour.o zcert.o zcertstore.o zchunk.o zclock.o zconfig.o zdigest.o zdir.o zdir_patch.o zfile.o zframe.o zhash.o zhashx.o ziflist.o zlist.o zlistx.o zloop.o zmsg.o zpoller.o zproc.o zsock.o zstr.o ztimerset.o ztrie.o zuuid.o zauth.o zbeacon.o zgossip.o zmonitor.o zproxy.o zrex.o zsys.o zgossip_msg.o
OBJS = zactor.o zarmour.o zcert.o zcertstore.o zchunk.o zclock.o zconfig.o zdigest.o zdir.o zdir_patch.o zfile.o zframe.o zhash.o zhashx.o ziflist.o zlist.o zlistx.o zloop.o zmsg.o zpoller.o zproc.o zsock.o zstr.o ztimerset.o ztrie.o zuuid.o zauth.o zbeacon.o zgossip.o zmonitor.o zproxy.o zrex.o zsys.o zgossip_msg.o czmq_private_selftest.o

%.o: ../../src/%.c
$(CC) -c -o $@ $< $(CFLAGS)

Expand Down
1 change: 1 addition & 0 deletions builds/gyp/project.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
'../../src/zsock_option.inc',
'../../include/czmq_library.h',
'../../src/czmq_selftest.c',
'../../src/czmq_private_selftest.c',
'../../src/czmq_classes.h'
],
'dependencies': [
Expand Down
3 changes: 2 additions & 1 deletion builds/mingw32/Makefile.mingw32
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ INCDIR=-I$(PREFIX)/include -I.
LIBDIR=-L$(PREFIX)/lib
CFLAGS=-Wall -Os -g -DCZMQ_EXPORTS $(INCDIR)

OBJS = zactor.o zarmour.o zcert.o zcertstore.o zchunk.o zclock.o zconfig.o zdigest.o zdir.o zdir_patch.o zfile.o zframe.o zhash.o zhashx.o ziflist.o zlist.o zlistx.o zloop.o zmsg.o zpoller.o zproc.o zsock.o zstr.o ztimerset.o ztrie.o zuuid.o zauth.o zbeacon.o zgossip.o zmonitor.o zproxy.o zrex.o zsys.o zgossip_msg.o
OBJS = zactor.o zarmour.o zcert.o zcertstore.o zchunk.o zclock.o zconfig.o zdigest.o zdir.o zdir_patch.o zfile.o zframe.o zhash.o zhashx.o ziflist.o zlist.o zlistx.o zloop.o zmsg.o zpoller.o zproc.o zsock.o zstr.o ztimerset.o ztrie.o zuuid.o zauth.o zbeacon.o zgossip.o zmonitor.o zproxy.o zrex.o zsys.o zgossip_msg.o czmq_private_selftest.o

%.o: ../../src/%.c
$(CC) -c -o $@ $< $(CFLAGS)

Expand Down
Loading

0 comments on commit 26d646c

Please sign in to comment.