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 Apr 17, 2022
1 parent 16ec33c commit 301ece3
Show file tree
Hide file tree
Showing 9 changed files with 151 additions and 32 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions .obs/workflows.yml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 7 additions & 2 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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}
Expand Down
1 change: 0 additions & 1 deletion packaging/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Build-Depends: debhelper (>= 9),
libczmq-dev,
libzyre-dev,
systemd,
dh-systemd,
asciidoc-base | asciidoc, xmlto,
dh-autoreconf

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Build-Depends: debhelper (>= 9),
libczmq-dev,
libzyre-dev,
systemd,
dh-systemd,
asciidoc-base | asciidoc, xmlto,
dh-autoreconf

Expand Down
2 changes: 0 additions & 2 deletions packaging/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
44 changes: 18 additions & 26 deletions packaging/obs/_service
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<services>
<service name="tar_scm">
<service name="obs_scm">
<param name="url">https://github.com/zmqers/glar150</param>
<param name="scm">git</param>
<!-- delete to build from latest master on each refresh -->
Expand All @@ -11,82 +11,74 @@
<param name="exclude">.git</param>
<param name="changesgenerate">enable</param>
<param name="filename">glar150</param>
<param name="extract">packaging/debian/glar150.dsc</param>
<param name="extract">packaging/redhat/glar150.spec</param>
</service>

<!-- extract redhat packaging -->
<service name="extract_file">
<param name="archive">*.tar</param>
<param name="files">*/packaging/redhat/glar150.spec</param>
<param name="outfilename">glar150.spec</param>
</service>
<service name="tar" mode="buildtime"/>

<!-- extract debian packaging -->
<service name="extract_file">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/glar150.dsc.obs</param>
<param name="outfilename">glar150.dsc</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/changelog</param>
<param name="files">*/packaging/debian/changelog</param>
<param name="outfilename">debian.changelog</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/compat</param>
<param name="outfilename">debian.compat</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/control</param>
<param name="outfilename">debian.control</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/copyright</param>
<param name="outfilename">debian.copyright</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/glar150.install</param>
<param name="outfilename">debian.glar150.install</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/glar150.manpages</param>
<param name="outfilename">debian.glar150.manpages</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/format</param>
<param name="outfilename">debian.format</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/libglar0.install</param>
<param name="outfilename">debian.libglar0.install</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/libglar-dev.install</param>
<param name="outfilename">debian.libglar-dev.install</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/libglar-dev.manpages</param>
<param name="outfilename">debian.libglar-dev.manpages</param>
</service>
<service name="extract_file">
<service name="extract_file" mode="buildtime">
<param name="archive">*.tar</param>
<param name="files">*/packaging/debian/rules</param>
<param name="outfilename">debian.rules</param>
</service>

<service name="set_version">
<service name="set_version" mode="buildtime">
<param name="basename">glar150</param>
</service>

<service name="recompress">
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">gz</param>
</service>
Expand Down
1 change: 1 addition & 0 deletions project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<target name = "redhat" />
<target name = "obs" />
<target name = "travis" />
<target name = "gh_actions" />

<use project = "zyre" />

Expand Down
4 changes: 4 additions & 0 deletions src/Makemodule.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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


################################################################################
Expand Down

0 comments on commit 301ece3

Please sign in to comment.