Compare commits

..

2 Commits

Author SHA1 Message Date
MickLesk f3f39ba3e5 fix(caddy): skip the xCaddy test build below 2 GB RAM
The container defaults to 512 MB (256 MB on Alpine), and Go's linker was
killed in xcaddy build: 14 runs on 6 hosts in a week. The build only
produced an unused binary, so below 2 GB xCaddy is installed without it
and a warning says why; install and update alike.
2026-11-05 13:04:10 +01:00
community-scripts-pr-app[bot] 215f9be228 Update CHANGELOG.md (#18468)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-05 10:57:03 +00:00
2 changed files with 22 additions and 10 deletions
+7 -3
View File
@@ -55,9 +55,13 @@ update_deb_based() {
setup_go
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
msg_info "Updating xCaddy"
$STD xcaddy build
msg_ok "Updated xCaddy"
if (($(awk '/^MemTotal:/ {print int($2 / 1024)}' /proc/meminfo) < 1900)); then
msg_warn "xCaddy updated; its test build was skipped because linking Caddy needs about 2 GB RAM"
else
msg_info "Updating xCaddy"
$STD xcaddy build
msg_ok "Updated xCaddy"
fi
fi
fi
msg_ok "Updated successfully!"
+15 -7
View File
@@ -23,10 +23,14 @@ setup_deb_based() {
setup_go
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
msg_info "Setup xCaddy"
$STD apt install -y git
$STD xcaddy build
msg_ok "Setup xCaddy"
if (($(awk '/^MemTotal:/ {print int($2 / 1024)}' /proc/meminfo) < 1900)); then
msg_warn "xCaddy is installed; its test build was skipped because linking Caddy needs about 2 GB RAM"
else
msg_info "Setup xCaddy"
$STD xcaddy build
msg_ok "Setup xCaddy"
fi
fi
}
@@ -69,10 +73,14 @@ EOF
GO_VERSION="$(curl -fsSL https://go.dev/VERSION?m=text | head -1 | cut -c3-)" setup_go
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "prebuild" "latest" "/opt/xcaddy" "xcaddy_*_linux_$(arch_resolve).tar.gz"
ln -sf /opt/xcaddy/xcaddy /usr/local/bin/xcaddy
msg_info "Setup xCaddy"
cd /opt
$STD xcaddy build
msg_ok "Setup xCaddy"
if (($(awk '/^MemTotal:/ {print int($2 / 1024)}' /proc/meminfo) < 1900)); then
msg_warn "xCaddy is installed; its test build was skipped because linking Caddy needs about 2 GB RAM"
else
msg_info "Setup xCaddy"
cd /opt
$STD xcaddy build
msg_ok "Setup xCaddy"
fi
fi
msg_info "Enabling Caddy Service"