Skip to content

Commit

Permalink
Merge pull request #4 from GsLogiMaker/feature/mac-arm-build
Browse files Browse the repository at this point in the history
Add macos arm to build process
  • Loading branch information
GsLogiMaker authored May 20, 2024
2 parents 9e9b094 + 5ecfa9a commit f4cbc7c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
os: ubuntu-latest
glecs_lib: libglecs.so
# Mac
- target: aarch64-apple-darwin
os: macos-latest
glecs_lib: libglecs.dylib
- target: x86_64-apple-darwin
os: macos-latest
glecs_lib: libglecs.dylib
Expand All @@ -31,9 +34,13 @@ jobs:
glecs_lib: glecs.dll
runs-on: ${{ matrix.os }}
outputs:
# Linux
x86_64-linux_lib_cache_key: ${{ steps.set_cache_key.outputs.x86_64-unknown-linux-gnu_lib_cache_key }}
i686-linux_lib_cache_key: ${{ steps.set_cache_key.outputs.i686-unknown-linux-gnu_lib_cache_key }}
x86_64-mac_lib_cache_key: ${{ steps.set_cache_key.outputs.x86_64-apple-darwin_lib_cache_key }}
# Mac
aarch64-mac_lib_cache_key: ${{ steps.set_cache_key.outputs.x86_64-apple-darwin_lib_cache_key }}
x86_64-mac_lib_cache_key: ${{ steps.set_cache_key.outputs.aarch64-apple-darwin_lib_cache_key }}
# Windows
x86_64-windows_lib_cache_key: ${{ steps.set_cache_key.outputs.x86_64-pc-windows-gnu_lib_cache_key }}
steps:
- name: 🐙 Settup git environment
Expand Down Expand Up @@ -167,6 +174,16 @@ jobs:
# An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms
enableCrossOsArchive: true

- name: 🍎 Load compiled library, Mac aarch64
uses: actions/cache/[email protected]
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: ./addons/glecs/bin/aarch64-apple-darwin/release/libglecs.dylib
# An explicit key for restoring and saving the cache
key: ${{ needs.compile_glecs.outputs.aarch64-mac_lib_cache_key }}
# An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms
enableCrossOsArchive: true

- name: 🍎 Load compiled library, Mac x86_64
uses: actions/cache/[email protected]
with:
Expand Down
6 changes: 3 additions & 3 deletions addons/glecs/glecs.gdextension.release
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ linux.debug.x86_64 = "./bin/x86_64-unknown-linux-gnu/release/libglecs.so"
windows.release.x86_64 = "./bin/x86_64-pc-windows-gnu/release/glecs.dll"
windows.debug.x86_64 = "./bin/x86_64-pc-windows-gnu/release/glecs.dll"

macos.release.arm64 = "./bin/aarch64-apple-darwin/release/libglecs.dylib"
macos.debug.arm64 = "./bin/aarch64-apple-darwin/release/libglecs.dylib"
macos.release.x86_64 = "./bin/x86_64-apple-darwin/release/libglecs.dylib"
macos.debug.x86_64 = "./bin/x86_64-apple-darwin/release/libglecs.dylib"
macos.release.arm64 = "./bin/x86_64-apple-darwin/release/libglecs.dylib"
macos.debug.arm64 = "./bin/x86_64-apple-darwin/release/libglecs.dylib"
macos.debug.x86_64 = "./bin/x86_64-apple-darwin/release/libglecs.dylib"

0 comments on commit f4cbc7c

Please sign in to comment.