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

Add CI builds for Apple Silicon #441

Closed
wants to merge 2 commits into from
Closed
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
47 changes: 31 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

Expand Down Expand Up @@ -30,7 +29,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
include:
- target: 'x86_64-unknown-linux-gnu'
os: ubuntu-latest
- target: 'x86_64-pc-windows-msvc'
os: windows-latest
- target: 'x86_64-apple-darwin'
os: macos-latest
- target: 'aarch64-apple-darwin'
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
Expand All @@ -43,12 +50,20 @@ jobs:
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libssl-dev libasound2-dev

- name: Install Target
run: rustup target add ${{ matrix.target }}

- name: Run Tests
run: cargo test
continue-on-error: true

- name: Build Release
run: cargo build --release
if: ${{ runner.os != 'macOS' }}
run: cargo build --release --target=${{ matrix.target }}

- name: Build macOS Release
if: ${{ runner.os == 'macOS' }}
run: SDKROOT=$(xcrun -sdk macosx --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version) cargo build --release --target=${{ matrix.target }}

- name: Bundle macOS Release
if: ${{ runner.os == 'macOS' }}
Expand All @@ -61,32 +76,32 @@ jobs:
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-${{ matrix.target }}.dmg

- name: Make Linux Binary Executable
if: ${{ runner.os == 'Linux' }}
run: chmod +x target/release/psst-gui
run: chmod +x target/${{ matrix.target }}/release/psst-gui

- name: Upload Linux Binary
uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' }}
with:
name: psst-gui
path: target/release/psst-gui
name: Psst-${{ matrix.target }}
path: target/${{ matrix.target}}/release/psst-gui

- name: Upload macOS Disk Image
- name: Upload macOS Disk Image (x86_64)
uses: actions/upload-artifact@v3
if: ${{ runner.os == 'macOS' }}
with:
name: Psst-x64.dmg
path: ./Psst-x64.dmg
name: Psst-${{ matrix.target }}
path: ./Psst-${{ matrix.target }}.dmg

- name: Upload Windows Executable
uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Windows' }}
with:
name: Psst.exe
path: target/release/psst-gui.exe
name: Psst-${{ matrix.target }}
path: target/${{ matrix.target }}/release/psst-gui.exe

deb:
runs-on: ubuntu-latest
Expand All @@ -98,7 +113,7 @@ jobs:
- name: Download Linux Binary
uses: actions/download-artifact@v3
with:
name: psst-gui
name: Psst-x86_64-unknown-linux-gnu
path: ${{runner.workspace}}

- name: Move Binary
Expand Down Expand Up @@ -135,7 +150,7 @@ jobs:
- name: Upload Debian Package
uses: actions/upload-artifact@v3
with:
name: psst-deb
name: Psst-deb
path: "*.deb"

appimage:
Expand All @@ -149,7 +164,7 @@ jobs:
- name: Download Debian Package
uses: actions/download-artifact@v3
with:
name: psst-deb
name: Psst-deb
path: ${{runner.workspace}}

- name: Install Dependencies
Expand Down Expand Up @@ -182,5 +197,5 @@ jobs:
- name: Upload AppImage
uses: actions/upload-artifact@v3
with:
name: psst-appimage
name: Psst-appimage
path: ${{runner.workspace}}/out/*.AppImage
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ You can download the prebuilt binaries for x86_64 Windows, Linux (Ubuntu), and m

| Platform |
|----------|
| [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) |
| [Windows](https://nightly.link/jpochyla/psst/workflows/build/master/Psst-x86_64-pc-windows-msvc.zip) |
| [Linux (Ubuntu)](https://nightly.link/jpochyla/psst/workflows/build/master/Psst-x86_64-unknown-linux-gnu.zip) |
| [Debian Package](https://nightly.link/jpochyla/psst/workflows/build/master/Psst-deb.zip) |
| [MacOS (Intel)](https://nightly.link/jpochyla/psst/workflows/build/master/Psst-x86_64-apple-darwin.zip) |
| [MacOS (Apple Silicon)](https://nightly.link/jpochyla/psst/workflows/build/master/Psst-x86_64-apple-darwin.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