CI: Update Linux build scripts to use CMake presets
Also adds source package generation and updates Cirrus CI script.
This commit is contained in:
parent
53c9f79f4d
commit
fb4d65875e
18 changed files with 97 additions and 738 deletions
45
.github/scripts/utils.zsh/check_linux
vendored
45
.github/scripts/utils.zsh/check_linux
vendored
|
|
@ -1,45 +0,0 @@
|
|||
autoload -Uz log_debug log_group
|
||||
|
||||
log_group 'Check Linux build requirements'
|
||||
log_debug 'Checking Linux distribution name and version...'
|
||||
|
||||
# Check for Ubuntu version 22.10 or later, which have srt and librist available via apt-get
|
||||
typeset -g -i UBUNTU_2210_OR_LATER=0
|
||||
if [[ -f /etc/os_release ]] {
|
||||
local dist_name
|
||||
local dist_version
|
||||
read -r dist_name dist_version <<< "$(source /etc/os_release; print "${NAME} ${VERSION_ID}")"
|
||||
|
||||
autoload -Uz is-at-least
|
||||
if [[ ${dist_name} == Ubuntu ]] && is-at-least 22.10 ${dist_version}; then
|
||||
typeset -g -i UBUNTU_2210_OR_LATER=1
|
||||
fi
|
||||
}
|
||||
|
||||
local -a dependencies=("${(fA)$(<${SCRIPT_HOME}/.Aptfile)}")
|
||||
local -a install_list
|
||||
local binary
|
||||
|
||||
sudo apt-get update -qq
|
||||
|
||||
for dependency (${dependencies}) {
|
||||
local -a tokens=(${=dependency//(,|:|\')/})
|
||||
|
||||
if [[ ! ${tokens[1]} == package ]] continue
|
||||
|
||||
if [[ ${#tokens} -gt 2 && ${tokens[3]} == bin ]] {
|
||||
binary=${tokens[4]}
|
||||
} else {
|
||||
binary=${tokens[2]}
|
||||
}
|
||||
|
||||
if (( ! ${+commands[${binary}]} )) install_list+=(${tokens[2]})
|
||||
}
|
||||
|
||||
log_debug "List of dependencies to install: ${install_list}"
|
||||
if (( #install_list )) {
|
||||
sudo apt-get -y --no-install-recommends install ${install_list}
|
||||
}
|
||||
|
||||
rehash
|
||||
log_group
|
||||
Loading…
Add table
Add a link
Reference in a new issue