Skip to content

Commit bcffb04

Browse files
sphaerobluca
authored andcommitted
regen from zproject with new CI.yaml
1 parent f2fd725 commit bcffb04

14 files changed

Lines changed: 112 additions & 67 deletions

File tree

.github/workflows/CI.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,41 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
include:
18-
- os: ubuntu-latest
18+
- os: ubuntu-20.04
1919
BUILD_TYPE: default
2020
DRAFT: enabled
2121
CLANG_FORMAT: clang-format-11
22-
PACKAGES: automake autoconf clang-format-11 git libzmq3-dev libunwind-dev libczmq-dev asciidoc xmlto
23-
- os: ubuntu-latest
22+
PACKAGES: automake autoconf clang-format-11 git libzmq3-dev libczmq-dev asciidoc xmlto
23+
- os: ubuntu-20.04
2424
BUILD_TYPE: default
2525
DRAFT: disabled
2626
CLANG_FORMAT: clang-format-11
27-
PACKAGES: automake autoconf clang-format-11 git libzmq3-dev libunwind-dev libczmq-dev
28-
- os: ubuntu-latest
27+
PACKAGES: automake autoconf clang-format-11 git libzmq3-dev libczmq-dev
28+
- os: ubuntu-20.04
2929
BUILD_TYPE: valgrind
3030
DRAFT: enabled
31-
PACKAGES: automake autoconf valgrind git libzmq3-dev libunwind-dev libczmq-dev
32-
- os: ubuntu-latest
31+
PACKAGES: automake autoconf valgrind git libzmq3-dev libczmq-dev
32+
- os: ubuntu-20.04
3333
BUILD_TYPE: cmake
3434
DRAFT: enabled
35-
PACKAGES: cmake git libzmq3-dev libunwind-dev libczmq-dev
35+
PACKAGES: cmake git libzmq3-dev libczmq-dev
3636
- os: macos-latest
3737
BUILD_TYPE: default
38-
PACKAGES: automake autoconf zeromq
38+
PACKAGES: automake autoconf libtool zeromq
3939
DRAFT: enabled
4040
- os: macos-latest
4141
BUILD_TYPE: default
4242
DRAFT: disabled
43-
PACKAGES: automake autoconf zeromq
43+
PACKAGES: automake autoconf libtool zeromq
4444
# For non-cmake users, there is an autotools solution with a bit more overhead
4545
# to have dependencies ready and pass configure script before making this check).
4646
# Note that the autotools variant will also require dependencies preinstalled to
4747
# pass its configure script:
48-
- os: ubuntu-latest
48+
- os: ubuntu-20.04
4949
BUILD_TYPE: cmake
5050
DO_CLANG_FORMAT_CHECK: 1
5151
CLANG_FORMAT: clang-format-11
52-
PACKAGES: cmake clang-format-11 git libzmq3-dev libunwind-dev libczmq-dev
52+
PACKAGES: cmake clang-format-11 git libzmq3-dev libczmq-dev
5353
env:
5454
# Set CI_TIME: true to enable build-step profiling
5555
# Set CI_TRACE: true to enable shell script tracing
@@ -72,12 +72,12 @@ jobs:
7272
CI_SELFTEST: ${{ matrix.CI_SELFTEST }}
7373
steps:
7474
- name: Add debian packages
75-
if: matrix.os == 'ubuntu-latest'
75+
if: matrix.os == 'ubuntu-20.04'
7676
uses: myci-actions/add-deb-repo@10
7777
with:
7878
repo-name: obs
79-
repo: deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_22.04/ ./
80-
keys-asc: https://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_22.04/Release.key
79+
repo: deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_20.04/ ./
80+
keys-asc: https://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_20.04/Release.key
8181
install: ${{ matrix.PACKAGES }}
8282
- name: Add brew packages
8383
if: matrix.os == 'macos-latest'
@@ -87,7 +87,7 @@ jobs:
8787
with:
8888
path: zyre
8989
- name: build
90-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
90+
if: matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-latest'
9191
shell: bash
9292
working-directory: zyre
9393
run: ./ci_build.sh

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ set(OPTIONAL_LIBRARIES_STATIC)
126126
########################################################################
127127
# LIBZMQ dependency
128128
########################################################################
129-
find_package(libzmq REQUIRED)
129+
IF (NOT libzmq_FOUND)
130+
find_package(libzmq REQUIRED)
131+
ENDIF(NOT libzmq_FOUND)
130132
IF (libzmq_FOUND)
131133
include_directories(${libzmq_INCLUDE_DIRS})
132134
list(APPEND MORE_LIBRARIES ${libzmq_LIBRARIES})
@@ -143,7 +145,9 @@ ENDIF (libzmq_FOUND)
143145
########################################################################
144146
# CZMQ dependency
145147
########################################################################
146-
find_package(czmq REQUIRED)
148+
IF (NOT czmq_FOUND)
149+
find_package(czmq REQUIRED)
150+
ENDIF(NOT czmq_FOUND)
147151
IF (czmq_FOUND)
148152
include_directories(${czmq_INCLUDE_DIRS})
149153
list(APPEND MORE_LIBRARIES ${czmq_LIBRARIES})

