1
0
forked from Eeveid/lightOps

安装发布构建所需 Rust 目标

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

@@ -77,6 +77,9 @@ jobs:
fi fi
rustc -V rustc -V
cargo -V cargo -V
if command -v rustup >/dev/null 2>&1; then
rustup target add x86_64-unknown-linux-gnu
fi
- name: 构建发布包 - name: 构建发布包
run: | run: |

View File

@@ -125,6 +125,9 @@ if [[ "$SKIP_BUILD" != "true" ]]; then
log "构建 Rust 二进制" log "构建 Rust 二进制"
cd "$ROOT" cd "$ROOT"
if [[ -n "$TARGET" ]]; then 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 cargo build --release --target "$TARGET" -p lightops-server -p lightops-agent
BIN_DIR="target/${TARGET}/release" BIN_DIR="target/${TARGET}/release"
else else