ci(music): cargo clean -p 强制每次 link,act_runner workdir 复用导致 main.rs 改动不生效
deploy music / build-and-deploy (push) Successful in 1m46s

This commit is contained in:
Fam Zheng
2026-05-10 15:18:16 +01:00
parent fd80116168
commit 9640abe102
+8
View File
@@ -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: |