Skip to content

Fix for duped (L/R) device names #220

Fix for duped (L/R) device names

Fix for duped (L/R) device names #220

Workflow file for this run

name: Build
on:
push:
branches:
- rewrite
pull_request:
branches:
- rewrite
workflow_dispatch:
env:
BUILD_TYPE: RelWithDebInfo
jobs:
build:
name: Build ${{ matrix.os }} ${{ matrix.arch }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x64
binary_path: build/client/SonyHeadphonesClient
artifact_name: "SonyHeadphonesClient-linux-x64"
script: "sudo apt-get update && sudo apt-get install -y libbluetooth-dev libdbus-1-dev libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules xorg-dev libcurl4-openssl-dev"
gcc: 14
# ARM Linux runners currently has availability issues.
# TODO: Enable these once these are fixed.
# https://github.com/actions/partner-runner-images/issues/132
# https://github.com/actions/partner-runner-images/issues/65
# - os: ubuntu-24.04-arm64
# arch: arm64
# binary_path: build/client/SonyHeadphonesClient
# artifact_name: "SonyHeadphonesClient-linux-arm64"
# script: "sudo apt-get update && sudo apt-get install -y libbluetooth-dev libdbus-1-dev libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules xorg-dev libcurl4-openssl-dev"
# gcc: 14
- os: macos-latest
arch: universal
binary_path: build/client/SonyHeadphonesClient.zip
artifact_name: "SonyHeadphonesClient-macos-universal"
script: ""
- os: windows-latest
arch: x64
binary_path: build/client/RelWithDebInfo/SonyHeadphonesClient.exe
artifact_name: "SonyHeadphonesClient-win-x64"
script: ""
- os: windows-latest
arch: arm64
binary_path: build/client/RelWithDebInfo/SonyHeadphonesClient.exe
artifact_name: "SonyHeadphonesClient-win-arm64"
script: ""
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Download Packages
run: ${{ matrix.script }}
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake (Windows)
working-directory: ${{github.workspace}}/build
if: runner.os == 'Windows'
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DMDR_ENABLE_CODEGEN=OFF -A ${{ matrix.arch }}
- name: Configure CMake (Linux)
env:
CC: gcc-${{ matrix.gcc }}
CXX: g++-${{ matrix.gcc }}
working-directory: ${{github.workspace}}/build
if: runner.os == 'Linux'
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DMDR_ENABLE_CODEGEN=OFF
- name: Configure CMake (macOS)
working-directory: ${{github.workspace}}/build
if: runner.os == 'macOS'
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DMDR_ENABLE_CODEGEN=OFF -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE --target SonyHeadphonesClient
- name: Strip Symbols (Linux)
if: runner.os == 'Linux'
working-directory: ${{github.workspace}}
# Strip symbols from the binary to reduce size
run: strip --strip-unneeded ${{matrix.binary_path}}
- name: Pack (macOS)
if: runner.os == 'macOS'
working-directory: ${{github.workspace}}/build/client
run: zip -r SonyHeadphonesClient.zip SonyHeadphonesClient.app
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
# Artifact name
name: ${{ matrix.artifact_name }}
# A file, directory or wildcard pattern that describes what to upload
path: ${{github.workspace}}/${{matrix.binary_path}}