Fix VICE cross-compile and image cache-warming for release builds
release / build (push) Successful in 5m34s
release / build (push) Successful in 5m34s
build-image/Dockerfile: add bison (VICE's configure needs a yacc-compatible parser generator, same category as the earlier flex fix) and exclude packageRelease/signReleaseBundle from the cache-warm stage's gradlew run, since those always fail there for lack of a keystore that's never baked into the image. vice_jni.c: guard getFrameCount()/setSoundEnabled() with #ifdef HAVE_VICE_SRC like their sibling functions already do — they referenced globals that only exist when VICE is linked in, breaking the documented no-VICE placeholder build. Only surfaced now because the cache-warm stage is the first thing to ever compile this file without VICE. dist.sh: floor the untagged dev-build's versionCode at 1, since the 0.0.0-dev+<sha> placeholder otherwise computes to 0, which Android's Gradle plugin rejects. run-image.sh: wipe generated build artifacts (vice-src, vice-libs, nibtools-src/libs, app/build, .cxx) before each run so it exercises a true from-scratch build like CI does, instead of silently reusing artifacts left over from a previous local run. Also chown the bind-mounted repo back to the host user on exit, since the container runs as root and was otherwise leaving root-owned files behind.
This commit is contained in:
@@ -74,6 +74,9 @@ fi
|
||||
[[ "$VERSION" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]] \
|
||||
|| fail "VERSION '$VERSION' is not a semantic version (expected X.Y.Z, optionally with a -pre+meta suffix)"
|
||||
VERSION_CODE=$(( ${BASH_REMATCH[1]} * 10000 + ${BASH_REMATCH[2]} * 100 + ${BASH_REMATCH[3]} ))
|
||||
# Android requires a positive versionCode — the untagged dev placeholder
|
||||
# (0.0.0-dev+<sha>) would otherwise compute to 0 and fail Gradle configuration.
|
||||
[ "$VERSION_CODE" -gt 0 ] || VERSION_CODE=1
|
||||
echo "Version: $VERSION (Android versionCode $VERSION_CODE)"
|
||||
|
||||
# Patch versions into the tracked source files for this build only, then
|
||||
|
||||
Reference in New Issue
Block a user