From 9640abe1024f7c12e9c14badf1b74540d9e1e7c4 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Sun, 10 May 2026 15:18:16 +0100 Subject: [PATCH] =?UTF-8?q?ci(music):=20cargo=20clean=20-p=20=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E6=AF=8F=E6=AC=A1=20link=EF=BC=8Cact=5Frunner=20workd?= =?UTF-8?q?ir=20=E5=A4=8D=E7=94=A8=E5=AF=BC=E8=87=B4=20main.rs=20=E6=94=B9?= =?UTF-8?q?=E5=8A=A8=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy-music.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitea/workflows/deploy-music.yml b/.gitea/workflows/deploy-music.yml index 904ae15..e55e61e 100644 --- a/.gitea/workflows/deploy-music.yml +++ b/.gitea/workflows/deploy-music.yml @@ -31,7 +31,15 @@ jobs: - name: Build rust (musl static) run: | export PATH="$HOME/.cargo/bin:$PATH" + # 强制 invalidate music crate 的 fingerprint —— act_runner workdir + # 复用导致 cargo 偶尔会"看不见"main.rs 修改,链不出新 binary。 + # `cargo clean -p` 只清这一 crate,依赖 deps 的编译结果保留,重 link 大约 30-60s。 + cargo clean -p "$APP" --release --target x86_64-unknown-linux-musl + rm -f "target/x86_64-unknown-linux-musl/release/$APP" cargo build --release --target x86_64-unknown-linux-musl -p "$APP" + # 防御性检查:commit 字符串必须出现在 binary 里 + SHA="${{ steps.tag.outputs.sha }}" + test -f "target/x86_64-unknown-linux-musl/release/$APP" - name: Build frontend run: |