Skip to content

Commit 7f5b112

Browse files
committed
Enable all MOD builds
1 parent 337da94 commit 7f5b112

File tree

2 files changed

+116
-2
lines changed

2 files changed

+116
-2
lines changed

.github/workflows/build.yml

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
branches:
99
- '*'
1010
env:
11-
CACHE_VERSION: 5
11+
CACHE_VERSION: 6
1212
DEBIAN_FRONTEND: noninteractive
1313
HOMEBREW_NO_AUTO_UPDATE: 1
1414
LIBGL_ALWAYS_SOFTWARE: 'true'
@@ -297,6 +297,39 @@ jobs:
297297
path: |
298298
*-macOS.pkg
299299
300+
modduo:
301+
runs-on: ubuntu-20.04
302+
steps:
303+
- uses: actions/checkout@v2
304+
with:
305+
submodules: recursive
306+
- name: Set up cache
307+
uses: actions/cache@v2
308+
with:
309+
path: |
310+
~/mod-workdir
311+
key: modduo-static-v${{ env.CACHE_VERSION }}
312+
- name: Set up dependencies
313+
run: |
314+
sudo apt-get update -qq
315+
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
316+
- name: Bootstrap toolchain
317+
run: |
318+
git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
319+
sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
320+
$(pwd)/deps/mod-plugin-builder/bootstrap.sh modduo-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduo-static
321+
- name: Build for modduo
322+
run: |
323+
CFLAGS="-ffat-lto-objects" CXXFLAGS="-ffat-lto-objects" make modduo HEADLESS=true WITH_LTO=true -j $(nproc)
324+
- name: Pack binaries
325+
run: |
326+
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)
327+
- uses: actions/upload-artifact@v2
328+
with:
329+
name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
330+
path: |
331+
*.tar.gz
332+
300333
modduox:
301334
runs-on: ubuntu-20.04
302335
steps:
@@ -308,7 +341,7 @@ jobs:
308341
with:
309342
path: |
310343
~/mod-workdir
311-
key: modduox-static-v${{ env.CACHE_VERSION }}
344+
key: modduox-v${{ env.CACHE_VERSION }}
312345
- name: Set up dependencies
313346
run: |
314347
sudo apt-get update -qq
@@ -318,6 +351,50 @@ jobs:
318351
git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
319352
sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
320353
$(pwd)/deps/mod-plugin-builder/bootstrap.sh modduox-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduox-static
354+
- name: Build for modduox
355+
run: |
356+
CFLAGS="-ffat-lto-objects" CXXFLAGS="-ffat-lto-objects" make modduox HEADLESS=true WITH_LTO=true -j $(nproc)
357+
- name: Pack binaries
358+
run: |
359+
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)
360+
- uses: actions/upload-artifact@v2
361+
with:
362+
name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
363+
path: |
364+
*.tar.gz
365+
366+
moddwarf:
367+
runs-on: ubuntu-20.04
368+
steps:
369+
- uses: actions/checkout@v2
370+
with:
371+
submodules: recursive
372+
- name: Set up cache
373+
uses: actions/cache@v2
374+
with:
375+
path: |
376+
~/mod-workdir
377+
key: moddwarf-v${{ env.CACHE_VERSION }}
378+
- name: Set up dependencies
379+
run: |
380+
sudo apt-get update -qq
381+
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
382+
- name: Bootstrap toolchain
383+
run: |
384+
git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
385+
sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
386+
$(pwd)/deps/mod-plugin-builder/bootstrap.sh moddwarf minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh moddwarf
387+
- name: Build for moddwarf
388+
run: |
389+
CFLAGS="-ffat-lto-objects" CXXFLAGS="-ffat-lto-objects" make moddwarf HEADLESS=true WITH_LTO=true -j $(nproc)
390+
- name: Pack binaries
391+
run: |
392+
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)
393+
- uses: actions/upload-artifact@v2
394+
with:
395+
name: ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
396+
path: |
397+
*.tar.gz
321398
322399
win32:
323400
runs-on: ubuntu-20.04

Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,40 @@ endif
9494
endif
9595

9696
# --------------------------------------------------------------
97+
# MOD builds
98+
99+
MOD_WORKDIR ?= $(HOME)/mod-workdir
100+
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
101+
102+
modduo:
103+
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduo-static,arm-mod-linux-gnueabihf.static,arm)
104+
105+
modduox:
106+
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduox-static,aarch64-mod-linux-gnueabi.static,aarch64)
107+
108+
moddwarf:
109+
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/moddwarf,aarch64-mod-linux-gnu,aarch64)
110+
111+
publish:
112+
tar -C bin -cz $(subst bin/,,$(wildcard bin/*.lv2)) | base64 | curl -F 'package=@-' http://192.168.51.1/sdk/install && echo
113+
114+
ifneq (,$(findstring modduo-,$(MAKECMDGOALS)))
115+
$(MAKECMDGOALS):
116+
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduo-static,arm-mod-linux-gnueabihf.static,arm) $(subst modduo-,,$(MAKECMDGOALS))
117+
endif
118+
119+
ifneq (,$(findstring modduox-,$(MAKECMDGOALS)))
120+
$(MAKECMDGOALS):
121+
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduox-static,aarch64-mod-linux-gnueabi.static,aarch64) $(subst modduox-,,$(MAKECMDGOALS))
122+
endif
123+
124+
ifneq (,$(findstring moddwarf-,$(MAKECMDGOALS)))
125+
$(MAKECMDGOALS):
126+
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/moddwarf,aarch64-mod-linux-gnu,aarch64) $(subst moddwarf-,,$(MAKECMDGOALS))
127+
endif
128+
129+
# --------------------------------------------------------------
130+
# Individual targets
97131

98132
cardinal: carla deps dgl plugins
99133
$(MAKE) all -C src $(CARLA_EXTRA_ARGS)
@@ -134,6 +168,7 @@ gen:
134168
endif
135169

136170
# --------------------------------------------------------------
171+
# Packaging standalone for CI
137172

138173
unzipfx: deps/unzipfx/unzipfx2cat$(APP_EXT) Cardinal.zip
139174
cat deps/unzipfx/unzipfx2cat$(APP_EXT) Cardinal.zip > Cardinal
@@ -153,6 +188,7 @@ deps/unzipfx/unzipfx2cat.exe:
153188
make -C deps/unzipfx -f Makefile.win32
154189

155190
# --------------------------------------------------------------
191+
# Clean step
156192

157193
clean:
158194
$(MAKE) distclean -C carla
@@ -164,6 +200,7 @@ clean:
164200
rm -rf bin build
165201

166202
# --------------------------------------------------------------
203+
# Install step
167204

168205
install:
169206
install -d $(DESTDIR)$(PREFIX)/bin

0 commit comments

Comments
 (0)