macos_builds.yml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. name: 🍎 macOS 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: 4.3
  8. SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
  9. concurrency:
  10. group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macos
  11. cancel-in-progress: true
  12. jobs:
  13. build-macos:
  14. runs-on: "macos-latest"
  15. name: ${{ matrix.name }}
  16. strategy:
  17. fail-fast: false
  18. matrix:
  19. include:
  20. - name: Editor (target=editor, tests=yes)
  21. cache-name: macos-editor
  22. target: editor
  23. tests: true
  24. bin: "./bin/godot.macos.editor.universal"
  25. - name: Template (target=template_release)
  26. cache-name: macos-template
  27. target: template_release
  28. tests: true
  29. sconsflags: debug_symbols=no tests=yes
  30. bin: "./bin/godot.macos.template_release.universal"
  31. steps:
  32. - uses: actions/checkout@v4
  33. with:
  34. submodules: recursive
  35. - name: Restore Godot build cache
  36. uses: ./.github/actions/godot-cache-restore
  37. with:
  38. cache-name: ${{ matrix.cache-name }}
  39. continue-on-error: true
  40. - name: Setup Python and SCons
  41. uses: ./.github/actions/godot-deps
  42. - name: Setup Vulkan SDK
  43. run: |
  44. sh misc/scripts/install_vulkan_sdk_macos.sh
  45. - name: Compilation (x86_64)
  46. uses: ./.github/actions/godot-build
  47. with:
  48. sconsflags: ${{ env.SCONSFLAGS }} arch=x86_64
  49. platform: macos
  50. target: ${{ matrix.target }}
  51. tests: ${{ matrix.tests }}
  52. - name: Compilation (arm64)
  53. uses: ./.github/actions/godot-build
  54. with:
  55. sconsflags: ${{ env.SCONSFLAGS }} arch=arm64
  56. platform: macos
  57. target: ${{ matrix.target }}
  58. tests: ${{ matrix.tests }}
  59. - name: Save Godot build cache
  60. uses: ./.github/actions/godot-cache-save
  61. with:
  62. cache-name: ${{ matrix.cache-name }}
  63. continue-on-error: true
  64. - name: Prepare artifact
  65. run: |
  66. lipo -create ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64 -output ./bin/godot.macos.${{ matrix.target }}.universal
  67. rm ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64
  68. strip bin/godot.*
  69. chmod +x bin/godot.*
  70. - name: Upload artifact
  71. uses: ./.github/actions/upload-artifact
  72. with:
  73. name: ${{ matrix.cache-name }}
  74. - name: Unit tests
  75. if: ${{ matrix.tests }}
  76. run: |
  77. ${{ matrix.bin }} --version
  78. ${{ matrix.bin }} --help
  79. ${{ matrix.bin }} --test --force-colors