Skip to content

Commit

Permalink
Build native for Arm Macs
Browse files Browse the repository at this point in the history
Many thanks to all who helped - timotheecour, ringabout, tatsushid :)
  • Loading branch information
bovine3dom committed Jun 16, 2023
1 parent 013fb26 commit 0263362
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
shell: bash
if: runner.os == 'Windows'
- run: |
sudo apt-get install gcc-arm-linux-gnueabihf
nimble build -d:debug -Y --cpu:arm
Expand All @@ -49,14 +48,20 @@ jobs:
- run: nimble build -d:debug -Y --verbose


- run: |
mv native_main.exe native_main
shell: bash
if: runner.os == 'Windows'
- run: |
mv native_main native_main-x86
nimble build --verbose -d:debug -Y '--passC:"-target arm64-apple-macos11"' '--passL:"-target arm64-apple-macos11"'
mv native_main native_main-arm64
lipo -create -output native_main native_main-x86 native_main-arm64
if: runner.os == 'macOS'
# - run: nimble test -Y

- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ jobs:
shell: bash
if: runner.os == 'Windows'
- run: |
mv native_main native_main-x86
nimble build --verbose -d:danger -d:release --opt:speed -Y '--passC:"-target arm64-apple-macos11"' '--passL:"-target arm64-apple-macos11"'
mv native_main native_main-arm64
lipo -create -output native_main native_main-x86 native_main-arm64
if: runner.os == 'macOS'
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
Expand Down

0 comments on commit 0263362

Please sign in to comment.