Skip to content

Commit

Permalink
Enable all MOD builds
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Jan 14, 2022
1 parent 337da94 commit d4ddc88
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 2 deletions.
81 changes: 79 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -153,6 +188,7 @@ deps/unzipfx/unzipfx2cat.exe:
make -C deps/unzipfx -f Makefile.win32

# --------------------------------------------------------------
# Clean step

clean:
$(MAKE) distclean -C carla
Expand All @@ -164,6 +200,7 @@ clean:
rm -rf bin build

# --------------------------------------------------------------
# Install step

install:
install -d $(DESTDIR)$(PREFIX)/bin
Expand Down

0 comments on commit d4ddc88

Please sign in to comment.