From b7292dbd1252d159ee6f1c4f3c3c580bad599b6a Mon Sep 17 00:00:00 2001 From: hehetoshang Date: Wed, 31 Dec 2025 20:10:05 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=B7=BB=E5=8A=A0=20Rust=20=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=E7=BC=96=E8=AF=91=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加用于编译 client-rust 的 GitHub Actions 工作流,当 main 分支的 client-rust 代码变更时自动触发。工作流包含 Rust 工具链安装、交叉编译和二进制文件上传步骤。 --- .github/workflows/compile-client-rust.yml | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/compile-client-rust.yml diff --git a/.github/workflows/compile-client-rust.yml b/.github/workflows/compile-client-rust.yml new file mode 100644 index 0000000..8d89f96 --- /dev/null +++ b/.github/workflows/compile-client-rust.yml @@ -0,0 +1,41 @@ +name: Compile Client Rust + +on: + push: + branches: [ main ] + paths: + - 'packages/client-rust/**' + pull_request: + branches: [ main ] + paths: + - 'packages/client-rust/**' + +jobs: + compile: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + target: armv7-unknown-linux-gnueabihf + + - name: Install cross + run: cargo install cross + + - name: Compile client-rust + working-directory: packages/client-rust + run: cross build --release --target armv7-unknown-linux-gnueabihf + + - name: Upload compiled binary + uses: actions/upload-artifact@v4 + with: + name: client-rust-binary + path: packages/client-rust/target/armv7-unknown-linux-gnueabihf/release/client + retention-days: 7