From a5c3188686cc61c14cbd2043bfdb69e9601c7173 Mon Sep 17 00:00:00 2001 From: funman300 Date: Sun, 10 May 2026 19:18:46 -0700 Subject: [PATCH] ci(release): scope cargo apk build to --lib to avoid post-sign panic cargo-apk panics with "Bin is not compatible with Cdylib" after successfully signing the APK, when cargo-subcommand's artifact iterator walks the bin target after the cdylib has been produced. The APK file survives the panic on disk, but the non-zero exit fails the workflow step before the upload runs. Passing --lib scopes the build to the cdylib target only. SESSION_HANDOFF.md documented this as the canonical workaround. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b5b7957..597839c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,7 +126,13 @@ jobs: } >> solitaire_app/Cargo.toml - name: Build and sign APK (release profile) - run: cargo apk build -p solitaire_app --release + # `--lib` scopes cargo-apk to the cdylib target only. + # Without it, cargo-apk panics post-sign with + # "Bin is not compatible with Cdylib" (cargo-subcommand + # artifact iteration walks the bin target after the + # cdylib APK is already produced). See SESSION_HANDOFF.md + # "Cosmetic cargo apk build --lib workaround." + run: cargo apk build -p solitaire_app --lib --release - name: Stage APK for upload run: |