diff --git a/.github/workflows/macos_export.yml b/.github/workflows/macos_export.yml new file mode 100644 index 0000000..814f4fc --- /dev/null +++ b/.github/workflows/macos_export.yml @@ -0,0 +1,47 @@ +name: MacOS Export + +on: [push] + +env: + CARGO_TERM_COLOR: always + RUSTFLAGS: -Dwarnings + CARGO_INCREMENTAL: 0 + +jobs: + export-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + - uses: rui314/setup-mold@v1 + - uses: chickensoft-games/setup-godot@v1 + name: Setup Godot + with: + version: 4.2.2 + include-templates: true + use-dotnet: false + - uses: Swatinem/rust-cache@v2 + with: + workspaces: "rust -> target" + cache-all-crates: "true" + + - name: Install just + run: cargo install just + + - name: just Check + run: just --version + + - name: Godot Check + run: | + godot --version + + - name: Godot Export + run: | + set -x + touch godot/.godot/extension_list.cfg + echo "res://rust.gdextension" >> godot/.godot/extension_list.cfg + just macos-release diff --git a/export/macos/.gitkeep b/export/macos/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/godot/rust.gdextension b/godot/rust.gdextension index bc7aa54..af49c2b 100644 --- a/godot/rust.gdextension +++ b/godot/rust.gdextension @@ -12,3 +12,5 @@ android.debug.arm64 = "res://../rust/target/aarch64-linux-android/debug/libgo android.release.arm64 = "res://../rust/target/aarch64-linux-android/release/libgodot_plugin.so" windows.debug.x86_64 = "res://../rust/target/x86_64-pc-windows-msvc/debug/godot_plugin.dll" windows.release.x86_64 = "res://../rust/target/x86_64-pc-windows-msvc/release/godot_plugin.dll" +macos.debug.arm64 = "res://../rust/target/debug/libgodot_plugin.dylib" +macos.release.arm64 = "res://../rust/target/release/libgodot_plugin.dylib" diff --git a/justfile b/justfile index e30eb0a..2481e90 100644 --- a/justfile +++ b/justfile @@ -56,13 +56,15 @@ windows-release: [macos] macos-debug: - {{rustdir}} cargo build + {{rustdir}} cargo build + ls rust/target/debug/ {{godotdir}} godot --headless --export-debug "macOS" "../export/macos/Godot Spike.dmg" [macos] macos-release: - {{rustdir}} cargo build --release - {{godotdir}} godot --headless --export-release "macOS" "../export/macos/Godot Spike.dmg" + {{rustdir}} cargo build + {{rustdir}} cargo build --release + {{godotdir}} godot --headless --export-release "macOS" "../export/macos/Godot Spike.dmg" [macos] ios-debug: