Fix macOS app bundles again #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build release binaries | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
RELEASE_FEATURES: xq-audio,discord-presence,dldi | |
DEBUG_FEATURES: xq-audio,discord-presence,log,debug-views,dldi | |
DEBUG_GDB_FEATURES: xq-audio,discord-presence,log,debug-views,pu-checks,gdb-server,dldi | |
MACOSX_DEPLOYMENT_TARGET: 10.11 | |
jobs: | |
build: | |
name: Build (${{ matrix.artifact }}) | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
artifact: Windows | |
artifact-extension: .exe | |
target: x86_64-pc-windows-msvc | |
- os: ubuntu-latest | |
artifact: Linux | |
target: x86_64-unknown-linux-gnu | |
- os: macos-latest | |
artifact: macOS-x86_64 | |
target: x86_64-apple-darwin | |
- os: macos-latest | |
artifact: macOS-aarch64 | |
target: aarch64-apple-darwin | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install nightly toolchain | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
targets: ${{ matrix.target }} | |
- name: Cache Cargo registry | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry/index | |
~/.cargo/registry/cache | |
~/.cargo/git/db | |
key: cargo-registry | |
enableCrossOsArchive: true | |
- name: Cache build directory | |
uses: actions/cache@v3 | |
with: | |
path: target/ | |
key: ${{ matrix.target }}-release | |
- name: Install GTK and ALSA | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install libgtk-3-dev libasound2-dev | |
- name: Build release binary (no debugging features) | |
run: > | |
cargo build | |
--verbose | |
--profile ci | |
--target ${{ matrix.target }} | |
--no-default-features | |
--features=${{ env.RELEASE_FEATURES }} | |
--package dust-desktop | |
- name: Upload release binary (no debugging features) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact }} | |
path: target/${{ matrix.target }}/ci/dust-desktop${{ matrix.artifact-extension }} | |
- name: Build release binary (debugging features) | |
run: > | |
cargo build | |
--verbose | |
--profile ci | |
--target ${{ matrix.target }} | |
--no-default-features | |
--features=${{ env.DEBUG_FEATURES }} | |
--package dust-desktop | |
tar -cvf dust-desktop.tar | |
target/${{ matrix.target }}/ci/dust-desktop${{ matrix.artifact-extension }} | |
- name: Upload release binary (debugging features) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact }}-debug | |
path: dust-desktop.tar | |
- name: Build release binary (debugging features + GDB) | |
run: > | |
cargo build | |
--verbose | |
--profile ci | |
--target ${{ matrix.target }} | |
--no-default-features | |
--features=${{ env.DEBUG_GDB_FEATURES }} | |
--package dust-desktop | |
tar -cvf dust-desktop.tar | |
target/${{ matrix.target }}/ci/dust-desktop${{ matrix.artifact-extension }} | |
- name: Upload release binary (debugging features + GDB) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact }}-debug-gdb | |
path: dust-desktop.tar |