diff --git a/.gitea/workflows/build-and-test.yml b/.gitea/workflows/build-and-test.yml index cf6cb29..467fa17 100644 --- a/.gitea/workflows/build-and-test.yml +++ b/.gitea/workflows/build-and-test.yml @@ -117,7 +117,18 @@ jobs: CARGO_TARGET_DIR: target-android run: | set -e - cargo ndk -t arm64-v8a build -p dr-gpu --release + # `darkroom-android`, not a core crate: this step reads the API level + # out of a *linked* object, and only that crate produces one. It is + # the workspace's single `crate-type = ["cdylib"]`; a library crate + # builds an rlib, which is an archive of object files that no linker + # has yet touched and that `file` therefore has nothing to say about. + # Asking for `-p dr-gpu` here could only ever reach the "no aarch64 + # .so was produced" branch below, whatever the linker did. + # + # It is also the honest artefact to check: the .so this names is the + # one that ships in the APK, so the API level verified here is the + # API level a device will refuse to install against. + cargo ndk -t arm64-v8a build -p darkroom-android --release MIN_API=$(sed -n 's/^ARG MIN_API=\([0-9]*\).*/\1/p' docker/android/Dockerfile) # Empty on both sides would compare equal and pass, so neither side # is allowed to be the result of a failed parse.