From f92c1a6f4317f06fbe13551ac8de0e884a7d26f9 Mon Sep 17 00:00:00 2001 From: kdletters Date: Wed, 22 Jul 2026 16:01:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=B3=E5=AE=9AAI=E5=88=86=E6=94=AFCargo?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E5=87=86=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在后端测试前有界重试server-rs依赖fetch 在原生门禁前分别准备桌面壳和AI壳Rust依赖 保持测试与编译命令单次执行并继续暴露真实失败 --- .gitea/workflows/project-ci.yml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.gitea/workflows/project-ci.yml b/.gitea/workflows/project-ci.yml index 304fd7c47..714491747 100644 --- a/.gitea/workflows/project-ci.yml +++ b/.gitea/workflows/project-ci.yml @@ -152,6 +152,23 @@ jobs: - name: Check server-rs boundaries run: npm run check:server-rs-ddd + - name: Prepare server-rs Rust dependencies + shell: bash + run: | + set -euo pipefail + for attempt in $(seq 1 5); do + if cargo fetch --locked \ + --target x86_64-unknown-linux-gnu \ + --manifest-path server-rs/Cargo.toml; then + break + fi + if [[ "${attempt}" -eq 5 ]]; then + echo 'server-rs Cargo dependency fetch failed after 5 attempts.' >&2 + exit 1 + fi + sleep $((attempt * 2)) + done + - name: Run server-rs workspace tests run: cargo test --locked --workspace --no-fail-fast --manifest-path server-rs/Cargo.toml @@ -180,6 +197,27 @@ jobs: - name: Install AI game creator dependencies run: npm ci --prefix apps/ai-game-creator-shell + - name: Prepare native Rust dependencies + shell: bash + run: | + set -euo pipefail + for manifest_path in \ + apps/desktop-shell/src-tauri/Cargo.toml \ + apps/ai-game-creator-shell/src-tauri/Cargo.toml; do + for attempt in $(seq 1 5); do + if cargo fetch --locked \ + --target x86_64-unknown-linux-gnu \ + --manifest-path "${manifest_path}"; then + break + fi + if [[ "${attempt}" -eq 5 ]]; then + echo "Cargo dependency fetch failed after 5 attempts: ${manifest_path}" >&2 + exit 1 + fi + sleep $((attempt * 2)) + done + done + - name: Run native shell gates run: npm run check:native-shells