Browse Source

CI: Update build script for Ubuntu to require Ubuntu 24.04

Also defaults to Qt6 and x86_64 builds, thus no toolchain file is
needed and no additional data in buildspec is needed either.
PatTheMav 1 year ago
parent
commit
c2ea78c31f

+ 0 - 1
.github/scripts/.build.zsh

@@ -210,7 +210,6 @@ build() {
       local cmake_bin='/usr/bin/cmake'
       cmake_args+=(
         --preset ubuntu-ci
-        --toolchain ${project_root}/cmake/linux/toolchain-${target##*-}-gcc.cmake
         -DENABLE_BROWSER:BOOL=ON
         -DCEF_ROOT_DIR:PATH="${project_root}/.deps/cef_binary_${CEF_VERSION}_${target//ubuntu-/linux_}"
       )

+ 6 - 0
.github/scripts/utils.zsh/check_ubuntu

@@ -13,6 +13,12 @@ if [[ -f /etc/os-release ]] {
     log_group
     return 2
   }
+
+  autoload -Uz is-at-least && if ! is-at-least 24.04 ${dist_version}; then
+    log_error "Not running on a recent-enough Ubuntu distribution. Aborting"
+    log_group
+    return 2
+  fi
 } else {
   log_error "Unable to determine local Linux distribution, but Ubuntu is required. Aborting"
   log_group

+ 3 - 24
.github/scripts/utils.zsh/setup_ubuntu

@@ -14,12 +14,6 @@ local -a curl_opts=(--show-error --silent --location -O ${@})
 
 pushd ${project_root}
 
-typeset -g QT_VERSION
-read -r QT_VERSION <<< \
-  "$(jq -r --arg target "${target}" \
-    '.platformConfig[$target] | { qtVersion } | join(" ")' \
-    ${buildspec_file})"
-
 log_group 'Installing obs-studio build dependencies...'
 
 mkdir -p ${project_root}/.deps
@@ -90,21 +84,6 @@ sudo apt-get install -y --no-install-recommends \
   libpulse-dev libsndio-dev libspeexdsp-dev libudev-dev libv4l-dev libva-dev libvlc-dev \
   libpci-dev libdrm-dev \
   nlohmann-json3-dev libwebsocketpp-dev libasio-dev libqrcodegencpp-dev \
-  libffmpeg-nvenc-dev librist-dev libsrt-openssl-dev
-
-if [[ ${target##*-} == x86_64 ]] sudo apt-get install -y --no-install-recommends libvpl-dev libvpl2
-
-local -a _qt_packages=()
-
-if (( QT_VERSION == 6 )) {
-  _qt_packages+=(
-    qt6-base-dev
-    libqt6svg6-dev
-    qt6-base-private-dev
-  )
-} else {
-  log_error "Unsupported Qt version '${QT_VERSION}' specified."
-  return 2
-}
-
-sudo apt-get install -y --no-install-recommends ${_qt_packages}
+  libffmpeg-nvenc-dev librist-dev libsrt-openssl-dev \
+  qt6-base-dev libqt6svg6-dev qt6-base-private-dev \
+  libvpl-dev libvpl2

+ 0 - 10
buildspec.json

@@ -49,15 +49,5 @@
             "hash": "ca59770e9f46b59d6bec6e7036a17a27d601a0a5a0a721fe8e03fea734ccf732"
         }
     },
-    "platformConfig": {
-        "ubuntu-x86_64": {
-            "qtVersion": 6,
-            "generator": "Ninja"
-        },
-        "ubuntu-aarch64": {
-            "qtVersion": 6,
-            "generator": "Ninja"
-        }
-    },
     "name": "obs-studio"
 }