cd: add DEB, RPM and Arch Linux packages

- Add CPack configuration in CMakeLists.txt for .deb and .rpm generation
  with declared runtime dependencies.
- Add Arch Linux PKGBUILD template under app/packaging/arch/ and build it
  inside the official archlinux:base-devel Docker container.
- Extend CD workflow with deb, rpm and archlinux jobs and attach the
  resulting packages to the draft release.
This commit is contained in:
2026-07-13 14:47:46 +08:00
parent 847abbfd5c
commit 2f0beeb7da
3 changed files with 207 additions and 4 deletions
+152 -4
View File
@@ -59,11 +59,19 @@ jobs:
run: |
mkdir -p app/packaging/windows/nsis/olive-editor
cp build/app/olive-editor.exe app/packaging/windows/nsis/olive-editor/
cp build/app/olive-render-worker.exe app/packaging/windows/nsis/olive-editor/
cp build/app/oakgl.dll app/packaging/windows/nsis/olive-editor/
if [ -f build/app/oakvulkan.dll ]; then
cp build/app/oakvulkan.dll app/packaging/windows/nsis/olive-editor/
fi
windeployqt6 app/packaging/windows/nsis/olive-editor/olive-editor.exe
# Copy all non-Qt MSYS2 DLLs recursively
# Copy all non-Qt MSYS2 DLLs recursively for every binary we ship
cd app/packaging/windows/nsis/olive-editor
for l in $(ntldd -R olive-editor.exe | grep -E 'mingw64|ucrt64|clang64' | sed 's/^[ \t]*//' | cut -d' ' -f3); do
cp -v "$l" .
for binary in olive-editor.exe olive-render-worker.exe oakgl.dll oakvulkan.dll; do
[ -f "$binary" ] || continue
for l in $(ntldd -R "$binary" | grep -E 'mingw64|ucrt64|clang64' | sed 's/^[ \t]*//' | cut -d' ' -f3); do
cp -v "$l" .
done
done
- name: Build installer
@@ -317,11 +325,151 @@ jobs:
name: oak-linux-appimage
path: Oak_Video_Editor-*.AppImage
# ------------------------------------------------------------------
# Debian package (.deb)
# ------------------------------------------------------------------
deb:
runs-on: warp-ubuntu-latest-x64-16x
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake ninja-build pkg-config \
qt6-base-dev qt6-base-dev-tools qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools \
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev \
libopencolorio-dev libopenimageio-dev libopenexr-dev libexpat1-dev \
portaudio19-dev libgl1-mesa-dev libxkbcommon-dev
- name: Build
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_QT6=ON \
-DCMAKE_DISABLE_FIND_PACKAGE_Vulkan=ON
cmake --build build
- name: Create DEB package
run: |
cd build
cpack -G DEB
mv *.deb "${GITHUB_WORKSPACE}/"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: oak-deb-package
path: oak-video-editor_*.deb
# ------------------------------------------------------------------
# RPM package (.rpm)
# ------------------------------------------------------------------
rpm:
runs-on: warp-ubuntu-latest-x64-16x
container:
image: fedora:latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
dnf install -y \
cmake ninja-build pkgconf-pkg-config \
qt6-qtbase-devel qt6-qtbase-private-devel qt6-qttools-devel \
ffmpeg-free-devel \
OpenImageIO-devel \
OpenColorIO-devel \
openexr-devel \
expat-devel \
portaudio-devel \
mesa-libGL-devel \
vulkan-headers \
vulkan-loader-devel \
libxkbcommon-devel \
gcc-c++ \
bzip2-devel \
rpm-build
- name: Build
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_QT6=ON \
-DCMAKE_DISABLE_FIND_PACKAGE_Vulkan=ON
cmake --build build
- name: Create RPM package
run: |
cd build
cpack -G RPM
mv *.rpm "${GITHUB_WORKSPACE}/"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: oak-rpm-package
path: oak-video-editor-*.rpm
# ------------------------------------------------------------------
# Arch Linux package (.pkg.tar.zst)
# ------------------------------------------------------------------
archlinux:
runs-on: warp-ubuntu-latest-x64-16x
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Prepare source tarball and PKGBUILD
run: |
VERSION="${GITHUB_REF_NAME#v}"
# Arch pkgver cannot contain hyphens
PKGVER="${VERSION//-/_}"
tar czf "oak-video-editor-${PKGVER}.tar.gz" \
--transform "s,^,oak-video-editor-${PKGVER}/," \
--exclude='.git' \
--exclude='build' \
.
sed "s/@VERSION@/${PKGVER}/g" app/packaging/arch/PKGBUILD.in > PKGBUILD
- name: Build package in Arch Linux container
run: |
docker run --rm \
-v "${PWD}:/build" \
-w /build \
archlinux:base-devel \
bash -c '
set -e
pacman-key --init
pacman -Syu --noconfirm
pacman -S --noconfirm --needed \
cmake ninja git pkgconf \
qt6-base qt6-tools ffmpeg openimageio opencolorio openexr expat portaudio \
mesa vulkan-icd-loader libxkbcommon
useradd -m builder
chown -R builder /build
su builder -c "makepkg -s --noconfirm"
'
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: oak-arch-package
path: oak-video-editor-*.pkg.tar.zst
# ------------------------------------------------------------------
# Create Draft Release
# ------------------------------------------------------------------
release:
needs: [windows, macos, appimage]
needs: [windows, macos, appimage, deb, rpm, archlinux]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
+28
View File
@@ -337,3 +337,31 @@ if (BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()
# ------------------------------------------------------------------------------
# CPack / system package configuration
# ------------------------------------------------------------------------------
set(CPACK_PACKAGE_NAME "oak-video-editor")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_VENDOR "Oak Video Editor Team")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Oak - Non-linear video editor")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://oakvideoeditor.org")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
# Debian
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Oak Video Editor Team")
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libqt6core6, libqt6gui6, libqt6widgets6, libqt6opengl6, libqt6openglwidgets6, libqt6network6, libqt6concurrent6, libavcodec60, libavformat60, libavutil58, libswscale7, libswresample4, libavfilter9, libopenimageio2.4, libopencolorio2, libopenexr-3-1-30, libexpat1, libportaudio2, libgl1, libxkbcommon0")
# RPM
set(CPACK_RPM_PACKAGE_LICENSE "GPLv3")
set(CPACK_RPM_PACKAGE_GROUP "Applications/Multimedia")
set(CPACK_RPM_PACKAGE_URL "https://oakvideoeditor.org")
set(CPACK_RPM_PACKAGE_REQUIRES
"qt6-qtbase >= 6.0, qt6-qtbase-gui >= 6.0, qt6-qttools, ffmpeg-libs >= 6.0, OpenImageIO >= 2.4, OpenColorIO >= 2.0, openexr >= 3.1, expat, portaudio, mesa-libGL, libxkbcommon")
include(CPack)
+27
View File
@@ -0,0 +1,27 @@
# Maintainer: Oak Video Editor Team
pkgname=oak-video-editor
pkgver=@VERSION@
pkgrel=1
pkgdesc="Oak - Non-linear video editor"
arch=('x86_64')
url="https://oakvideoeditor.org"
license=('GPL3')
depends=('qt6-base' 'qt6-tools' 'ffmpeg' 'openimageio' 'opencolorio' 'openexr' 'expat' 'portaudio' 'mesa' 'vulkan-icd-loader' 'libxkbcommon')
makedepends=('cmake' 'ninja' 'git' 'pkgconf')
source=("${pkgname}-${pkgver}.tar.gz")
md5sums=('SKIP')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_QT6=ON \
-DCMAKE_DISABLE_FIND_PACKAGE_Vulkan=ON
cmake --build build
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
DESTDIR="${pkgdir}" cmake --install build
}