* Only commit libsoulamz when input hash changes. CI compared binary diffs, so non-deterministic Go rebuilds kept bot-committing identical-size .so files. Compare soulamz.inputs instead, commit inputs plus force-added libs when native/soulamz changes. Add Go and NDK on CI so prebuilts can be rebuilt when lib/ is absent. Co-authored-by: Cursor <cursoragent@cursor.com> * Gitignore bundled-warp lib prebuilts. Local soulamz rebuilds are non-deterministic; keep only soulamz.inputs tracked. CI still force-adds lib/ when inputs change. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
746 B
Bash
Executable file
30 lines
746 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Hash soulamz build inputs; skip rebuild when sources and build script are unchanged.
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
INPUTS_FILE="${ROOT_DIR}/bundled-warp/soulamz.inputs"
|
|
|
|
soulamz_stamp_hash() {
|
|
sha256sum \
|
|
"${ROOT_DIR}/native/soulamz/main.go" \
|
|
"${ROOT_DIR}/native/soulamz/go.mod" \
|
|
"${ROOT_DIR}/native/soulamz/go.sum" \
|
|
"${ROOT_DIR}/scripts/build-soulamz.sh" \
|
|
| sha256sum | awk '{print $1}'
|
|
}
|
|
|
|
case "${1:-hash}" in
|
|
hash)
|
|
soulamz_stamp_hash
|
|
;;
|
|
write)
|
|
mkdir -p "$(dirname "${INPUTS_FILE}")"
|
|
soulamz_stamp_hash > "${INPUTS_FILE}"
|
|
echo "Wrote ${INPUTS_FILE}"
|
|
;;
|
|
*)
|
|
echo "usage: $0 [hash|write]" >&2
|
|
exit 1
|
|
;;
|
|
esac
|