Skip to content

Commit

Permalink
Problem: OBS build on sid fails
Browse files Browse the repository at this point in the history
Solution: regen from zproject to change the version format to non-native as a hack,
to match OBS' debstransform usage of 1.0 format
  • Loading branch information
bluca committed Jun 28, 2020
1 parent 4cee39c commit f29469c
Show file tree
Hide file tree
Showing 9 changed files with 211 additions and 69 deletions.
11 changes: 6 additions & 5 deletions CMakeLists.txt
Expand Up @@ -707,6 +707,7 @@ if (NOT TARGET make-selftest-rw)
)
endif()


set_directory_properties(
PROPERTIES
ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_BINARY_DIR}/src/selftest-ro;${PROJECT_BINARY_DIR}/src/selftest-rw"
Expand All @@ -718,11 +719,11 @@ foreach(TEST_CLASS ${TEST_CLASSES})
COMMAND czmq_selftest --continue --verbose --test ${TEST_CLASS}
)
IF (WIN32 AND CMAKE_PREFIX_PATH)
file(TO_NATIVE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH_WIN)
set_tests_properties(
${TEST_CLASS}
PROPERTIES ENVIRONMENT "PATH=%PATH%\;${CMAKE_PREFIX_PATH_WIN}\\bin"
)
file(TO_NATIVE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH_WIN)
set_tests_properties(
${TEST_CLASS}
PROPERTIES ENVIRONMENT "PATH=%PATH%\;${CMAKE_PREFIX_PATH_WIN}\\bin"
)
ENDIF (WIN32 AND CMAKE_PREFIX_PATH)
set_tests_properties(
${TEST_CLASS}
Expand Down
2 changes: 1 addition & 1 deletion builds/abi-compliance-checker/ci_build.sh
Expand Up @@ -28,8 +28,8 @@ function print_abi_api_breakages() {
exit 1
}

git fetch --all --tags
git fetch --unshallow
git fetch --all --tags
LATEST_VERSION=$(git describe --abbrev=0 --tags)

./autogen.sh
Expand Down
10 changes: 6 additions & 4 deletions builds/check_zproject/ci_build.sh
Expand Up @@ -12,16 +12,18 @@ 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
if ! ((command -v dpkg >/dev/null 2>&1 && dpkg -s zproject >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions zproject >/dev/null 2>&1)) \
; then
cd "$REPO_DIR/.."
git clone --quiet --depth 1 https://github.com/zeromq/zproject zproject
cd zproject
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
if ! ((command -v dpkg >/dev/null 2>&1 && dpkg -s 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/.."
git clone https://github.com/zeromq/gsl.git gsl
cd gsl/src
Expand Down
113 changes: 89 additions & 24 deletions builds/cmake/ci_build.sh
Expand Up @@ -10,14 +10,29 @@ case "$CI_TIME" in
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
configure_tracing() {
# 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
}
configure_tracing

fold_start() {
set +x
echo -e "travis_fold:start:$1\033[33;1m$2\033[0m"
configure_tracing
}

fold_end() {
set +x
echo -e "\ntravis_fold:end:$1\r"
configure_tracing
}

LANG=C
LC_ALL=C
Expand Down Expand Up @@ -60,10 +75,13 @@ if [ "$CLANG_FORMAT" != "" ] ; then
CMAKE_OPTS+=("-DCLANG_FORMAT=${CLANG_FORMAT}")
fi

# Clone and build dependencies
# Clone and build dependencies, if not yet installed to Travis env as DEBs
# or MacOS packages; other OSes are not currently supported by Travis cloud
[ -z "$CI_TIME" ] || echo "`date`: Starting build of dependencies (if any)..."
if ! (command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libmicrohttpd-dev >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions libmicrohttpd >/dev/null 2>&1) \
# Start of recipe for dependency: libmicrohttpd
fold_start dependency.libmicrohttpd "Install dependency libmicrohttpd"
if ! ((command -v dpkg >/dev/null 2>&1 && dpkg -s libmicrohttpd-dev >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions libmicrohttpd >/dev/null 2>&1)) \
; then
BASE_PWD=${PWD}
cd tmp-deps
Expand All @@ -86,13 +104,29 @@ if ! (command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libmicrohttpd-d
$CI_TIME autoconf || \
$CI_TIME autoreconf -fiv
fi
$CI_TIME ./configure "${CONFIG_OPTS[@]}"
$CI_TIME make -j4
$CI_TIME make install
if [ -e ./configure ]; then
$CI_TIME ./configure "${CONFIG_OPTS[@]}"
else
mkdir build
cd build
$CI_TIME cmake .. -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_PREFIX_PATH=$BUILD_PREFIX
fi
if [ -e ./configure ]; then
$CI_TIME make -j4
$CI_TIME make install
else
$CI_TIME cmake --build . --config Release --target install
fi
cd "${BASE_PWD}"
CONFIG_OPTS+=("--with-libmicrohttpd=yes")
fi
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
fold_end dependency.libmicrohttpd


# Start of recipe for dependency: libzmq
fold_start dependency.libzmq "Install dependency libzmq"
if ! ((command -v dpkg >/dev/null 2>&1 && dpkg -s libzmq3-dev >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions libzmq >/dev/null 2>&1)); then
BASE_PWD=${PWD}
cd tmp-deps
$CI_TIME git clone --quiet --depth 1 https://github.com/zeromq/libzmq.git libzmq
Expand All @@ -114,13 +148,27 @@ if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libzmq3-dev >/
$CI_TIME autoconf || \
$CI_TIME autoreconf -fiv
fi
$CI_TIME ./configure "${CONFIG_OPTS[@]}"
$CI_TIME make -j4
$CI_TIME make install
if [ -e ./configure ]; then
$CI_TIME ./configure "${CONFIG_OPTS[@]}"
else
mkdir build
cd build
$CI_TIME cmake .. -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_PREFIX_PATH=$BUILD_PREFIX
fi
if [ -e ./configure ]; then
$CI_TIME make -j4
$CI_TIME make install
else
$CI_TIME cmake --build . --config Release --target install
fi
cd "${BASE_PWD}"
fi
if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libcurl4-nss-dev >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions libcurl >/dev/null 2>&1)); then
fold_end dependency.libzmq

# Start of recipe for dependency: libcurl
fold_start dependency.libcurl "Install dependency libcurl"
if ! ((command -v dpkg >/dev/null 2>&1 && dpkg -s libcurl4-nss-dev >/dev/null 2>&1) || \
(command -v brew >/dev/null 2>&1 && brew ls --versions libcurl >/dev/null 2>&1)); then
BASE_PWD=${PWD}
cd tmp-deps
$CI_TIME git clone --quiet --depth 1 https://github.com/curl/curl.git libcurl
Expand All @@ -142,25 +190,41 @@ if ! ((command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list libcurl4-nss-d
$CI_TIME autoconf || \
$CI_TIME autoreconf -fiv
fi
$CI_TIME ./configure "${CONFIG_OPTS[@]}"
$CI_TIME make -j4
$CI_TIME make install
if [ -e ./configure ]; then
$CI_TIME ./configure "${CONFIG_OPTS[@]}"
else
mkdir build
cd build
$CI_TIME cmake .. -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_PREFIX_PATH=$BUILD_PREFIX
fi
if [ -e ./configure ]; then
$CI_TIME make -j4
$CI_TIME make install
else
$CI_TIME cmake --build . --config Release --target install
fi
cd "${BASE_PWD}"
CONFIG_OPTS+=("--with-libcurl=yes")
fi
fold_end dependency.libcurl


cd ../..

# always install custom builds from dist if the autotools chain exists
# to make sure that `make dist` doesn't omit any files required to build & test
if [ -z "$DO_CLANG_FORMAT_CHECK" -a -f configure.ac ]; then
fold_start check.clang_format_check "Do clang format check"
$CI_TIME ./autogen.sh
$CI_TIME ./configure "${CONFIG_OPTS[@]}"
$CI_TIME make -j5 dist-gzip
$CI_TIME tar -xzf czmq-4.2.1.tar.gz
cd czmq-4.2.1
fold_end check.clang_format_check
fi

# Build and check this project
fold_start build.project "Build and check this project"
[ -z "$CI_TIME" ] || echo "`date`: Starting build of currently tested project..."
CCACHE_BASEDIR=${PWD}
export CCACHE_BASEDIR
Expand All @@ -178,3 +242,4 @@ fi
echo "=== Are GitIgnores good after making the project '$BUILD_TYPE'? (should have no output below)"
git status -s || true
echo "==="
fold_end build.project

0 comments on commit f29469c

Please sign in to comment.