From d9dd861e3b2b1590c3d452091926f2663e0837e3 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sun, 25 Oct 2026 14:25:28 +0100 Subject: [PATCH 1/4] CI: Add workflows for -Dvideo-codecs=all / -Dvideo-codecs=all_free builds Replaces the previous ci workflow. Signed-off-by: Janne Grunau From d5a7d49d636d6863fc9801ffc6df0fab1d954876 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Fri, 23 Oct 2026 00:18:27 +0200 Subject: [PATCH 2/4] build: Use git to provide version information Link: https://mesonbuild.com/Creating-releases.html#cement-a-version-obtained-from-vcs Signed-off-by: Janne Grunau --- meson.build | 5 ++++- version.sh | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 version.sh diff --git a/meson.build b/meson.build index 59cbba4..6a4f077 100644 --- a/meson.build +++ b/meson.build @@ -3,9 +3,12 @@ project('avd-fw', 'c', license: 'MIT', license_files: 'LICENSE', meson_version: '>=1.4.0', - version: '0.1', + version: run_command('version.sh', 'get-vcs', check: true).stdout().strip(), ) +# Provide a version for `meson dist` tarballs +meson.add_dist_script('version.sh', 'set-dist', meson.project_version()) + # cross files are needed as those are the only way to set default compiler # and specify the host arch if not meson.is_cross_build() diff --git a/version.sh b/version.sh new file mode 100755 index 0000000..29faf17 --- /dev/null +++ b/version.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ "$1" = "get-vcs" ]; then + git --git-dir "$MESON_SOURCE_ROOT"/.git describe --always --dirty +elif [ "$1" = "set-dist" ]; then + $MESONREWRITE --sourcedir="$MESON_PROJECT_DIST_ROOT" kwargs set project / version "$2" +else + echo "$0 is expected to be executed by meson with 'get-vcs' or 'set-dist ...' as command" + exit 1 +fi From 23c833537b8c1fb9c4731cd10c0d60af7f3a5b2b Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 24 Oct 2026 22:41:54 +0200 Subject: [PATCH 3/4] CI: Add a `meson dist` workflow It runs `meson dist` and uploads the resulting tarball as artifact. Signed-off-by: Janne Grunau --- .github/workflows/dist-tarball.yml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/dist-tarball.yml diff --git a/.github/workflows/dist-tarball.yml b/.github/workflows/dist-tarball.yml new file mode 100644 index 0000000..aa5a0f3 --- /dev/null +++ b/.github/workflows/dist-tarball.yml @@ -0,0 +1,41 @@ +name: dist-tarball +on: + push: + branches: [ main ] + tags: [ 'v*' ] + pull_request: + branches: [ main ] + paths: [ .github/workflows/dist-tarball.yml, meson.build ] + +jobs: + dist-tarball: + runs-on: ubuntu-26.04-arm + + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Setup + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y meson + echo "/usr/lib/llvm-21/bin" >> $GITHUB_PATH + + - name: meson setup + run: | + meson setup --cross-file=./llvm.ini build + + - name: meson dist + run: | + meson dist -C build + + - name: Query version + run: | + meson introspect --projectinfo build | jq -r '"VERSION=\(.["version"])"' >> $GITHUB_ENV + + - uses: actions/upload-artifact@v7 + with: + archive: false + path: build/meson-dist/avd-fw-${{ env.VERSION }}.tar.xz From 7b49b7967b67401e626a32545547c861cbb7442e Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Wed, 28 Oct 2026 11:09:48 +0100 Subject: [PATCH 4/4] fixup! build: Use git to provide version information --- version.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/version.sh b/version.sh index 29faf17..ce0310d 100755 --- a/version.sh +++ b/version.sh @@ -1,6 +1,11 @@ #!/bin/sh if [ "$1" = "get-vcs" ]; then + GIT_DIR="${MESON_SOURCE_ROOT}"/.git + if [ ! -e "${GIT_DIR}" ]; then + echo "Tarball either not created with \`meson dist\` or otherwise missing \"${GIT_DIR}\"." + exit 1 + fi git --git-dir "$MESON_SOURCE_ROOT"/.git describe --always --dirty elif [ "$1" = "set-dist" ]; then $MESONREWRITE --sourcedir="$MESON_PROJECT_DIST_ROOT" kwargs set project / version "$2"