Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 145 additions & 0 deletions .github/workflows/linux-aarch64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# aarch64 Linux build, gates and release tarball.
#
# WHY THIS EXISTS. x86_64 releases are built on the author's own machine. There
# is no ARM hardware on hand (no Pi, no arm64 laptop), so the aarch64 build can
# only be compiled and checked on a runner of its own architecture.
#
# WHY A DEBIAN CONTAINER ON AN UBUNTU RUNNER. `runs-on:` names the virtual
# machine, and GitHub hosts no Debian runner. Everything that reaches the
# tarball -- compiler, glibc, GTK3, JACK, lilv/suil/sratom, sndfile -- comes
# from debian:12 (bookworm). Ubuntu contributes only the kernel, Docker and the
# git that does the checkout. Debian 12 is glibc 2.36, so the binary runs on
# bookworm-era systems (Raspberry Pi OS included); a bare ubuntu-24.04-arm
# runner is glibc 2.39 and would raise that floor.
#
# WHAT THIS DOES NOT COVER: no live audio, no JACK server, no xrun count, no
# CPU-load figure. It proves the aarch64 build compiles clean, links, stays
# under the glibc ceiling and packages -- not that it sounds right on a board.
name: Linux aarch64

# Every push on every branch, except commits that cannot change the build. The
# list says what to IGNORE rather than what to match, so a forgotten entry costs
# a spare run instead of silently skipping a check. icons/ is NOT ignored: the
# tarball packages it.
on:
push:
branches: ['**']
paths-ignore: &docs_only
- '**.md'
- 'LICENSE'
- '.gitignore'
pull_request:
paths-ignore: *docs_only
workflow_dispatch:

concurrency:
group: linux-aarch64-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: aarch64 (ubuntu-24.04-arm, debian:12)
# GitHub-hosted arm64 runner, free for public repositories. Check the label
# against https://github.com/actions/runner-images before changing it.
runs-on: ubuntu-24.04-arm

steps:
- uses: actions/checkout@v5

# Checkout and submodules run on the HOST, where git already is; only the
# build needs the Debian ABI. Never `--recursive`: the Makefile compiles
# only base/, pluginterfaces/ and public.sdk/ from the SDK, and its other
# submodules (vstgui4, doc, tutorials, cmake) are large and unused.
- name: Submodules
run: |
git submodule update --init ext/vst3sdk
git -C ext/vst3sdk submodule update --init base pluginterfaces public.sdk

- name: Build, gate and package inside Debian 12
run: |
docker run --rm -i \
-v "$PWD:/src" -w /src \
"debian:12" \
bash -euo pipefail -s <<'CONTAINER'
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq

# One dev package per pkg-config probe in the Makefile: PKGS_REQ
# (gtk+-3.0, gtk+-x11-3.0, jack, sndfile), the optional alsa,
# samplerate, lilv-0, suil-0 and sratom-0, and the LV2 UI helpers'
# x11 and gtk+-2.0 (the gtk2 helper hosts GtkUI editors out of
# process, as in the x86_64 release). file and binutils are what the
# gates below run on; release-tarball.sh reads the arch with readelf.
apt-get install -y --no-install-recommends \
build-essential pkg-config ca-certificates file binutils \
libgtk-3-dev libjack-jackd2-dev libsndfile1-dev \
libasound2-dev libsamplerate0-dev \
liblilv-dev libsuil-dev libsratom-dev lv2-dev \
libx11-dev libgtk2.0-dev

# No `| head -1` on these: under pipefail, head closing the pipe early
# kills ldd with SIGPIPE (status 141) and errexit ends the job.
echo "== toolchain and ABI floor =="
cc --version
ldd --version
uname -m

echo "== build =="
make VST3=1 -j"$(nproc)" 2>&1 | tee build.log

BINS="src/jackdaw src/jackdaw-lv2ui-x11 src/jackdaw-lv2ui-gtk2"

# The x86_64 build is warning-free under -Wall -Wextra, so any warning
# here is new and architecture-specific -- e.g. -Wtype-limits firing
# because char is unsigned on aarch64. SDK objects build with -w and
# never match ^src/.
echo "== gate: no compiler warnings in src/ =="
if grep -E '^src/.*warning:' build.log; then
echo "FAIL: compiler warnings above" >&2; exit 1
fi

echo "== gate: every binary is aarch64 and resolves its libraries =="
for b in $BINS; do
[ -f "$b" ] || { echo "FAIL: $b was not built" >&2; exit 1; }
info=$(file -b "$b")
echo "$b: $info"
case "$info" in
*'ARM aarch64'*) ;;
*) echo "FAIL: $b is not aarch64" >&2; exit 1 ;;
esac
if ldd "$b" | grep 'not found'; then
echo "FAIL: $b has unresolved libraries" >&2; exit 1
fi
done

# The container is what sets the floor; this catches a change of
# image, or a symbol pulled from a newer glibc some other way.
echo "== gate: glibc symbol ceiling 2.36 =="
for b in $BINS; do
max=$(objdump -T "$b" | grep -o 'GLIBC_[0-9.]*' | sed 's/GLIBC_//' | sort -Vu | tail -n1)
echo "$b: GLIBC_$max"
if [ "$(printf '%s\n2.36\n' "$max" | sort -V | tail -n1)" != "2.36" ]; then
echo "FAIL: $b needs GLIBC_$max > 2.36" >&2; exit 1
fi
done

echo "== package =="
./release-tarball.sh
ls -l jackdaw-*-linux-aarch64.tar.gz
CONTAINER

# The container ran as root, so everything it wrote is root-owned and the
# upload action, which does not run as root, cannot read it.
- name: Hand the workspace back to the runner
if: always()
run: sudo chown -R "$(id -u):$(id -g)" .

