Fix patch paths and format for parameter scaling #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: S2400 Plugin Build | |
on: | |
push: | |
branches: [ main, s2400-port ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up cross-compilation environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -yqq --no-install-recommends \ | |
autoconf automake build-essential curl cmake file git jq \ | |
libglib2.0-dev-bin libtool lsb-release make meson pkg-config \ | |
lv2-dev patch | |
# Add ARM64 architecture and update package lists | |
sudo dpkg --add-architecture arm64 | |
# Configure ubuntu-ports repository correctly | |
sudo tee /etc/apt/sources.list.d/arm64.list << EOF | |
deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted | |
deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted | |
deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted | |
deb [arch=arm64] http://ports.ubuntu.com/ jammy universe | |
deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe | |
deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse | |
deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse | |
EOF | |
sudo apt-get update || true | |
# Install cross-compilation tools and required libraries | |
sudo apt-get install -yqq --allow-downgrades \ | |
g++-aarch64-linux-gnu \ | |
binfmt-support \ | |
qemu-user-static \ | |
libasound2-dev:arm64 \ | |
libfftw3-dev:arm64 \ | |
libgl1-mesa-dev:arm64 \ | |
libx11-dev:arm64 | |
- name: Apply parameter scaling patches | |
run: | | |
cd ports-juce5/tal-filter/source | |
cp TalCore.cpp TalCore.cpp.orig | |
patch -p0 < TalCore.cpp.patch | |
cd Engine | |
cp Engine.h Engine.h.orig | |
patch -p0 < Engine.h.patch | |
- name: Configure meson build | |
env: | |
CC: aarch64-linux-gnu-gcc | |
CXX: aarch64-linux-gnu-g++ | |
CFLAGS: "-DLINUX=1 -DJUCE_LINUX=1 -DJUCE_ARM=1" | |
CXXFLAGS: "-DLINUX=1 -DJUCE_LINUX=1 -DJUCE_ARM=1" | |
run: | | |
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig | |
meson setup build --cross-file tools/cross-compilation/aarch64-linux-gnu.txt \ | |
-Dplugins=tal-filter \ | |
-Dbuild-lv2=true \ | |
-Dbuild-vst2=false \ | |
-Dbuild-vst3=false \ | |
-Doptimizations=true \ | |
-Dlinux-headless=true | |
- name: Build TAL-Filter | |
run: | | |
cd build | |
ninja -v | |
- name: Prepare plugin package | |
run: | | |
mkdir -p s2400-plugins | |
find build -name "TAL-Filter.lv2" -type d -exec cp -r {} s2400-plugins/ \; | |
if [ -f s2400-plugins/TAL-Filter.lv2/manifest.ttl ]; then | |
sed -i 's/lv2:requiredFeature\s\+<http:\/\/lv2plug\.in\/ns\/ext\/inPlaceBroken>/lv2:optionalFeature <http:\/\/lv2plug\.in\/ns\/ext\/inPlaceBroken>/g' s2400-plugins/TAL-Filter.lv2/manifest.ttl | |
fi | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: s2400-tal-filter | |
path: s2400-plugins/ | |
retention-days: 90 |