安装发布构建所需 Rust 目标
Some checks failed
发布 Linux 二进制 / release-linux-x86_64 (push) Failing after 3m8s

This commit is contained in:
2026-05-25 17:59:17 +08:00
parent a97ec39a1c
commit 61e7800b51
2 changed files with 6 additions and 0 deletions

View File

@@ -125,6 +125,9 @@ if [[ "$SKIP_BUILD" != "true" ]]; then
log "构建 Rust 二进制"
cd "$ROOT"
if [[ -n "$TARGET" ]]; then
if command -v rustup >/dev/null 2>&1; then
rustup target add "$TARGET"
fi
cargo build --release --target "$TARGET" -p lightops-server -p lightops-agent
BIN_DIR="target/${TARGET}/release"
else