From 8d6abbfb3b6ff59e0a34ae8e7421147a991ed262 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 30 Oct 2023 13:39:48 +0100 Subject: [PATCH] Validate built plugins on CI, cleanup Signed-off-by: falkTX --- .github/workflows/build.yml | 12 ++++++ Makefile | 2 +- PawPaw | 2 +- mod-host | 2 +- utils/debug/jackd | 2 + utils/debug/mod-ui | 1 + utils/plugin-builder/validate-plugins.sh | 49 ++++++++++++++++++++++++ utils/run.sh | 1 + 8 files changed, 68 insertions(+), 3 deletions(-) create mode 100755 utils/plugin-builder/validate-plugins.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d92a2a..b1ddbc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,6 +36,10 @@ jobs: make PAWPAW_TARGET=linux-x86_64 # FIXME needs to run twice for now make PAWPAW_TARGET=linux-x86_64 + - name: Validate plugins + if: steps.cache.outputs.cache-hit == 'true' + run: | + ./utils/plugin-builder/validate-plugins.sh - name: Pack if: steps.cache.outputs.cache-hit == 'true' run: | @@ -77,6 +81,10 @@ jobs: make PAWPAW_TARGET=macos-universal-10.15 # FIXME needs to run twice for now make PAWPAW_TARGET=macos-universal-10.15 + - name: Validate plugins + if: steps.cache.outputs.cache-hit == 'true' + run: | + ./utils/plugin-builder/validate-plugins.sh - name: Pack if: steps.cache.outputs.cache-hit == 'true' run: | @@ -121,6 +129,10 @@ jobs: make PAWPAW_TARGET=win64 # FIXME needs to run twice for now make PAWPAW_TARGET=win64 + - name: Validate plugins + if: steps.cache.outputs.cache-hit == 'true' + run: | + ./utils/plugin-builder/validate-plugins.sh - name: Pack if: steps.cache.outputs.cache-hit == 'true' run: | diff --git a/Makefile b/Makefile index 5cd06b6..f011521 100644 --- a/Makefile +++ b/Makefile @@ -530,7 +530,7 @@ mod-ui/utils/libmod_utils$(SO_EXT): $(BOOTSTRAP_FILES) mod-ui/utils/utils.h mod- # --------------------------------------------------------------------------------------------------------------------- mod-host/mod-host.so: $(BOOTSTRAP_FILES) - ./utils/run.sh $(PAWPAW_TARGET) $(MAKE) SKIP_READLINE=1 SKIP_FFTW335=1 -C mod-host + ./utils/run.sh $(PAWPAW_TARGET) $(MAKE) MODAPP=1 SKIP_READLINE=1 SKIP_FFTW335=1 -C mod-host # --------------------------------------------------------------------------------------------------------------------- diff --git a/PawPaw b/PawPaw index a9267af..f95dfbb 160000 --- a/PawPaw +++ b/PawPaw @@ -1 +1 @@ -Subproject commit a9267afee090fe9f25a3a90157fa2ebfcd62018c +Subproject commit f95dfbbde9f68c15c6cbf08f2987d54f929b1709 diff --git a/mod-host b/mod-host index b133f02..dca85d7 160000 --- a/mod-host +++ b/mod-host @@ -1 +1 @@ -Subproject commit b133f02037de044557ab6a4b622edc622e19d825 +Subproject commit dca85d7f7c1c454e45db44e8f2df2e137ccb9425 diff --git a/utils/debug/jackd b/utils/debug/jackd index 355f5b7..8ec1d92 100755 --- a/utils/debug/jackd +++ b/utils/debug/jackd @@ -4,6 +4,7 @@ cd "$(dirname $0)/../../build" export LANG=en_US.UTF-8 export PAWPAW_SKIP_LTO=1 +export PAWPAW_QUIET=1 function convert_path() { if [ -e jackd.exe ]; then @@ -59,6 +60,7 @@ LV2_PATH+="${PATH_SEP}$(convert_path ${DOCS_DIR}/MOD App/lv2)" export LV2_PATH export MOD_KEYS_PATH="$(convert_path ${DOCS_DIR}/MOD App/keys/)" +export MOD_USER_FILES_DIR="$(convert_path ${DOCS_DIR}/MOD App/user-files)" export JACK_NO_AUDIO_RESERVATION=1 export JACK_NO_START_SERVER=1 diff --git a/utils/debug/mod-ui b/utils/debug/mod-ui index ecd0e77..7a80586 100755 --- a/utils/debug/mod-ui +++ b/utils/debug/mod-ui @@ -4,6 +4,7 @@ cd "$(dirname $0)/../../build" export LANG=en_US.UTF-8 export PAWPAW_SKIP_LTO=1 +export PAWPAW_QUIET=1 function convert_path() { if [ -e jackd.exe ]; then diff --git a/utils/plugin-builder/validate-plugins.sh b/utils/plugin-builder/validate-plugins.sh new file mode 100755 index 0000000..9ed4dc0 --- /dev/null +++ b/utils/plugin-builder/validate-plugins.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# set -eE + +cd "$(dirname $0)/../../build" + +export LANG=en_US.UTF-8 +export PAWPAW_SKIP_LTO=1 +export PAWPAW_QUIET=1 + +function convert_path() { + if [ -e jackd.exe ]; then + echo "Z:\\$(echo ${@} | tr '/' '\\')" + else + echo ${@} + fi +} + +if [ -e mod-ui.exe ]; then + source ../PawPaw/local.env win64 + LV2_PATH="$(convert_path $(pwd)/plugins)" + OS_SEP="\\" +elif [ -e mod-app.app ]; then + source ../PawPaw/local.env macos-universal-10.15 + LV2_PATH="$(pwd)/mod-app.app/Contents/PlugIns/LV2" + OS_SEP='/' +else + source ../PawPaw/local.env linux + LV2_PATH="$(pwd)/mod-app.app/Contents/PlugIns/LV2" + OS_SEP='/' +fi + +export LV2_PATH + +export CARLA_BRIDGE_DUMMY=1 +export CARLA_BRIDGE_TESTING=1 +export MOD_KEYS_PATH="$(convert_path ${DOCS_DIR}/MOD App/keys/)" +export MOD_USER_FILES_DIR="$(convert_path ${DOCS_DIR}/MOD App/user-files)" +export WINEDEBUG=-all + +set -e + +PLUGINS=($(${EXE_WRAPPER} "${PAWPAW_PREFIX}/lib/carla/carla-discovery-native${APP_EXT}" lv2 ":all" 2>/dev/null | tr -dC '[:print:]\n' | awk 'sub("carla-discovery::label::","")')) + +for p in ${PLUGINS[@]}; do + uri=$(echo ${p} | cut -d "${OS_SEP}" -f 2) + echo "Testing ${uri}..." + ${EXE_WRAPPER} "${PAWPAW_PREFIX}/lib/carla/carla-bridge-native${APP_EXT}" lv2 "" "${uri}" 1>/dev/null +done diff --git a/utils/run.sh b/utils/run.sh index 27cdb8e..209e7e5 100755 --- a/utils/run.sh +++ b/utils/run.sh @@ -23,6 +23,7 @@ shift # import env export PAWPAW_SKIP_LTO=1 +export PAWPAW_QUIET=1 source PawPaw/local.env ${target} # ---------------------------------------------------------------------------------------------------------------------