From 01da2877b0606423afdd78ec7337995bb5ee61ff Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Sat, 20 Jun 2026 19:02:26 +0200 Subject: [PATCH] CI: Add Ubuntu 26 build --- .github/scripts/.package.zsh | 2 +- .github/scripts/utils.zsh/setup_linux | 21 +++++--- .github/workflows/build-project.yaml | 71 +++++++++++++++++++++++++++ cmake/linux/defaults.cmake | 1 + 4 files changed, 87 insertions(+), 8 deletions(-) diff --git a/.github/scripts/.package.zsh b/.github/scripts/.package.zsh index bb9d74ba..93c020fa 100755 --- a/.github/scripts/.package.zsh +++ b/.github/scripts/.package.zsh @@ -259,7 +259,7 @@ ${_usage_host:-}" cmake --build build_${target##*-} --config ${config} -t package ${cmake_args} # Mark certain deps as optional - build-aux/CI/linux/demote-deps.sh ${project_root}/release/*.deb Recommends '(mqtt)|(opencv)|(tesseract)|(usb)|(x11)' + build-aux/CI/linux/demote-deps.sh ${project_root}/release/*.deb Recommends '(mqtt)|(opencv)|(tesseract)|(usb)|(x11)|(libobs)' if [ ! -e ${project_root}/release/${output_name}.deb ]; then mv ${project_root}/release/*.deb ${project_root}/release/${output_name}.deb diff --git a/.github/scripts/utils.zsh/setup_linux b/.github/scripts/utils.zsh/setup_linux index 7651f041..f200f813 100644 --- a/.github/scripts/utils.zsh/setup_linux +++ b/.github/scripts/utils.zsh/setup_linux @@ -35,14 +35,21 @@ if (( ! (${skips[(Ie)all]} + ${skips[(Ie)deps]}) )) { sudo apt-get install ${apt_args} gcc-${${target##*-}//_/-}-linux-gnu g++-${${target##*-}//_/-}-linux-gnu } - sudo add-apt-repository --yes ppa:obsproject/obs-studio - sudo apt update + local dist_version + read -r dist_version <<< "$(source /etc/os-release; print "${VERSION_ID}")" - sudo apt-get install ${apt_args} \ - build-essential \ - libgles2-mesa-dev \ - libsimde-dev \ - obs-studio + # The OBS PPA may not yet support newer Ubuntu versions. + # On those, use the native obs-studio packages and install libobs-dev separately, + # as it is not bundled in obs-studio itself on newer Ubuntu releases. + local -a obs_packages=(build-essential libgles2-mesa-dev libsimde-dev obs-studio) + if is-at-least 26.04 ${dist_version}; then + obs_packages+=(libobs-dev) + else + sudo add-apt-repository --yes ppa:obsproject/obs-studio + sudo apt update + fi + + sudo apt-get install ${apt_args} ${obs_packages} local -a _qt_packages=() diff --git a/.github/workflows/build-project.yaml b/.github/workflows/build-project.yaml index 04652cd4..990809bc 100644 --- a/.github/workflows/build-project.yaml +++ b/.github/workflows/build-project.yaml @@ -252,6 +252,77 @@ jobs: path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*-dbgsym.ddeb if-no-files-found: ignore + ubuntu-26-build: + name: Build for Ubuntu 26 🐧 + runs-on: ubuntu-26.04 + needs: check-event + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v6 + with: + submodules: recursive + fetch-depth: 0 + + - name: Set Up Environment 🔧 + id: setup + run: | + : Set Up Environment 🔧 + if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi + + git_tag="$(git describe --tags)" + + read -r product_name product_version <<< \ + "$(jq -r '. | {name, version} | join(" ")' buildspec.json)" + + echo "pluginName=${product_name}" >> $GITHUB_OUTPUT + echo "pluginVersion=${git_tag}" >> $GITHUB_OUTPUT + + - uses: actions/cache@v5 + id: ccache-cache + with: + path: ${{ github.workspace }}/.ccache + key: ${{ runner.os }}-ccache-x86_64-${{ needs.check-event.outputs.config }} + restore-keys: | + ${{ runner.os }}-ccache-x86_64- + + - name: Set up Homebrew 🍺 + uses: Homebrew/actions/setup-homebrew@main + + - name: Build Plugin 🧱 + uses: ./.github/actions/build-plugin + with: + target: x86_64 + config: ${{ needs.check-event.outputs.config }} + + - name: Run tests + uses: ./.github/actions/run-tests + with: + target: x86_64 + config: ${{ needs.check-event.outputs.config }} + + - name: Package Plugin 📀 + uses: ./.github/actions/package-plugin + with: + package: ${{ fromJSON(needs.check-event.outputs.package) }} + target: x86_64 + config: ${{ needs.check-event.outputs.config }} + + - name: Upload Artifacts 📡 + uses: actions/upload-artifact@v7 + with: + name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-26.04-x86_64-${{ needs.check-event.outputs.commitHash }} + path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*.* + + - name: Upload debug symbol artifacts 🪲 + uses: actions/upload-artifact@v7 + if: ${{ fromJSON(needs.check-event.outputs.package) }} + with: + name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-26.04-x86_64-${{ needs.check-event.outputs.commitHash }}-dbgsym + path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*-dbgsym.ddeb + if-no-files-found: ignore + windows-build: name: Build for Windows 🪟 runs-on: windows-2022 diff --git a/cmake/linux/defaults.cmake b/cmake/linux/defaults.cmake index 6c02616c..4938bad6 100644 --- a/cmake/linux/defaults.cmake +++ b/cmake/linux/defaults.cmake @@ -22,6 +22,7 @@ set(CPACK_GENERATOR "DEB" CACHE STRING "CPack generator to use") set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) +set(CPACK_DEBIAN_PACKAGE_DEPENDS "obs-studio") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${PLUGIN_EMAIL}") set(CPACK_SET_DESTDIR ON)