Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Universal Binary for MacOS on M1 #450

Merged
merged 8 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,29 @@ jobs:

- name: Build Release
run: cargo build --release


- name: Build aarch64 for MacOS
if: ${{ runner.os == 'macOS' }}
run: |
rustup target add aarch64-apple-darwin
cargo build --release --target aarch64-apple-darwin

- name: Bundle macOS Release
if: ${{ runner.os == 'macOS' }}
run: |
cargo install cargo-bundle
cargo bundle --release
working-directory: psst-gui

- name: Create macOS universal binary
if: ${{ runner.os == 'macOS' }}
run: lipo target/release/psst-gui target/aarch64-apple-darwin/release/psst-gui -create -output target/release/bundle/osx/Psst.app/Contents/MacOS/psst-gui

- name: Create macOS Disk Image
if: ${{ runner.os == 'macOS' }}
run: |
hdiutil create Psst-uncompressed.dmg -volname "Psst" -srcfolder target/release/bundle/osx
hdiutil convert Psst-uncompressed.dmg -format UDZO -o Psst-x64.dmg
hdiutil convert Psst-uncompressed.dmg -format UDZO -o Psst.dmg

- name: Make Linux Binary Executable
if: ${{ runner.os == 'Linux' }}
Expand All @@ -78,8 +88,8 @@ jobs:
uses: actions/upload-artifact@v3
if: ${{ runner.os == 'macOS' }}
with:
name: Psst-x64.dmg
path: ./Psst-x64.dmg
name: Psst.dmg
path: ./Psst.dmg

- name: Upload Windows Executable
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can download the prebuilt binaries for x86_64 Windows, Linux (Ubuntu), and m
| [Windows](https://nightly.link/jpochyla/psst/workflows/build/master/Psst.exe.zip) |
| [Linux (Ubuntu)](https://nightly.link/jpochyla/psst/workflows/build/master/psst-gui.zip) |
| [Debian Package](https://nightly.link/jpochyla/psst/workflows/build/master/psst-deb.zip) |
| [MacOS](https://nightly.link/jpochyla/psst/workflows/build/master/Psst-x64.dmg.zip) |
| [MacOS](https://nightly.link/jpochyla/psst/workflows/build/master/Psst.dmg.zip) |

Unofficial builds of Psst are also available through the [AUR](https://aur.archlinux.org/packages/psst-git) and [Homebrew](https://formulae.brew.sh/cask/psst).

Expand Down
Loading