Browse Source

add travis yml

master
Alexandros Theodotou 3 years ago
parent
commit
0305b4695b
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 86
      .travis.yml
  2. 6
      plugins/lfo/dsp.c
  3. 4
      plugins/lfo/ui.c
  4. 12
      plugins/manifest_gen.scm
  5. 2
      subprojects/ztoolkit.wrap

86
.travis.yml

@ -0,0 +1,86 @@ @@ -0,0 +1,86 @@
# Copyright (C) 2020 Alexandros Theodotou <alex at zrythm dot org>
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
language: c
os:
- windows
- osx
- linux
dist: bionic
before_install:
- |-
set -e
case $TRAVIS_OS_NAME in
windows)
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
choco uninstall -y mingw
choco upgrade --no-progress -y msys2
export msys2='cmd //C RefreshEnv.cmd '
export msys2+='& set MSYS=winsymlinks:nativestrict '
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
export mingw64="$msys2 -mingw64 -full-path -here -c \$\* --"
export msys2+=" -msys2 -c \$\* --"
$msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-librsvg mingw-w64-x86_64-meson mingw-w64-x86_64-libsndfile mingw-w64-x86_64-guile
## Install more MSYS2 packages from https://packages.msys2.org/base here
taskkill //IM gpg-agent.exe //F || true # https://travis-ci.community/t/4967
export PATH=/C/tools/msys64/mingw64/bin:$PATH
export MAKE=mingw32-make # so that Autotools can find it
;;
osx)
brew update
# use || true because it returns 1
brew install meson libsndfile librsvg guile || true
brew link --overwrite python
;;
linux)
sudo apt-get install -y librsvg2-dev libjack-dev libsndfile1-dev ninja-build python3 git lcov guile-2.0
git clone https://github.com/mesonbuild/meson /tmp/meson
pip install --user gcovr cpp-coveralls
;;
esac
before_cache:
- |-
set -e
case $TRAVIS_OS_NAME in
windows)
# https://unix.stackexchange.com/a/137322/107554
$msys2 pacman --sync --clean --noconfirm
;;
esac
cache:
directories:
- $HOME/AppData/Local/Temp/chocolatey
- /C/tools/msys64
script:
- |-
set -e
case $TRAVIS_OS_NAME in
osx)
cd ext/Soundpipe && make && cd ../..
meson build
ninja -C build
ninja -C build test
;;
windows)
cd ext/Soundpipe && make && cd ../..
$mingw64 meson build
$mingw64 ninja -C build
$mingw64 ninja -C build test
;;
linux)
cd ext/Soundpipe && CC=gcc make && cd ../..
/tmp/meson/meson.py build -Db_coverage=true
ninja -C build
ninja -C build test
ninja -C build coverage-text
coveralls -e ext -e subprojects -b build --gcov-options '\-lp'
;;
esac

6
plugins/lfo/dsp.c

@ -447,6 +447,12 @@ run ( @@ -447,6 +447,12 @@ run (
LFO * self = (LFO *) instance;
PluginCommon * pl_common = &self->common.pl_common;
#ifdef TRIAL_VER
if (get_time_since_instantiation (
&self->common.pl_common) > SECONDS_TO_SILENCE)
return;
#endif
int xport_changed = 0;
/* read incoming events from host and UI */

4
plugins/lfo/ui.c

@ -51,8 +51,6 @@ @@ -51,8 +51,6 @@
#include <ztoolkit/ztk.h>
#define TITLE "ZLFO"
/** Width and height of the window. */
#define WIDTH 480
#define HEIGHT 261
@ -2503,7 +2501,7 @@ create_ui ( @@ -2503,7 +2501,7 @@ create_ui (
self->resize->handle, WIDTH, HEIGHT);
self->app = ztk_app_new (
TITLE, self->parent_window,
PLUGIN_NAME, self->parent_window,
WIDTH, HEIGHT);
/* init the theme */

12
plugins/manifest_gen.scm

@ -45,7 +45,7 @@ Args: @@ -45,7 +45,7 @@ Args:
(define (main . args)
;; verify number of args
(if (not (eq? (length args) 13))
(when (not (eq? (length args) 13))
((display "Need 12 arguments")
(newline)
(exit -1)))
@ -95,7 +95,7 @@ Collection of LV2 plugins to be bundled with Zrythm @@ -95,7 +95,7 @@ Collection of LV2 plugins to be bundled with Zrythm
lv2:~a ;
lv2:binary <~a> ;
" plugin-uri plugin-type dsp-binary)
(if (arg-exists ui-uri)
(when (arg-exists ui-uri)
(format #t " ui:ui <~a> ;\n"
ui-uri))
(format #t " lv2:minorVersion ~a;
@ -105,7 +105,7 @@ Collection of LV2 plugins to be bundled with Zrythm @@ -105,7 +105,7 @@ Collection of LV2 plugins to be bundled with Zrythm
" minor-ver micro-ver plugin-ttl)
;; print UI URI
(if (arg-exists ui-uri)
(when (arg-exists ui-uri)
(format #t "<~a>
a ui:~a ;
ui:binary <~a> ;
@ -115,13 +115,13 @@ Collection of LV2 plugins to be bundled with Zrythm @@ -115,13 +115,13 @@ Collection of LV2 plugins to be bundled with Zrythm
" ui-uri ui-type ui-binary plugin-ttl))
;; add presets
(if (file-exists? presets-file)
(cons
(when (file-exists? presets-file)
(begin
(newline)
(with-input-from-file presets-file
(lambda ()
(let loop ((x (read-char)))
(if (not (eof-object? x))
(when (not (eof-object? x))
(begin
(display x)
(loop (read-char))))))))))))))

2
subprojects/ztoolkit.wrap

@ -1,3 +1,3 @@ @@ -1,3 +1,3 @@
[wrap-git]
url = https://git.zrythm.org/git/ztoolkit
revision = v0.1.2
revision = 937d89387aa58120a369d19d606b3223aec5cdf8

Loading…
Cancel
Save