aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2018-05-18 18:29:31 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2018-05-18 18:29:31 +0200
commit5697f8c22d0cd9ebf8e5d3408847cfd69045df2c (patch)
tree1487e38e3ee7b080cef644a2b045b6b64fa0ba04
parentd148bbaa271ff8ad2ad4d128c6270313ef1aa79f (diff)
downloadvarchunk-5697f8c22d0cd9ebf8e5d3408847cfd69045df2c.tar.xz
use gitlab CI provided meson cross scripts.
-rw-r--r--.gitlab-ci.yml5
-rw-r--r--README.md115
-rw-r--r--VERSION2
-rw-r--r--meson/arm-linux-gnueabihf18
-rw-r--r--meson/i686-linux-gnu17
-rw-r--r--meson/i686-w64-mingw3217
-rw-r--r--meson/universal-apple-darwin19
-rw-r--r--meson/x86_64-linux-gnu16
-rw-r--r--meson/x86_64-w64-mingw3217
9 files changed, 64 insertions, 162 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0501fcc..d667a47 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,7 +5,6 @@ stages:
variables:
BASE_NAME: "varchunk"
PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig:/usr/lib/${CI_BUILD_NAME}/pkgconfig"
- TOOLCHAIN_FILE: "${CI_PROJECT_DIR}/meson/${CI_BUILD_NAME}"
.common_template: &common_definition
<<: *variables_definition
@@ -14,13 +13,13 @@ stages:
.build_template: &build_definition
<<: *common_definition
script:
- - meson --prefix=/ --cross-file "${TOOLCHAIN_FILE}" build
+ - meson --cross-file "${CI_BUILD_NAME}" build
- ninja -C build
.test_template: &test_definition
<<: *common_definition
script:
- - meson --prefix=/ --cross-file "${TOOLCHAIN_FILE}" build
+ - meson --cross-file "${CI_BUILD_NAME}" build
- ninja -C build
- ninja -C build test
diff --git a/README.md b/README.md
index f780e68..d587a9a 100644
--- a/README.md
+++ b/README.md
@@ -13,79 +13,86 @@
### Build Status
-[![Build Status](https://travis-ci.org/OpenMusicKontrollers/varchunk.svg)](https://travis-ci.org/OpenMusicKontrollers/varchunk)
+[![build status](https://gitlab.com/OpenMusicKontrollers/varchunk/badges/master/build.svg)](https://gitlab.com/OpenMusicKontrollers/varchunk/commits/master)
-### Usage
+### Build / test
+
+ git clone https://git.open-music-kontrollers.ch/lad/varchunk
+ cd varchunk
+ meson build
+ cd build
+ ninja -j4
+ ninja test
-``` c
-#include <pthread.h>
-#include <varchunk.h>
+### Usage
-static void *
-producer_main(void *arg)
-{
- varchunk_t *varchunk = arg;
- void *ptr;
- const size_t towrite = sizeof(uint32_t);
- uint32_t counter = 0;
+ #include <pthread.h>
+ #include <varchunk.h>
- while(counter <= 1000000)
+ static void *
+ producer_main(void *arg)
{
- if( (ptr = varchunk_write_request(varchunk, towrite)) )
+ varchunk_t *varchunk = arg;
+ void *ptr;
+ const size_t towrite = sizeof(uint32_t);
+ uint32_t counter = 0;
+
+ while(counter <= 1000000)
{
- // write 'towrite' bytes to 'ptr'
- *(uint32_t *)ptr = counter++;
- varchunk_write_advance(varchunk, towrite);
+ if( (ptr = varchunk_write_request(varchunk, towrite)) )
+ {
+ // write 'towrite' bytes to 'ptr'
+ *(uint32_t *)ptr = counter++;
+ varchunk_write_advance(varchunk, towrite);
+ }
}
- }
-
- return NULL;
-}
-static void *
-consumer_main(void *arg)
-{
- varchunk_t *varchunk = arg;
- const void *ptr;
- size_t toread;
+ return NULL;
+ }
- while(1)
+ static void *
+ consumer_main(void *arg)
{
- if( (ptr = varchunk_read_request(varchunk, &toread)) )
+ varchunk_t *varchunk = arg;
+ const void *ptr;
+ size_t toread;
+
+ while(1)
{
- // read 'toread' bytes from 'ptr'
- if(*(uint32_t *)ptr >= 1000000)
- break;
- varchunk_read_advance(varchunk);
+ if( (ptr = varchunk_read_request(varchunk, &toread)) )
+ {
+ // read 'toread' bytes from 'ptr'
+ if(*(uint32_t *)ptr >= 1000000)
+ break;
+ varchunk_read_advance(varchunk);
+ }
}
- }
- return NULL;
-}
+ return NULL;
+ }
-int
-main(int argc, char **argv)
-{
- if(!varchunk_is_lock_free())
- return -1;
+ int
+ main(int argc, char **argv)
+ {
+ if(!varchunk_is_lock_free())
+ return -1;
- pthread_t producer;
- pthread_t consumer;
- varchunk_t *varchunk = varchunk_new(8192, true);
- if(!varchunk)
- return -1;
+ pthread_t producer;
+ pthread_t consumer;
+ varchunk_t *varchunk = varchunk_new(8192, true);
+ if(!varchunk)
+ return -1;
- pthread_create(&consumer, NULL, consumer_main, varchunk);
- pthread_create(&producer, NULL, producer_main, varchunk);
+ pthread_create(&consumer, NULL, consumer_main, varchunk);
+ pthread_create(&producer, NULL, producer_main, varchunk);
- pthread_join(producer, NULL);
- pthread_join(consumer, NULL);
+ pthread_join(producer, NULL);
+ pthread_join(consumer, NULL);
- varchunk_free(varchunk);
+ varchunk_free(varchunk);
- return 0;
-}
-```
+ return 0;
+ }
### License
diff --git a/VERSION b/VERSION
index 9506d14..09d8256 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.47
+0.1.59
diff --git a/meson/arm-linux-gnueabihf b/meson/arm-linux-gnueabihf
deleted file mode 100644
index 6d0ea7b..0000000
--- a/meson/arm-linux-gnueabihf
+++ /dev/null
@@ -1,18 +0,0 @@
-[host_machine]
-system = 'linux'
-cpu_family = 'arm'
-cpu = 'armv7hl'
-endian = 'little'
-
-[binaries]
-c = '/usr/bin/arm-linux-gnueabihf-gcc'
-cpp = '/usr/bin/arm-linux-gnueabihf-cpp'
-ar = '/usr/bin/arm-linux-gnueabihf-ar'
-strip = '/usr/bin/arm-linux-gnueabihf-strip'
-pkgconfig = '/usr/bin/pkg-config'
-exe_wrapper = '/usr/bin/qemu-arm'
-
-[properties]
-root = '/usr/arm-linux-gnueabihf'
-c_link_args = ['-Wl,-z,defs']
-needs_exe_wrapper = true
diff --git a/meson/i686-linux-gnu b/meson/i686-linux-gnu
deleted file mode 100644
index ff653c6..0000000
--- a/meson/i686-linux-gnu
+++ /dev/null
@@ -1,17 +0,0 @@
-[host_machine]
-system = 'linux'
-cpu_family = 'x86'
-cpu = 'i686'
-endian = 'little'
-
-[binaries]
-c = '/usr/bin/x86_64-linux-gnu-gcc'
-cpp = '/usr/bin/x86_64-linux-gnu-g++'
-ar = '/usr/bin/x86_64-linux-gnu-ar'
-strip = '/usr/bin/x86_64-linux-gnu-strip'
-pkgconfig = '/usr/bin/pkg-config'
-
-[properties]
-c_args = ['-m32']
-c_link_args = ['-m32', '-Wl,-z,defs']
-needs_exe_wrapper = false
diff --git a/meson/i686-w64-mingw32 b/meson/i686-w64-mingw32
deleted file mode 100644
index 3cb44ac..0000000
--- a/meson/i686-w64-mingw32
+++ /dev/null
@@ -1,17 +0,0 @@
-[host_machine]
-system = 'windows'
-cpu_family = 'i686'
-cpu = 'i686'
-endian = 'little'
-
-[binaries]
-c = '/usr/bin/i686-w64-mingw32-gcc'
-cpp = '/usr/bin/i686-w64-mingw32-c++'
-ar = '/usr/bin/i686-w64-mingw32-ar'
-strip = '/usr/bin/i686-w64-mingw32-strip'
-pkgconfig = '/usr/bin/pkg-config'
-exe_wrapper = '/usr/bin/wine'
-
-[properties]
-root = '/usr/i686-w64-mingw32'
-needs_exe_wrapper = true
diff --git a/meson/universal-apple-darwin b/meson/universal-apple-darwin
deleted file mode 100644
index 0ee2e02..0000000
--- a/meson/universal-apple-darwin
+++ /dev/null
@@ -1,19 +0,0 @@
-[host_machine]
-system = 'darwin'
-cpu_family = 'x86_64'
-cpu = 'x86_64'
-endian = 'little'
-
-[binaries]
-c = '/usr/universal-apple-darwin/bin/x86_64-apple-darwin15-clang'
-cpp = '/usr/universal-apple-darwin/bin/x86_64-apple-darwin15-clang++'
-objc = '/usr/universal-apple-darwin/bin/x86_64-apple-darwin15-clang'
-ar = '/usr/universal-apple-darwin/bin/x86_64-apple-darwin15-ar'
-strip = '/usr/universal-apple-darwin/bin/x86_64-apple-darwin15-strip'
-pkgconfig = '/usr/bin/pkg-config'
-
-[properties]
-root = '/usr/universal-apple-darwin/SDK/MacOSX10.11.sdk'
-c_args = ['-arch', 'i386', '-arch', 'x86_64']
-c_link_args = ['-arch', 'i386', '-arch', 'x86_64']
-needs_exe_wrapper = true
diff --git a/meson/x86_64-linux-gnu b/meson/x86_64-linux-gnu
deleted file mode 100644
index b09321c..0000000
--- a/meson/x86_64-linux-gnu
+++ /dev/null
@@ -1,16 +0,0 @@
-[host_machine]
-system = 'linux'
-cpu_family = 'x86_64'
-cpu = 'x86_64'
-endian = 'little'
-
-[binaries]
-c = '/usr/bin/x86_64-linux-gnu-gcc'
-cpp = '/usr/bin/x86_64-linux-gnu-g++'
-ar = '/usr/bin/x86_64-linux-gnu-ar'
-strip = '/usr/bin/x86_64-linux-gnu-strip'
-pkgconfig = '/usr/bin/pkg-config'
-
-[properties]
-c_link_args = ['-Wl,-z,defs']
-needs_exe_wrapper = false
diff --git a/meson/x86_64-w64-mingw32 b/meson/x86_64-w64-mingw32
deleted file mode 100644
index 77dd3a5..0000000
--- a/meson/x86_64-w64-mingw32
+++ /dev/null
@@ -1,17 +0,0 @@
-[host_machine]
-system = 'windows'
-cpu_family = 'x86_64'
-cpu = 'x86_64'
-endian = 'little'
-
-[binaries]
-c = '/usr/bin/x86_64-w64-mingw32-gcc'
-cpp = '/usr/bin/x86_64-w64-mingw32-c++'
-ar = '/usr/bin/x86_64-w64-mingw32-ar'
-strip = '/usr/bin/x86_64-w64-mingw32-strip'
-pkgconfig = '/usr/bin/pkg-config'
-exe_wrapper = '/usr/bin/wine64'
-
-[properties]
-root = '/usr/x86_64-w64-mingw32'
-needs_exe_wrapper = true