mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-02-25 06:33:22 +03:00
Android: Clean build folder at some intermediate steps to reduce disk usage
With debug symbols, the full Android build can take around 100G currently.
This commit is contained in:
@@ -11,11 +11,14 @@ export OPTIONS="production=yes debug_symbols=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export TERM=xterm
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
cp -rf /root/swappy/* thirdparty/swappy-frame-pacing/
|
||||
prepare_source() {
|
||||
cd /root
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
cp -rf /root/swappy/* thirdparty/swappy-frame-pacing/
|
||||
}
|
||||
|
||||
# Environment variables and keystore needed for signing store editor build,
|
||||
# as well as signing and publishing to MavenCentral.
|
||||
@@ -32,6 +35,8 @@ fi
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Android..."
|
||||
|
||||
prepare_source
|
||||
|
||||
$SCONS platform=android arch=arm32 $OPTIONS target=editor store_release=${store_release}
|
||||
$SCONS platform=android arch=arm64 $OPTIONS target=editor store_release=${store_release}
|
||||
$SCONS platform=android arch=x86_32 $OPTIONS target=editor store_release=${store_release}
|
||||
@@ -47,6 +52,7 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
popd
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
|
||||
# Copy the generated Android editor binaries (apk & aab).
|
||||
if [ "$store_release" == "yes" ]; then
|
||||
cp bin/android_editor_builds/android-editor-android-release-native-debug-symbols.zip /root/out/tools/android_editor_native_debug_symbols.zip
|
||||
@@ -74,6 +80,8 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
|
||||
# Template builds
|
||||
|
||||
prepare_source
|
||||
|
||||
$SCONS platform=android arch=arm32 $OPTIONS target=template_debug
|
||||
$SCONS platform=android arch=arm32 $OPTIONS target=template_release
|
||||
|
||||
@@ -112,6 +120,8 @@ fi
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for Android..."
|
||||
|
||||
prepare_source
|
||||
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
|
||||
$SCONS platform=android arch=arm32 $OPTIONS $OPTIONS_MONO target=template_debug
|
||||
|
||||
2
build.sh
2
build.sh
@@ -278,3 +278,5 @@ if [ ! -z "$SUDO_UID" ]; then
|
||||
gid="${SUDO_GID}"
|
||||
fi
|
||||
chown -R -f $uid:$gid ${basedir}/git ${basedir}/out ${basedir}/mono-glue ${basedir}/godot*.tar.gz
|
||||
|
||||
echo "All builds completed. Check `out/logs/` to validate that they all succeeded (e.g. `tail -n 1 out/logs/*`)."
|
||||
|
||||
Reference in New Issue
Block a user