~hp/vm.lv2

14614e8915dfc7de6baefd670ef048c25a7b5e73 — builds.sr.ht 1 year, 2 months ago 974ef63 + 478c786
Update timely.lv2 to release-0.2.0
4 files changed, 152 insertions(+), 93 deletions(-)

D subprojects/timely.lv2/.build.yml
A subprojects/timely.lv2/.builds/alpine-latest.yml
M subprojects/timely.lv2/meson.build
M subprojects/timely.lv2/meson_options.txt
D subprojects/timely.lv2/.build.yml => subprojects/timely.lv2/.build.yml +0 -18
@@ 1,18 0,0 @@
# SPDX-FileCopyrightText: Hanspeter Portner <dev@open-music-kontrollers.ch>
# SPDX-License-Identifier: CC0-1.0

image: alpine/latest
packages:
  - reuse
  - meson
  - lv2-dev
tasks:
  - setup: |
      cd timely.lv2
      meson setup build
  - build: |
      cd timely.lv2
      ninja -C build
  - test: |
      cd timely.lv2
      ninja -C build test

A subprojects/timely.lv2/.builds/alpine-latest.yml => subprojects/timely.lv2/.builds/alpine-latest.yml +68 -0
@@ 0,0 1,68 @@
# SPDX-FileCopyrightText: Hanspeter Portner <dev@open-music-kontrollers.ch>
# SPDX-License-Identifier: CC0-1.0

---

image: alpine/latest

packages:
  - clang15-analyzer
  - llvm15
  - reuse
  - meson
  - git-subtree
  - hut
  - jq
  - valgrind

  - lv2-dev

environment:
  project: timely.lv2

secrets:
  - 0545580c-42ac-4700-b322-4e9df924eb07 # runner-ssh
  - 5fe806cd-3af4-4588-9898-8115d9262144 # hut-config
  - d6d10b2a-542a-4b45-b1be-6ef30a8ab558 # git-config

sources:
  - https://git.open-music-kontrollers.ch/~hp/ci

tasks:
  - gcc: |
      . ~/ci/activate

      ci-meson gcc setup
      ci-meson gcc build
      ci-meson gcc test
      ci-meson gcc memcheck

  - clang: |
      . ~/ci/activate

      ci-meson clang setup
      ci-meson clang build
      ci-meson clang test
      ci-meson clang memcheck

  - analyzer: |
      . ~/ci/activate

      ci-meson analyzer setup
      ci-meson analyzer build
      ci-meson analyzer test

  - deploy: |
      . ~/ci/activate

      if ! ci-isrelease; then
        complete-build
      fi

      ci-subtreemerge

triggers:
  - action: email
    condition: failure
    to: "<dev@open-music-kontrollers.ch>"
...

M subprojects/timely.lv2/meson.build => subprojects/timely.lv2/meson.build +77 -73
@@ 2,22 2,16 @@
# SPDX-License-Identifier: CC0-1.0

project('timely.lv2', 'c', default_options : [
	'buildtype=release',
	'warning_level=3',
	'werror=false',
	'b_lto=true',
	'c_std=c11'])

build_tests = get_option('build-tests')
lv2libdir = get_option('lv2libdir')

inst_dir = join_paths(lv2libdir, meson.project_name())

reuse = find_program('reuse', required : false)
cp = find_program('cp')
lv2_validate = find_program('lv2_validate', native : true, required : false)
sord_validate = find_program('sord_validate', native : true, required : false)
lv2lint = find_program('lv2lint', required : false)

add_project_arguments('-D_GNU_SOURCE', language : 'c')

conf_data = configuration_data()


@@ 26,78 20,88 @@ cc = meson.get_compiler('c')
m_dep = cc.find_library('m')
lv2_dep = dependency('lv2', version : '>=1.14.0')

lib_deps = []
lib_deps += m_dep
lib_deps += lv2_dep
lib_deps = [
  m_dep,
  lv2_dep
]

lib_incs = []
lib_incs += include_directories('')
lib_incs = [
  include_directories('')
]

lib_srcs = []
lib_srcs += join_paths('src', 'timely.c')
lib_srcs = [
  join_paths('src', 'timely.c')
]

timely_lv2 = declare_dependency(
  include_directories : lib_incs,
  dependencies : lib_deps,
  sources : lib_srcs)

