macos_builds.yml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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: master
  8. SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes strict_checks=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, tests=yes)
  26. cache-name: macos-template
  27. target: template_release
  28. tests: true
  29. sconsflags: debug_symbols=no
  30. bin: ./bin/godot.macos.template_release.universal
  31. steps:
  32. - name: Checkout
  33. uses: actions/checkout@v4
  34. with:
  35. submodules: recursive
  36. - name: Restore Godot build cache
  37. uses: ./.github/actions/godot-cache-restore
  38. with:
  39. cache-name: ${{ matrix.cache-name }}
  40. continue-on-error: true
  41. - name: Setup Python and SCons
  42. uses: ./.github/actions/godot-deps
  43. - name: Setup Vulkan SDK
  44. run: |
  45. sh misc/scripts/install_vulkan_sdk_macos.sh
  46. - name: Compilation (x86_64)
  47. uses: ./.github/actions/godot-build
  48. with:
  49. sconsflags: ${{ env.SCONSFLAGS }} arch=x86_64
  50. platform: macos
  51. target: ${{ matrix.target }}
  52. tests: ${{ matrix.tests }}
  53. - name: Compilation (arm64)
  54. uses: ./.github/actions/godot-build
  55. with:
  56. sconsflags: ${{ env.SCONSFLAGS }} arch=arm64
  57. platform: macos
  58. target: ${{ matrix.target }}
  59. tests: ${{ matrix.tests }}
  60. - name: Save Godot build cache
  61. uses: ./.github/actions/godot-cache-save
  62. with:
  63. cache-name: ${{ matrix.cache-name }}
  64. continue-on-error: true
  65. - name: Prepare artifact
  66. run: |
  67. lipo -create ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64 -output ./bin/godot.macos.${{ matrix.target }}.universal
  68. rm ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64
  69. strip bin/godot.*
  70. chmod +x bin/godot.*
  71. - name: Upload artifact
  72. uses: ./.github/actions/upload-artifact
  73. with:
  74. name: ${{ matrix.cache-name }}
  75. - name: Unit tests
  76. if: matrix.tests
  77. run: |
  78. ${{ matrix.bin }} --version
  79. ${{ matrix.bin }} --help
  80. ${{ matrix.bin }} --test --force-colors