From d4ddc88af4410aa3ee9a0ead5689948a99c8897b Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 13 Jan 2022 23:44:47 +0000 Subject: [PATCH] Enable all MOD builds --- .github/workflows/build.yml | 81 ++++++++++++++++++++++++++++++++++++- Makefile | 37 +++++++++++++++++ 2 files changed, 116 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c450dba..828deba7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: branches: - '*' env: - CACHE_VERSION: 5 + CACHE_VERSION: 6 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -297,6 +297,39 @@ jobs: path: | *-macOS.pkg + modduo: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Set up cache + uses: actions/cache@v2 + with: + path: | + ~/mod-workdir + key: modduo-static-v${{ env.CACHE_VERSION }} + - name: Set up dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin + - name: Bootstrap toolchain + run: | + git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder + sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config + $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduo-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduo-static + - name: Build for modduo + run: | + CFLAGS="-ffat-lto-objects" CXXFLAGS="-ffat-lto-objects" make modduo HAVE_LIBLO=true HEADLESS=true WITH_LTO=true -j $(nproc) + - name: Pack binaries + run: | + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2) + - uses: actions/upload-artifact@v2 + with: + name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + path: | + *.tar.gz + modduox: runs-on: ubuntu-20.04 steps: @@ -308,7 +341,7 @@ jobs: with: path: | ~/mod-workdir - key: modduox-static-v${{ env.CACHE_VERSION }} + key: modduox-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | sudo apt-get update -qq @@ -318,6 +351,50 @@ jobs: git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduox-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduox-static + - name: Build for modduox + run: | + CFLAGS="-ffat-lto-objects" CXXFLAGS="-ffat-lto-objects" make modduox HAVE_LIBLO=true HEADLESS=true WITH_LTO=true -j $(nproc) + - name: Pack binaries + run: | + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2) + - uses: actions/upload-artifact@v2 + with: + name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + path: | + *.tar.gz + + moddwarf: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Set up cache + uses: actions/cache@v2 + with: + path: | + ~/mod-workdir + key: moddwarf-v${{ env.CACHE_VERSION }} + - name: Set up dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin + - name: Bootstrap toolchain + run: | + git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder + sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config + $(pwd)/deps/mod-plugin-builder/bootstrap.sh moddwarf minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh moddwarf + - name: Build for moddwarf + run: | + CFLAGS="-ffat-lto-objects" CXXFLAGS="-ffat-lto-objects" make moddwarf HAVE_LIBLO=true HEADLESS=true WITH_LTO=true -j $(nproc) + - name: Pack binaries + run: | + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2) + - uses: actions/upload-artifact@v2 + with: + name: ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + path: | + *.tar.gz win32: runs-on: ubuntu-20.04 diff --git a/Makefile b/Makefile index a57f3618..5448197d 100644 --- a/Makefile +++ b/Makefile @@ -94,6 +94,40 @@ endif endif # -------------------------------------------------------------- +# MOD builds + +MOD_WORKDIR ?= $(HOME)/mod-workdir +MOD_ENVIRONMENT = AR=${1}/host/usr/bin/${2}-gcc-ar CC=${1}/host/usr/bin/${2}-gcc CPP=${1}/host/usr/bin/${2}-cpp CXX=${1}/host/usr/bin/${2}-g++ LD=${1}/host/usr/bin/${2}-ld PKG_CONFIG=${1}/host/usr/bin/pkg-config STRIP=${1}/host/usr/bin/${2}-strip CFLAGS="-I${1}/staging/usr/include" CPPFLAGS= CXXFLAGS="-I${1}/staging/usr/include" LDFLAGS="-L${1}/staging/usr/lib" \ EXE_WRAPPER="qemu-${3}-static -L ${1}/target" HEADLESS=true NOOPT=true STATIC_BUILD=true + +modduo: + $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduo-static,arm-mod-linux-gnueabihf.static,arm) + +modduox: + $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduox-static,aarch64-mod-linux-gnueabi.static,aarch64) + +moddwarf: + $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/moddwarf,aarch64-mod-linux-gnu,aarch64) + +publish: + tar -C bin -cz $(subst bin/,,$(wildcard bin/*.lv2)) | base64 | curl -F 'package=@-' http://192.168.51.1/sdk/install && echo + +ifneq (,$(findstring modduo-,$(MAKECMDGOALS))) +$(MAKECMDGOALS): + $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduo-static,arm-mod-linux-gnueabihf.static,arm) $(subst modduo-,,$(MAKECMDGOALS)) +endif + +ifneq (,$(findstring modduox-,$(MAKECMDGOALS))) +$(MAKECMDGOALS): + $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduox-static,aarch64-mod-linux-gnueabi.static,aarch64) $(subst modduox-,,$(MAKECMDGOALS)) +endif + +ifneq (,$(findstring moddwarf-,$(MAKECMDGOALS))) +$(MAKECMDGOALS): + $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/moddwarf,aarch64-mod-linux-gnu,aarch64) $(subst moddwarf-,,$(MAKECMDGOALS)) +endif + +# -------------------------------------------------------------- +# Individual targets cardinal: carla deps dgl plugins $(MAKE) all -C src $(CARLA_EXTRA_ARGS) @@ -134,6 +168,7 @@ gen: endif # -------------------------------------------------------------- +# Packaging standalone for CI unzipfx: deps/unzipfx/unzipfx2cat$(APP_EXT) Cardinal.zip cat deps/unzipfx/unzipfx2cat$(APP_EXT) Cardinal.zip > Cardinal @@ -153,6 +188,7 @@ deps/unzipfx/unzipfx2cat.exe: make -C deps/unzipfx -f Makefile.win32 # -------------------------------------------------------------- +# Clean step clean: $(MAKE) distclean -C carla @@ -164,6 +200,7 @@ clean: rm -rf bin build # -------------------------------------------------------------- +# Install step install: install -d $(DESTDIR)$(PREFIX)/bin