android_builds.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. name: 🤖 Android Builds
  2. on:
  3. workflow_call:
  4. # Global Settings
  5. env:
  6. # Used for the cache key. Add version suffix to force clean build.
  7. GODOT_BASE_BRANCH: master
  8. SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes strict_checks=yes
  9. concurrency:
  10. group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-android
  11. cancel-in-progress: true
  12. jobs:
  13. build-android:
  14. runs-on: ubuntu-24.04
  15. name: ${{ matrix.name }}
  16. strategy:
  17. fail-fast: false
  18. matrix:
  19. include:
  20. - name: Editor (target=editor)
  21. cache-name: android-editor
  22. target: editor
  23. tests: false
  24. sconsflags: arch=arm64 production=yes swappy=yes
  25. - name: Template arm32 (target=template_release, arch=arm32)
  26. cache-name: android-template-arm32
  27. target: template_release
  28. tests: false
  29. sconsflags: arch=arm32 swappy=yes
  30. - name: Template arm64 (target=template_release, arch=arm64)
  31. cache-name: android-template-arm64
  32. target: template_release
  33. tests: false
  34. sconsflags: arch=arm64 swappy=yes
  35. steps:
  36. - name: Checkout
  37. uses: actions/checkout@v4
  38. with:
  39. submodules: recursive
  40. - name: Set up Java 17
  41. uses: actions/setup-java@v4
  42. with:
  43. distribution: temurin
  44. java-version: 17
  45. - name: Restore Godot build cache
  46. uses: ./.github/actions/godot-cache-restore
  47. with:
  48. cache-name: ${{ matrix.cache-name }}
  49. continue-on-error: true
  50. - name: Setup Python and SCons
  51. uses: ./.github/actions/godot-deps
  52. - name: Download pre-built Android Swappy Frame Pacing Library
  53. uses: dsaltares/fetch-gh-release-asset@1.1.2
  54. with:
  55. repo: darksylinc/godot-swappy
  56. version: tags/v2023.3.0.0
  57. file: godot-swappy.7z
  58. target: swappy/godot-swappy.7z
  59. - name: Extract pre-built Android Swappy Frame Pacing Library
  60. run: 7za x -y swappy/godot-swappy.7z -o${{github.workspace}}/thirdparty/swappy-frame-pacing
  61. - name: Compilation
  62. uses: ./.github/actions/godot-build
  63. with:
  64. sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
  65. platform: android
  66. target: ${{ matrix.target }}
  67. tests: ${{ matrix.tests }}
  68. - name: Save Godot build cache
  69. uses: ./.github/actions/godot-cache-save
  70. with:
  71. cache-name: ${{ matrix.cache-name }}
  72. continue-on-error: true
  73. - name: Generate Godot templates
  74. if: matrix.target == 'template_release'
  75. run: |
  76. cd platform/android/java
  77. ./gradlew generateGodotTemplates
  78. cd ../../..
  79. ls -l bin/
  80. - name: Generate Godot editor
  81. if: matrix.target == 'editor'
  82. run: |
  83. cd platform/android/java
  84. ./gradlew generateGodotEditor
  85. ./gradlew generateGodotHorizonOSEditor
  86. cd ../../..
  87. ls -l bin/android_editor_builds/
  88. - name: Upload artifact
  89. uses: ./.github/actions/upload-artifact
  90. with:
  91. name: ${{ matrix.cache-name }}