From 301ece3578a8b1aa61c596422014c261116b5d17 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sun, 17 Apr 2022 17:20:34 +0200 Subject: [PATCH] Problem: out of date with zproject Solution: regenerate --- .github/workflows/CI.yaml | 93 +++++++++++++++++++ .obs/workflows.yml | 28 ++++++ ci_build.sh | 9 +- packaging/debian/control | 1 - .../debian/{glar150.dsc.obs => glar150.dsc} | 1 - packaging/debian/rules | 2 - packaging/obs/_service | 44 ++++----- project.xml | 1 + src/Makemodule.am | 4 + 9 files changed, 151 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/CI.yaml create mode 100644 .obs/workflows.yml rename packaging/debian/{glar150.dsc.obs => glar150.dsc} (95%) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml new file mode 100644 index 0000000..e61c672 --- /dev/null +++ b/.github/workflows/CI.yaml @@ -0,0 +1,93 @@ +# Github Actions CI script +# This is a skeleton created by zproject. +# You can add hand-written code here. + +name: CI +on: + push: + pull_request: + + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + BUILD_TYPE: default + DRAFT: enabled + CLANG_FORMAT: clang-format-11 + PACKAGES: automake autoconf clang-format-11 git libzmq3-dev libczmq-dev libzyre-dev asciidoc xmlto + - os: ubuntu-latest + BUILD_TYPE: default + DRAFT: disabled + CLANG_FORMAT: clang-format-11 + PACKAGES: automake autoconf clang-format-11 git libzmq3-dev libczmq-dev libzyre-dev + - os: ubuntu-latest + BUILD_TYPE: valgrind + DRAFT: enabled + PACKAGES: automake autoconf valgrind git libzmq3-dev libczmq-dev libzyre-dev + - os: ubuntu-latest + BUILD_TYPE: cmake + DRAFT: enabled + PACKAGES: cmake git libzmq3-dev libczmq-dev libzyre-dev + - os: macos-latest + BUILD_TYPE: default + PACKAGES: automake autoconf zeromq + DRAFT: enabled + - os: macos-latest + BUILD_TYPE: default + DRAFT: disabled + PACKAGES: automake autoconf zeromq +# For non-cmake users, there is an autotools solution with a bit more overhead +# to have dependencies ready and pass configure script before making this check). +# Note that the autotools variant will also require dependencies preinstalled to +# pass its configure script: + - os: ubuntu-latest + BUILD_TYPE: cmake + DO_CLANG_FORMAT_CHECK: 1 + CLANG_FORMAT: clang-format-11 + PACKAGES: cmake clang-format-11 git libzmq3-dev libczmq-dev libzyre-dev + env: +# Set CI_TIME: true to enable build-step profiling +# Set CI_TRACE: true to enable shell script tracing +# Set CI_CONFIG_QUIET: true to enable "configure --quiet" (only report stderr) +# Set CI_REQUIRE_GOOD_GITIGNORE: false to NOT fail if "git status -s" is not clean +# Set CI_REQUIRE_GOOD_CLANG_FORMAT: true to fail if "clang-format" check is not clean + CI_TIME: false + CI_TRACE: false + CI_CONFIG_QUIET: true + CI_REQUIRE_GOOD_GITIGNORE: false + CI_REQUIRE_GOOD_CLANG_FORMAT: false + CI_TEST_DISTCHECK: true + platform: ${{ matrix.platform }} + configuration: ${{ matrix.configuration }} + ENABLE_DRAFTS: ${{ matrix.ENABLE_DRAFTS }} + BUILD_TYPE: ${{ matrix.BUILD_TYPE }} + DRAFT: ${{ matrix.DRAFT }} + DO_CLANG_FORMAT_CHECK: ${{ matrix.DO_CLANG_FORMAT_CHECK }} + CLANG_FORMAT: ${{ matrix.CLANG_FORMAT }} + CI_SELFTEST: ${{ matrix.CI_SELFTEST }} + steps: + - name: Add debian packages + if: matrix.os == 'ubuntu-latest' + uses: myci-actions/add-deb-repo@10 + with: + repo-name: obs + repo: deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_20.04/ ./ + keys-asc: https://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_20.04/Release.key + install: ${{ matrix.PACKAGES }} + - name: Add brew packages + if: matrix.os == 'macos-latest' + shell: bash + run: brew install ${{ matrix.PACKAGES }} + - uses: actions/checkout@v2 + with: + path: glar150 + - name: build + if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' + shell: bash + working-directory: glar150 + run: ./ci_build.sh diff --git a/.obs/workflows.yml b/.obs/workflows.yml new file mode 100644 index 0000000..c0e0bfb --- /dev/null +++ b/.obs/workflows.yml @@ -0,0 +1,28 @@ +pull_request: + steps: + - branch_package: + source_project: network:messaging:zeromq:git-draft + source_package: glar150 + target_project: network:messaging:zeromq:ci + filters: + event: pull_request +merge: + steps: + - trigger_services: + project: network:messaging:zeromq:git-stable + package: glar150 + filters: + event: push + branches: + only: + - master +release: + steps: + - trigger_services: + project: network:messaging:zeromq:release-stable + package: glar150 + - trigger_services: + project: network:messaging:zeromq:release-draft + package: glar150 + filters: + event: tag_push diff --git a/ci_build.sh b/ci_build.sh index 98ef210..8568c1f 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -49,7 +49,7 @@ fold_end() { case $TRAVIS_OS_NAME in windows) export - choco install openjdk + choco install openjdk13 export JAVA_HOME="C:\Program Files\OpenJDK\jdk-13.0.2" export BUILD_PREFIX=$TEMP/ci_build # Build will fail if processes are still running at the end of the script. @@ -217,6 +217,11 @@ default|default-Werror|default-with-docs|valgrind|clang-format-check) if [ -z "${CI_CONFIG_QUIET-}" ] || [ "${CI_CONFIG_QUIET-}" = yes ] || [ "${CI_CONFIG_QUIET-}" = true ]; then CONFIG_OPTS+=("--quiet") fi + if [ -z "${CI_SELFTEST-}" ] || [ "${CI_SELFTEST-}" = yes ] || [ "${CI_SELFTEST-}" = true ]; then + CONFIG_OPTS+=("--enable-glar150_selftest") + else + CONFIG_OPTS+=("--disable-glar150_selftest") + fi if [ "$HAVE_CCACHE" = yes ] && [ "${COMPILER_FAMILY}" = GCC ]; then PATH="/usr/lib/ccache:$PATH" @@ -278,7 +283,7 @@ default|default-Werror|default-with-docs|valgrind|clang-format-check) # 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)) \ + (command -v brew >/dev/null 2>&1 && brew ls --versions zeromq >/dev/null 2>&1)) \ ; then echo "" BASE_PWD=${PWD} diff --git a/packaging/debian/control b/packaging/debian/control index df706cd..27274d9 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -19,7 +19,6 @@ Build-Depends: debhelper (>= 9), libczmq-dev, libzyre-dev, systemd, - dh-systemd, asciidoc-base | asciidoc, xmlto, dh-autoreconf diff --git a/packaging/debian/glar150.dsc.obs b/packaging/debian/glar150.dsc similarity index 95% rename from packaging/debian/glar150.dsc.obs rename to packaging/debian/glar150.dsc index 3687bb6..2db562d 100644 --- a/packaging/debian/glar150.dsc.obs +++ b/packaging/debian/glar150.dsc @@ -10,7 +10,6 @@ Build-Depends: debhelper (>= 9), libczmq-dev, libzyre-dev, systemd, - dh-systemd, asciidoc-base | asciidoc, xmlto, dh-autoreconf diff --git a/packaging/debian/rules b/packaging/debian/rules index 9fe864e..aa38278 100755 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -30,8 +30,6 @@ ifneq (,$(findstring nodoc,$(DEB_BUILD_PROFILES))) DOCS=no endif -# Workaround for automake < 1.14 bug -$(shell dpkg --compare-versions `dpkg-query -W -f='$${Version}\n' automake` lt 1:1.14 && mkdir -p config) $(shell test -f src/Makemodule-local.am || touch src/Makemodule-local.am) override_dh_strip: diff --git a/packaging/obs/_service b/packaging/obs/_service index 647727d..f12b6bc 100644 --- a/packaging/obs/_service +++ b/packaging/obs/_service @@ -1,5 +1,5 @@ - + https://github.com/zmqers/glar150 git @@ -11,82 +11,74 @@ .git enable glar150 + packaging/debian/glar150.dsc + packaging/redhat/glar150.spec - - - *.tar - */packaging/redhat/glar150.spec - glar150.spec - + - - *.tar - */packaging/debian/glar150.dsc.obs - glar150.dsc - - + *.tar - */packaging/debian/changelog + */packaging/debian/changelog debian.changelog - + *.tar */packaging/debian/compat debian.compat - + *.tar */packaging/debian/control debian.control - + *.tar */packaging/debian/copyright debian.copyright - + *.tar */packaging/debian/glar150.install debian.glar150.install - + *.tar */packaging/debian/glar150.manpages debian.glar150.manpages - + *.tar */packaging/debian/format debian.format - + *.tar */packaging/debian/libglar0.install debian.libglar0.install - + *.tar */packaging/debian/libglar-dev.install debian.libglar-dev.install - + *.tar */packaging/debian/libglar-dev.manpages debian.libglar-dev.manpages - + *.tar */packaging/debian/rules debian.rules - + glar150 - + *.tar gz diff --git a/project.xml b/project.xml index 8998c81..ab39fb1 100644 --- a/project.xml +++ b/project.xml @@ -15,6 +15,7 @@ + diff --git a/src/Makemodule.am b/src/Makemodule.am index d735535..ea742a4 100644 --- a/src/Makemodule.am +++ b/src/Makemodule.am @@ -84,6 +84,7 @@ code: cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q glar_node.xml cd $(srcdir); gsl -target:- project.xml +if ENABLE_GLAR_SELFTEST # Directories with test fixtures optionally provided by the project, # and with volatile RW data possibly created by a selftest program. # It is up to the project authors to populate the RO directory with @@ -263,6 +264,7 @@ coverage: src/glar_selftest @echo "call make clean && configure --with-gcov to enable code coverage" @exit 1 endif +endif #ENABLE_GLAR_SELFTEST bindings: python-bindings @@ -420,10 +422,12 @@ check-gitignore: echo "SKIP: $@ (no git)"; exit 0 ; \ fi ) +if ENABLE_GLAR_SELFTEST # This calls the recipe above after building the project products and # the selftest binary, and preparing the workspace for self-testing: check-gitignore-all: all src/glar_selftest $(top_builddir)/$(SELFTEST_DIR_RW) $(top_builddir)/$(SELFTEST_DIR_RO) $@$(MAKE) check-gitignore +endif #ENABLE_GLAR_SELFTEST ################################################################################