test_args = []
test_args += '-fvisibility=hidden'
test_args += '-ffast-math'

test_deps = []
test_deps += timely_lv2

test_srcs = []
test_srcs += join_paths('test', 'timely.c')

install = not meson.is_subproject()

mod = shared_module('timely', test_srcs,
	c_args : test_args,
	name_prefix : '',
	dependencies : test_deps,
	install : install,
	install_dir : inst_dir)

version = get_option('version').split('.')
conf_data.set('MAJOR_VERSION', version[0])
conf_data.set('MINOR_VERSION', version[1])
conf_data.set('MICRO_VERSION', version[2])

suffix = mod.full_path().strip().split('.')[-1]
conf_data.set('MODULE_SUFFIX', '.' + suffix)

manifest_ttl = configure_file(
  input : join_paths('test', 'manifest.ttl.in'),
  output : 'manifest.ttl',
	configuration : conf_data,
	install : install,
	install_dir : inst_dir)

dsp_ttl = configure_file(
	input : join_paths('test', 'timely.ttl'),
	output : 'timely.ttl',
	copy : true,
	install : install,
	install_dir : inst_dir)

if lv2_validate.found() and sord_validate.found()
	test('LV2 validate', lv2_validate,
		args : [manifest_ttl, dsp_ttl])
endif

if lv2lint.found()
	test('LV2 lint', lv2lint,
    args : ['-M', 'pack',
      '-E', 'warn',
      '-I', meson.current_build_dir(),
			'http://open-music-kontrollers.ch/lv2/timely#test'])
endif

if reuse.found()
  test('REUSE', reuse, args : [
    '--root', meson.current_source_dir(),
    'lint'
  ])
if build_tests
  reuse = find_program('reuse', required : false)
  lv2_validate = find_program('lv2_validate', native : true, required : false)
  sord_validate = find_program('sord_validate', native : true, required : false)
  lv2lint = find_program('lv2lint', required : false)

  test_args = []
  test_args += '-fvisibility=hidden'
  test_args += '-ffast-math'

  test_deps = []
  test_deps += timely_lv2

  test_srcs = []
  test_srcs += join_paths('test', 'timely.c')

  install = not meson.is_subproject()

  mod = shared_module('timely', test_srcs,
    c_args : test_args,
    name_prefix : '',
    dependencies : test_deps,
    install : install,
    install_dir : inst_dir)

  version = get_option('version').split('.')
  conf_data.set('MAJOR_VERSION', version[0])
  conf_data.set('MINOR_VERSION', version[1])
  conf_data.set('MICRO_VERSION', version[2])

  suffix = mod.full_path().strip().split('.')[-1]
  conf_data.set('MODULE_SUFFIX', '.' + suffix)

  manifest_ttl = configure_file(
    input : join_paths('test', 'manifest.ttl.in'),
    output : 'manifest.ttl',
    configuration : conf_data,
    install : install,
    install_dir : inst_dir)

  dsp_ttl = configure_file(
    input : join_paths('test', 'timely.ttl'),
    output : 'timely.ttl',
    copy : true,
    install : install,
    install_dir : inst_dir)

  if lv2_validate.found() and sord_validate.found()
    test('LV2 validate', lv2_validate,
      args : [manifest_ttl, dsp_ttl])
  endif

  if lv2lint.found()
    test('LV2 lint', lv2lint,
      args : ['-M', 'pack',
        '-E', 'warn',
        '-I', meson.current_build_dir(),
        'http://open-music-kontrollers.ch/lv2/timely#test'])
  endif

  if reuse.found()
    test('REUSE', reuse, args : [
      '--root', meson.current_source_dir(),
      'lint'
    ])
  endif
endif

M subprojects/timely.lv2/meson_options.txt => subprojects/timely.lv2/meson_options.txt +7 -2
@@ 1,8 1,13 @@
# SPDX-FileCopyrightText: Hanspeter Portner <dev@open-music-kontrollers.ch>
# SPDX-License-Identifier: CC0-1.0
#

option('build-tests',
	type : 'boolean',
	value : true,
  yield : true)

option('lv2libdir',
	type : 'string',
	value : 'lib/lv2')

option('version', type : 'string', value : '0.1.97')
option('version', type : 'string', value : '0.2.0')