Skip to content

Commit

Permalink
Trick Github into compiling MacOS for me
Browse files Browse the repository at this point in the history
  • Loading branch information
MewPurPur committed Jun 5, 2024
1 parent 7ebb6d2 commit 9c55645
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/export-macos-debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: export-optimized

on:
push:

env:
GODOT_VERSION: 4.2.2
PROJECT_NAME: GodSVG
GODOT_REPO: https://github.com/godotengine/godot.git
GODOT_COMMIT_HASH: 15073af
BUILD_OPTIONS: target=template_debug lto=full production=yes deprecated=no minizip=no brotli=no vulkan=no openxr=no use_volk=no disable_3d=yes modules_enabled_by_default=no module_freetype_enabled=yes module_gdscript_enabled=yes module_svg_enabled=yes module_jpg_enabled=yes module_text_server_adv_enabled=yes graphite=no module_webp_enabled=yes

jobs:
build-macos:
name: Export GodSVG for MacOS
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install dependencies
run: brew install scons

- name: Clone Godot repository
run: git clone $GODOT_REPO godot

- name: Checkout specific commit
run: |
cd godot
git fetch
git checkout $GODOT_COMMIT_HASH
- name: Build Godot template for macOS (arm64 release)
run: |
cd godot
scons p=macos arch=arm64 optimize=speed ${BUILD_OPTIONS}
- name: Build Godot template for macOS (x86_64 release)
run: |
cd godot
scons p=macos arch=x86_64 optimize=speed ${BUILD_OPTIONS}
- name: Combine binaries with lipo
run: |
cd godot/bin
lipo -create godot.macos.template_debug.x86_64 godot.macos.template_debug.arm64 -output godot.macos.template_debug.universal
chmod +x *
- name: Prepare .app bundle
run: |
cd godot/bin
cp -R ../misc/dist/macos_template.app .
mkdir -p macos_template.app/Contents/MacOS
cp godot.macos.template_debug.universal macos_template.app/Contents/MacOS/godot_macos_debug.universal;
chmod +x macos_template.app/Contents/MacOS/godot_macos*;
zip -q -9 -r godot_template_macos.zip macos_template.app;
- name: Upload macOS template
uses: actions/upload-artifact@v3
with:
name: godot_template_macos.zip
path: godot/bin/godot_template_macos.zip
if-no-files-found: error
retention-days: 1

0 comments on commit 9c55645

Please sign in to comment.