bindings/jni/build.gradle

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,24 @@
55
################################################################################
66
*/
77

8+
buildscript {
9+
configurations.configureEach {
10+
resolutionStrategy {
11+
force 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'
12+
}
13+
exclude group: 'xerces', module: 'xercesImpl'
14+
}
15+
}
16+
817
plugins {
918
id 'java'
1019
id 'maven-publish'
11-
id 'com.jfrog.artifactory' version '4.21.0'
20+
id 'com.jfrog.artifactory' version '5.2.3'
1221
id 'com.jfrog.bintray' version '1.8.5'
13-
id 'com.google.osdetector' version '1.7.0'
22+
id 'com.google.osdetector' version '1.7.3'
1423
}
1524

16-
wrapper.gradleVersion = '7.5.1'
25+
wrapper.gradleVersion = '8.9'
1726

1827
subprojects {
1928
apply plugin: 'java'
@@ -47,7 +56,6 @@ artifactory {
4756
repoKey = 'oss-snapshot-local'
4857
username = System.getenv('ARTIFACTORY_USERNAME')
4958
password = System.getenv('ARTIFACTORY_PASSWORD')
50-
maven = true
5159
}
5260
}
5361
}

bindings/jni/zyre-jni-all/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ artifactoryPublish {
4747
publications ('mavenJava')
4848
}
4949

