Open mipastgt opened 3 years ago
Just for comparison. I have now built the Android version on a cloud server at Hetzner. The build succeeded within 3 minutes.
[Tue Jul 27 17:45:26 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] (clinit): 1,322.01 ms, 7.05 GB
[Tue Jul 27 17:45:26 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] (typeflow): 16,207.36 ms, 7.05 GB
[Tue Jul 27 17:45:26 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] (objects): 52,131.35 ms, 7.05 GB
[Tue Jul 27 17:45:26 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] (features): 3,424.43 ms, 7.05 GB
[Tue Jul 27 17:45:26 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] analysis: 75,722.58 ms, 7.05 GB
[Tue Jul 27 17:45:50 CEST 2021][INFO] [SUB] # Printing call tree to: /home/mpaus/builds/mpCoPilotApps/mpCoPilot-main-mobile/target/gluonfx/aarch64-android/gvm/mpCoPilotApp2/reports/call_tree_de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2_20210727_174550.txt
[Tue Jul 27 17:45:57 CEST 2021][INFO] [SUB] # Printing list of used methods to: /home/mpaus/builds/mpCoPilotApps/mpCoPilot-main-mobile/target/gluonfx/aarch64-android/gvm/mpCoPilotApp2/reports/used_methods_de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2_20210727_174557.txt
[Tue Jul 27 17:45:57 CEST 2021][INFO] [SUB] # Printing list of used classes to: /home/mpaus/builds/mpCoPilotApps/mpCoPilot-main-mobile/target/gluonfx/aarch64-android/gvm/mpCoPilotApp2/reports/used_classes_de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2_20210727_174557.txt
[Tue Jul 27 17:45:58 CEST 2021][INFO] [SUB] # Printing list of used packages to: /home/mpaus/builds/mpCoPilotApps/mpCoPilot-main-mobile/target/gluonfx/aarch64-android/gvm/mpCoPilotApp2/reports/used_packages_de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2_20210727_174558.txt
[Tue Jul 27 17:46:00 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] universe: 2,736.90 ms, 7.03 GB
[Tue Jul 27 17:46:07 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] (parse): 5,990.94 ms, 8.58 GB
[Tue Jul 27 17:46:12 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] (inline): 4,368.28 ms, 7.89 GB
[Tue Jul 27 17:46:36 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] (compile): 24,759.15 ms, 8.08 GB
[Tue Jul 27 17:46:39 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] compile: 38,089.26 ms, 8.08 GB
[Tue Jul 27 17:46:49 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] image: 10,553.15 ms, 8.20 GB
[Tue Jul 27 17:46:50 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] write: 580.43 ms, 8.20 GB
[Tue Jul 27 17:46:50 CEST 2021][INFO] [SUB] [de.mpmediasoft.mpcopilot.main.mobile.gui.main.mpcopilotapp2:1242] [total]: 164,368.96 ms, 8.20 GB
Making it possible to build for Android from macOS would also solve the GitHub action memory problem because according to supported-runners-and-hardware-resources a macOS GitHub runner gets 14 GB of RAM (instead of the 7 GB for Linux) which should be enough for most projects.
This build is working with the new GraalVM GitHub Action runner: https://github.com/FDelporte/JavaMagazineFXGL/blob/native/.github/workflows/maven-ubuntu-android.yml
I've modified my whole build process to use GitHub Actions to build all artifacts but building a mobile version of my software for Android fails. First the whole build is awfully slow. Locally on macOS it just takes 3 minutes but on the GitHub runner (Ubuntu -> Android) it takes 45 minutes until it fails with an OutOfMemoryError. Due to earlier experience I'd say the slowness is also due to the too tight memory constraints. According to the documentation a Linux runner has only 7 GB of memory and I'd say this is not enough to build any serious application with JavaFX for Android.
Is there any workaround or solution to this problem besides using a self hosted runner? Maybe the native-image memory limit could be increased because it does not seem to use all of the 7 GB which are available.
(Things would be much easier if I could just build for Android from my macOS development machine.)