CI: Simplify build scripts for CI-only use

This commit is contained in:
PatTheMav 2023-07-06 04:38:17 +02:00 • committed by Ryan Foster
commit cf8a8cce72
23 changed files with 255 additions and 708 deletions

View file

@ -1,15 +1,8 @@
autoload -Uz log_debug log_warning log_error
if (( ! ${+project_root} )) {
log_error "'project_root' not set. Please set before running ${0}."
return 2
}
autoload -Uz log_debug log_warning
if (( ${+commands[ccache]} )) {
log_debug "Found ccache at ${commands[ccache]}"
typeset -gx CCACHE_CONFIGPATH="${project_root}/.ccache.conf"
ccache --set-config=run_second_cpp=true
ccache --set-config=direct_mode=true
ccache --set-config=inode_cache=true
@ -32,11 +25,9 @@ if (( ${+commands[ccache]} )) {
ccache --set-config=sloppiness=${(j:,:)sloppiness}
}
if (( ${+CI} )) {
ccache --set-config=cache_dir="${GITHUB_WORKSPACE:-${HOME}}/.ccache"
ccache --set-config=max_size="${CCACHE_SIZE:-1G}"
ccache -z > /dev/null
}
ccache --set-config=cache_dir="${GITHUB_WORKSPACE:-${HOME}}/.ccache"
ccache --set-config=max_size="${CCACHE_SIZE:-1G}"
ccache -z > /dev/null
} else {
log_warning "No ccache found on the system"
log_warning "Ccache not available"
}