# An artifact and not a release: the aarch64 build has never run on real
# hardware, so it is attached to a release by hand once someone has heard
# it on a board.
- name: Upload the release tarball
uses: actions/upload-artifact@v6
with:
name: jackdaw-linux-aarch64
path: jackdaw-*-linux-aarch64.tar.gz
if-no-files-found: error
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ SRCS_C := \
$(SRCDIR)/undo.c \
$(SRCDIR)/project.c \
$(SRCDIR)/jackdaw-engine.c \
$(SRCDIR)/rt_ringbuffer.c \
$(SRCDIR)/midicontrol.c \
$(SRCDIR)/pluginhost.c \
$(SRCDIR)/pluginhost_lv2.c \
Expand Down
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ a count of any recorded audio, so you can decide for yourself.

### Creating a release tarball

`release-tarball.sh` produces `jackdaw-<VERSION>.tar.gz` that unpacks into a
top-level `JackDAW/` directory containing the source, bundled headers, the VST3
`release-tarball.sh` produces `jackdaw-<VERSION>-linux-<ARCH>.tar.gz` (ARCH is
`x86_64` or `aarch64`, read from the binary; a `--no-binary` tarball is plain
`jackdaw-<VERSION>.tar.gz`) that unpacks into a top-level `JackDAW/` directory containing the source, bundled headers, the VST3
SDK, icons, packaging scripts and the prebuilt binary. Because the SDK is
included the tarball is around 15 MB, and it builds VST3 support with no
network access or submodule fetch.
Expand All @@ -179,6 +180,16 @@ network access or submodule fetch.
The default version comes from `#define VERSION` in `src/config.h`; edit the
`VERSION=` variable at the top of the script, or pass it as the first argument.

### aarch64 (Raspberry Pi 4/5, Orange Pi 5, arm64 laptops)

The aarch64 tarball is built by GitHub Actions (`.github/workflows/linux-aarch64.yml`)
on an arm64 runner inside a Debian 12 container, so it needs glibc 2.36 or newer.
Download it from the run's artifacts (`jackdaw-linux-aarch64`) and install it the
same way as x86_64; the installer checks that the binary's architecture matches.

It has not yet been run on ARM hardware — it builds and packages, but no live
audio, xrun or CPU-load figure has been taken on a board.

---

## Plugins
Expand Down Expand Up @@ -207,11 +218,13 @@ On startup JackDAW scans and reports any **newly discovered** plugins.
**Default search paths** (always present):

- User: `~/.lv2`, `~/.vst`, `~/.vst3`, `~/.clap`, `~/.ladspa`
- LV2: `/usr/lib/lv2`, `/usr/local/lib/lv2`, `/usr/lib/x86_64-linux-gnu/lv2`
- LV2: `/usr/lib/lv2`, `/usr/local/lib/lv2`, `/usr/lib/<arch>-linux-gnu/lv2`
- VST2: `/usr/lib/vst`, `/usr/local/lib/vst`
- VST3: `/usr/lib/vst3`, `/usr/local/lib/vst3`, `/usr/lib/x86_64-linux-gnu/vst3`
- VST3: `/usr/lib/vst3`, `/usr/local/lib/vst3`, `/usr/lib/<arch>-linux-gnu/vst3`
- CLAP: `/usr/lib/clap`, `/usr/local/lib/clap`
- LADSPA: `/usr/lib/ladspa`, `/usr/local/lib/ladspa`, `/usr/lib/x86_64-linux-gnu/ladspa`
- LADSPA: `/usr/lib/ladspa`, `/usr/local/lib/ladspa`, `/usr/lib/<arch>-linux-gnu/ladspa`

(`<arch>` is `x86_64` or `aarch64`, matching the build.)

**Adding more folders / rescanning:** open the **Plugins…** paths dialog. It
has **Add Folder…**, **Remove**, and **Scan** (rescan) buttons; extra paths are
Expand Down
24 changes: 20 additions & 4 deletions release-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
#
# release-tarball.sh — build a JackDAW release tarball.
#
# Produces jackdaw-<VERSION>.tar.gz which unpacks into a top-level directory
# named JackDAW/ containing the source, bundled headers, icons, packaging
# scripts and (by default) the prebuilt binary.
# Produces jackdaw-<VERSION>-linux-<ARCH>.tar.gz (or jackdaw-<VERSION>.tar.gz
# for a source-only tarball) which unpacks into a top-level directory named
# JackDAW/ containing the source, bundled headers, icons, packaging scripts
# and (by default) the prebuilt binary. <ARCH> is read from the binary itself
# (x86_64, aarch64), so the name says what it runs on, not where it was packed.
#
# Usage:
# ./release-tarball.sh [VERSION] [--no-binary]
Expand Down Expand Up @@ -44,7 +46,21 @@ if [ -z "$VERSION" ]; then
fi
VERSION=${VERSION#v} # tolerate a leading 'v'

NAME="jackdaw-$VERSION"
# A binary tarball only runs on one architecture, so it says which in its
# name. Taken from the ELF header rather than uname -m, so a binary built
# elsewhere is still named for what it is.
ARCH=""
if [ "$INCLUDE_BINARY" -eq 1 ] && [ -f src/jackdaw ]; then
if command -v readelf >/dev/null 2>&1; then
case $(readelf -h src/jackdaw 2>/dev/null) in
*X86-64*) ARCH=x86_64 ;;
*AArch64*) ARCH=aarch64 ;;
esac
fi
[ -n "$ARCH" ] || ARCH=$(uname -m)
fi

NAME="jackdaw-$VERSION${ARCH:+-linux-$ARCH}"
TARBALL="$ROOT/$NAME.tar.gz"

STAGE=$(mktemp -d)
Expand Down
Loading