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 <noreply@anthropic.com>
This commit is contained in:
@@ -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: |
|
||||
|
||||
Reference in New Issue
Block a user