Skip to content

Minor fixes

Minor fixes #74

Workflow file for this run

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
- id: toolchain
name: Install nightly toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
targets: ${{ matrix.target }}
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: cargo-registry
enableCrossOsArchive: true
- name: Cache build directory
uses: actions/cache@v4
with:
path: target/
key: ${{ matrix.target }}-release-${{ steps.toolchain.outputs.cachekey }}
- name: Install ALSA
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install libasound2-dev
- name: Update dependencies
run: cargo update
- 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
tar
-C target/${{ matrix.target }}/ci
-cf dust-desktop.tar.gz
dust-desktop${{ matrix.artifact-extension }}
- name: Upload release binary (no debugging features)
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: dust-desktop.tar.gz
- 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
-C target/${{ matrix.target }}/ci
-cf dust-desktop.tar.gz
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.gz
- 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
-C target/${{ matrix.target }}/ci
-cf dust-desktop.tar.gz
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.gz