50-
5150
bintray {
5251
user = System.getenv('BINTRAY_USER')
5352
key = System.getenv('BINTRAY_KEY')

bindings/jni/zyre-jni-native/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies {
1313
// ------------------------------------------------------------------
1414
// Build section
1515

16-
task copyLibs(type: Copy) {
16+
tasks.register('copyLibs', Copy) {
1717
def libraryPaths = []
1818
if (project.hasProperty('buildPrefix')) {
1919
if (osdetector.os == 'windows') {
@@ -24,7 +24,7 @@ task copyLibs(type: Copy) {
2424
}
2525

2626
def javaLibraryPaths = System.getProperty('java.library.path').split(File.pathSeparator).toList()
27-
libraryPaths.addAll (javaLibraryPaths)
27+
libraryPaths.addAll(javaLibraryPaths)
2828

2929
libraryPaths.add('/usr/local/lib')
3030
if (osdetector.os == 'windows') {
@@ -54,7 +54,7 @@ task copyLibs(type: Copy) {
5454
duplicatesStrategy = oldStrategy
5555
}
5656

57-
jar.baseName = "zyre-jni-${osdetector.classifier}"
57+
jar.archiveBaseName = "zyre-jni-${osdetector.classifier}"
5858
jar.dependsOn copyLibs
5959

6060
jar {

bindings/jni/zyre-jni/build.gradle

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ ext.hasNotEmptyProperty = { propertyName ->
1212

1313
dependencies {
1414
implementation "org.zeromq.czmq:czmq-jni:$jni_dependencies_version"
15-
implementation 'org.scijava:native-lib-loader:2.4.0'
16-
testImplementation 'junit:junit:4.12'
17-
testImplementation 'org.hamcrest:hamcrest-all:1.3'
15+
implementation 'org.scijava:native-lib-loader:2.5.0'
16+
testImplementation 'junit:junit:4.13.2'
17+
testImplementation 'org.hamcrest:hamcrest:2.2'
1818
}
1919

2020
// ------------------------------------------------------------------
2121
// Build section
2222

23-
task generateJniHeaders(type: Exec, dependsOn: 'classes') {
23+
tasks.register('generateJniHeaders', Exec) {
24+
dependsOn 'classes'
2425
def classpath = sourceSets.main.output.classesDirs
2526
def appclasspath = configurations.runtimeClasspath.files*.getAbsolutePath().join(File.pathSeparator)
2627
def nativeIncludes = 'src/native/include'
@@ -34,14 +35,14 @@ task generateJniHeaders(type: Exec, dependsOn: 'classes') {
3435
commandLine("javac", "-h", "$nativeIncludes", "-classpath", "$classpath${File.pathSeparator}$appclasspath", *jniClasses, *utilityClasses)
3536
}
3637

37-
tasks.withType(Test) {
38+
tasks.withType(Test).configureEach {
3839
def defaultJavaLibraryPath = System.getProperty("java.library.path")
3940
if (osdetector.os == 'windows') {
40-
def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix\\bin;$project.buildPrefix\\lib" : ''
41-
extraJavaLibraryPath = extraJavaLibraryPath.replace("/", "\\")
42-
systemProperty "java.library.path", "${projectDir}\\build\\Release${File.pathSeparator}" +
43-
"${extraJavaLibraryPath}${File.pathSeparator}" +
44-
"${defaultJavaLibraryPath}"
41+
def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix\\bin;$project.buildPrefix\\lib" : ''
42+
extraJavaLibraryPath = extraJavaLibraryPath.replace("/", "\\")
43+
systemProperty "java.library.path", "${projectDir}\\build\\Release${File.pathSeparator}" +
44+
"${extraJavaLibraryPath}${File.pathSeparator}" +
45+
"${defaultJavaLibraryPath}"
4546
} else {
4647
def extraJavaLibraryPath = hasNotEmptyProperty('buildPrefix') ? "$project.buildPrefix/lib" : ''
4748
systemProperty "java.library.path", "${projectDir}/build${File.pathSeparator}" +
@@ -52,22 +53,24 @@ tasks.withType(Test) {
5253
}
5354
}
5455

55-
task initCMake(type: Exec, dependsOn: 'generateJniHeaders') {
56-
workingDir 'build'
56+
tasks.register('initCMake', Exec) {
57+
dependsOn 'generateJniHeaders'
58+
workingDir 'build'
5759
def prefixPath = hasNotEmptyProperty('buildPrefix') ? "-DCMAKE_PREFIX_PATH=$project.buildPrefix" : ''
5860
commandLine 'cmake', "$prefixPath", '..'
5961
}
6062

61-
task buildNative(type: Exec, dependsOn: 'initCMake') {
63+
tasks.register('buildNative', Exec) {
64+
dependsOn 'initCMake'
6265
if (osdetector.os == 'windows') {
6366
commandLine 'cmake',
64-
'--build', 'build',
67+
'--build', 'build',
6568
'--config', 'Release',
6669
'--target', 'zyrejni',
67-
'--', '-verbosity:Minimal', '-maxcpucount'
70+
'--', '-verbosity:Minimal', '-maxcpucount'
6871
} else {
6972
commandLine 'cmake',
70-
'--build', 'build'
73+
'--build', 'build'
7174
}
7275
}
7376

@@ -77,13 +80,15 @@ test.dependsOn buildNative
7780
// ------------------------------------------------------------------
7881
// Install and Publish section
7982

80-
task sourcesJar(type: Jar, dependsOn: 'classes') {
81-
classifier = 'sources'
83+
tasks.register('sourcesJar', Jar) {
84+
dependsOn 'classes'
85+
archiveClassifier = 'sources'
8286
from sourceSets.main.allSource
8387
}
8488

85-
task javadocJar(type: Jar, dependsOn: 'javadoc') {
86-
classifier = 'javadoc'
89+
tasks.register('javadocJar', Jar) {
90+
dependsOn 'javadoc'
91+
archiveClassifier = 'javadoc'
8792
from javadoc.destinationDir
8893
}
8994

@@ -119,7 +124,6 @@ artifactoryPublish {
119124
publications ('mavenJava')
120125
}
121126

122-
123127
bintray {
124128
user = System.getenv('BINTRAY_USER')
125129
key = System.getenv('BINTRAY_KEY')

bindings/python_cffi/zyre_cffi/cdefs.py

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,11 @@
891891
zlist_t *
892892
zdir_list (zdir_t *self);
893893
894+
// Returns a sorted list of char*; Each entry in the list is a path of a file
895+
// or directory contained in self.
896+
zlist_t *
897+
zdir_list_paths (zdir_t *self);
898+
894899
// Remove directory, optionally including all files that it contains, at
895900
// all levels. If force is false, will only remove the directory if empty.
896901
// If force is true, will remove all files and all subdirectories.
@@ -1635,6 +1640,10 @@
16351640
const char *
16361641
ziflist_netmask (ziflist_t *self);
16371642
1643+
// Return the current interface MAC address as a printable string
1644+
const char *
1645+
ziflist_mac (ziflist_t *self);
1646+
16381647
// Return the list of interfaces.
16391648
void
16401649
ziflist_print (ziflist_t *self);
@@ -1694,13 +1703,13 @@
16941703
zlist_item (zlist_t *self);
16951704
16961705
// Append an item to the end of the list, return 0 if OK or -1 if this
1697-
// failed for some reason (out of memory). Note that if a duplicator has
1706+
// failed for some reason (invalid input). Note that if a duplicator has
16981707
// been set, this method will also duplicate the item.
16991708
int
17001709
zlist_append (zlist_t *self, void *item);
17011710
17021711
// Push an item to the start of the list, return 0 if OK or -1 if this
1703-
// failed for some reason (out of memory). Note that if a duplicator has
1712+
// failed for some reason (invalid input). Note that if a duplicator has
17041713
// been set, this method will also duplicate the item.
17051714
int
17061715
zlist_push (zlist_t *self, void *item);
@@ -1791,13 +1800,13 @@
17911800
17921801
// Add an item to the head of the list. Calls the item duplicator, if any,
17931802
// on the item. Resets cursor to list head. Returns an item handle on
1794-
// success, NULL if memory was exhausted.
1803+
// success.
17951804
void *
17961805
zlistx_add_start (zlistx_t *self, void *item);
17971806
17981807
// Add an item to the tail of the list. Calls the item duplicator, if any,
17991808
// on the item. Resets cursor to list head. Returns an item handle on
1800-
// success, NULL if memory was exhausted.
1809+
// success.
18011810
void *
18021811
zlistx_add_end (zlistx_t *self, void *item);
18031812
@@ -1902,8 +1911,7 @@
19021911
// duplicator, if any, on the item. If low_value is true, starts searching
19031912
// from the start of the list, otherwise searches from the end. Use the item
19041913
// comparator, if any, to find where to place the new node. Returns a handle
1905-
// to the new node, or NULL if memory was exhausted. Resets the cursor to the
1906-
// list head.
1914+
// to the new node. Resets the cursor to the list head.
19071915
void *
19081916
zlistx_insert (zlistx_t *self, void *item, bool low_value);
19091917
@@ -2360,19 +2368,19 @@
23602368
23612369
// Connects process stdin with a readable ('>', connect) zeromq socket. If
23622370
// socket argument is NULL, zproc creates own managed pair of inproc
2363-
// sockets. The writable one is then accessbile via zproc_stdin method.
2371+
// sockets. The writable one is then accessible via zproc_stdin method.
23642372
void
23652373
zproc_set_stdin (zproc_t *self, void *socket);
23662374
23672375
// Connects process stdout with a writable ('@', bind) zeromq socket. If
23682376
// socket argument is NULL, zproc creates own managed pair of inproc
2369-
// sockets. The readable one is then accessbile via zproc_stdout method.
2377+
// sockets. The readable one is then accessible via zproc_stdout method.
23702378
void
23712379
zproc_set_stdout (zproc_t *self, void *socket);
23722380
23732381
// Connects process stderr with a writable ('@', bind) zeromq socket. If
23742382
// socket argument is NULL, zproc creates own managed pair of inproc
2375-
// sockets. The readable one is then accessbile via zproc_stderr method.
2383+
// sockets. The readable one is then accessible via zproc_stderr method.
23762384
void
23772385
zproc_set_stderr (zproc_t *self, void *socket);
23782386
@@ -4649,6 +4657,11 @@
46494657
zosc_t *
46504658
zosc_frommem (char *data, size_t size);
46514659
4660+
// Create a new zosc message from a string. This the same syntax as
4661+
// zosc_create but written as a single line string.
4662+
zosc_t *
4663+
zosc_fromstring (const char *oscstring);
4664+
46524665
// Create a new zosc message from the given format and arguments.
46534666
// The format type tags are as follows:
46544667
// i - 32bit integer
@@ -4752,6 +4765,10 @@
47524765
zosc_t *
47534766
zosc_unpack (zframe_t *frame);
47544767
4768+
// Return a string describing the the OSC message. The returned string must be freed by the caller.
4769+
char *
4770+
zosc_dump (zosc_t *self);
4771+
47554772
// Dump OSC message to stdout, for debugging and tracing.
47564773
void
47574774
zosc_print (zosc_t *self);

0 commit comments

Comments
 (0)