Files
obs-localvocal/.github/scripts/utils.zsh/setup_linux
Tabitha Cromarty d954c421ba Use more caching to reduce CI times for Mac and Linux (#252)
* Try caching ICU build prefix to speed up CI times

* Don't bother with Linux ICU cache

The Linux build spends most of its time installng packages with apt not building ICU

* Reduce ICU cache size by not including src dir

* Try caching linux apt packages

* Find cached ICU correctly

* Use specific version of cache-apt-packages-action

* Format CMakeLists.txt

* Fix checking of find_library vars

* Empty commit to check improved build times after caching

* Add qt base dev packages to cached CI packages
2025-10-31 13:14:00 +00:00

55 lines
1.2 KiB
Plaintext

autoload -Uz log_error log_status log_info mkcd
if (( ! ${+project_root} )) {
log_error "'project_root' not set. Please set before running ${0}."
return 2
}
if (( ! ${+target} )) {
log_error "'target' not set. Please set before running ${0}."
return 2
}
pushd ${project_root}
local -a apt_args=(
${CI:+-y}
--no-install-recommends
)
if (( _loglevel == 0 )) apt_args+=(--quiet)
if (( ! (${skips[(Ie)all]} + ${skips[(Ie)deps]}) )) {
log_group 'Installing obs-studio build dependencies...'
local suffix
if [[ ${CPUTYPE} != "${target##*-}" ]] {
local -A arch_mappings=(
aarch64 arm64
x86_64 amd64
)
suffix=":${arch_mappings[${target##*-}]}"
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
sudo apt-get install ${apt_args} \
build-essential \
libgles2-mesa-dev \
obs-studio
local -a _qt_packages=()
_qt_packages+=(
qt6-base-dev${suffix}
libqt6svg6-dev${suffix}
qt6-base-private-dev${suffix}
)
sudo apt-get install ${apt_args} ${_qt_packages}
log_group
}