Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7deef89
WIP in getting modules to work with audio-cpp
SpinnerX Jan 4, 2026
e136e24
WIP getting cpp modules to work; need to resolve test_package miniaud…
SpinnerX Jan 8, 2026
36b7949
Finalized changes with fixing test_package
SpinnerX Jan 8, 2026
9637867
Update miniaudio/1.0 to 2.0
SpinnerX Jan 8, 2026
104ffc0
Updated miniaudio/1.0 to 2.0
SpinnerX Jan 8, 2026
8d06ca8
Updated github workflows for windows-specific
SpinnerX Jan 8, 2026
7f3583f
Updated windows github workflows
SpinnerX Jan 9, 2026
207c1b0
Updated workflows for linux and mac
SpinnerX Jan 9, 2026
c63a735
Conformed code to clang-format
SpinnerX Jan 9, 2026
97dbc04
Removed linux.yml and added deployment tasks to the CI
SpinnerX Jan 9, 2026
8b7f4be
Updated deployment github actions for deployment
SpinnerX Jan 9, 2026
4e0394d
WIP and finalizing deploy windows and mac workflows
SpinnerX Jan 10, 2026
21a929f
Finalizing minimal changes to deploy_windows.yml
SpinnerX Jan 10, 2026
69dc4cf
Finalizing and fixing remote login in deploy_mac.yml
SpinnerX Jan 10, 2026
98b664f
WIP in getting the linux git workflows to work
SpinnerX Jan 10, 2026
b25e8af
Added deploy_linux.yml to finalize git workflows
SpinnerX Jan 10, 2026
ffb08ab
Minimal change to deploy_linux.yml for job name change
SpinnerX Jan 10, 2026
7fbf967
Cleaned up project cmake
SpinnerX Jan 10, 2026
00e4866
Finalized deploy_linux.yml
SpinnerX Jan 10, 2026
c4a1344
Finalized windows and mac deployment for uploading through workflows
SpinnerX Jan 10, 2026
98b64e9
Cleaned up conanfile
SpinnerX Jan 10, 2026
bbbf3ad
Updated build to use miniaudio/2.0
SpinnerX Jan 10, 2026
1669956
Fixed generate compile commands portion
SpinnerX Jan 10, 2026
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
57 changes: 57 additions & 0 deletions .github/workflows/deploy_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy to Linux

on:
pull_request:
types: [closed]
branches:
- main # Only trigger for PRs merged into main

jobs:
linux_x86_64:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install LLVM's C++ Standard Library
run: sudo apt-get install libc++-20-dev libc++abi-20-dev

- name: Installing pipx
run: sudo apt install pipx

- name: Installing Prerequisites for Linux
run: |
sudo apt-get update
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa

- name: Installing Conan
run: pipx install "conan>=2.18.1"

- name: Setting up Conan Profiles
run: conan config install -sf profiles/x86_64/linux/ -tf profiles https://github.com/engine3d-dev/conan-config.git

- name: Adding Conan remote dependencies
run: |
conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
conan remote add libhal-trunk https://libhal.jfrog.io/artifactory/api/conan/trunk-conan

- name: Creating Release build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Release -pr linux_x86_64 -c tools.system.package_manager:sudo=True -c tools.system.package_manager:mode=install

- name: Creating Debug build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Debug -pr linux_x86_64 -c tools.system.package_manager:sudo=True -c tools.system.package_manager:mode=install

- name: Creating MinSizeRel build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=MinSizeRel -pr linux_x86_64 -c tools.system.package_manager:sudo=True -c tools.system.package_manager:mode=install

- name: Login to JFrog
run: conan remote login -p ${{ secrets.JFROG_USER_TOKEN_ID }} engine3d-conan ${{ secrets.JFROG_USERNAME }}

- name: Uploading audio-cpp to JFrog remote repositories
shell: pwsh
run: conan upload audio-cpp/2.0 --r=engine3d-conan --confirm

64 changes: 64 additions & 0 deletions .github/workflows/deploy_mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Deploy to MacOS

on:
pull_request:
types: [closed]
branches:
- main # Only trigger for PRs merged into main

jobs:
macos_armv8:
if: github.event.pull_request.merged == true
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Install Homebrew
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

- name: Install LLVM
run: |
brew install python pipx llvm@17

- name: Pipx installing conan
run: |
pipx install "conan>=2.18.2"
pipx upgrade conan

- name: Installing clang-tidy
run: sudo ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin/

- name: Install Rosetta
run: /usr/sbin/softwareupdate --install-rosetta --agree-to-license

- name: Setting up Conan profile
run: conan config install -sf profiles/armv8/mac/ -tf profiles https://github.com/engine3d-dev/conan-config.git

- name: Installing Atlas repositories
run: |
conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
conan remote add libhal-trunk https://libhal.jfrog.io/artifactory/api/conan/trunk-conan

- name: Creating Release build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Release -pr mac_armv8

- name: Creating Debug build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Debug -pr mac_armv8

- name: Creating MinSizeRel build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=MinSizeRel -pr mac_armv8

- name: Login to JFrog
shell: pwsh
env:
PASSWORD: ${{ secrets.JFROG_ID }}
JFROG_USER: ${{ secrets.JFROG_USER_TOKEN_ID }}
run: conan remote login -p ${{ secrets.JFROG_USER_TOKEN_ID }} engine3d-conan ${{ secrets.JFROG_USERNAME }}

- name: Deploy audio-cpp to JFrog remote repositories
shell: pwsh
run: |
conan upload audio-cpp/2.0 --r=engine3d-conan --confirm
62 changes: 62 additions & 0 deletions .github/workflows/deploy_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy to Windows

on:
pull_request:
types: [closed]
branches:
- main # Only trigger for PRs merged into main

jobs:
windows_x86_64:
if: github.event.pull_request.merged == true
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Installing Choco
shell: pwsh
run: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

- name: Install tooling with Choco
shell: pwsh
run: |
choco install cmake.install --version=3.31.6
cmake --version
choco install llvm --version=20.1.4
clang++ --version
choco install git make mingw

- name: Pip installing conan
shell: pwsh
run: pip install conan

- name: Setting up conan profiles
shell: pwsh
run: conan config install -sf profiles/x86_64/Windows/ -tf profiles https://github.com/engine3d-dev/conan-config.git

- name: Setting up remote repositories
shell: pwsh
run: |
conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
conan remote add libhal-trunk https://libhal.jfrog.io/artifactory/api/conan/trunk-conan

- name: Creating Release build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Release -pr windows_x86_64

- name: Creating Debug build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Debug -pr windows_x86_64

- name: Creating MinSizeRel build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=MinSizeRel -pr windows_x86_64

- name: Login to JFrog
shell: pwsh
run: conan remote login -p ${{ secrets.JFROG_USER_TOKEN_ID }} engine3d-conan ${{ secrets.JFROG_USERNAME }}

- name: Deploy audio-cpp to JFrog remote repositories
shell: pwsh
run: |
conan upload audio-cpp/2.0 --r=engine3d-conan --confirm
35 changes: 25 additions & 10 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux Build Tests
name: Linux Platform Build

on: [pull_request]

Expand All @@ -9,23 +9,38 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install LLVM
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh

- name: Install LLVM's C++ Standard Library
run: sudo apt install libc++-17-dev libc++abi-17-dev
run: sudo apt-get install libc++-20-dev libc++abi-20-dev

- name: Installing pipx
run: sudo apt install pipx

- name: Installing Prerequisites for Linux
run: |
sudo apt-get update
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa

- name: Installing Conan
run: pipx install "conan>=2.10.1"
run: pipx install "conan>=2.18.1"

- name: Setting up Conan Profiles
run: conan config install -sf profiles/x86_64/linux/ -tf profiles https://github.com/engine3d-dev/conan-config.git

- name: Installing project dependencies
run: conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
- name: Adding Conan remote dependencies
run: |
conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
conan remote add libhal-trunk https://libhal.jfrog.io/artifactory/api/conan/trunk-conan

- name: Creating Release build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Release -pr linux_x86_64 -c tools.system.package_manager:sudo=True -c tools.system.package_manager:mode=install

- name: Creating Debug build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Debug -pr linux_x86_64 -c tools.system.package_manager:sudo=True -c tools.system.package_manager:mode=install

- name: Creating MinSizeRel build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=MinSizeRel -pr linux_x86_64 -c tools.system.package_manager:sudo=True -c tools.system.package_manager:mode=install

- name: Building audio-cpp
run: conan build . -b missing -c tools.system.package_manager:sudo=True -c tools.system.package_manager:mode=install
24 changes: 20 additions & 4 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,23 @@ jobs:
run: conan config install -sf profiles/armv8/mac/ -tf profiles https://github.com/engine3d-dev/conan-config.git

- name: Installing Atlas repositories
run: conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan

- name: Building audio-cpp
run: conan build . -b missing
run: |
conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
conan remote add libhal-trunk https://libhal.jfrog.io/artifactory/api/conan/trunk-conan

# - name: Building audio-cpp
# run: |
# conan create . -b missing -s build_type=Release -pr mac_armv8
# conan create . -b missing -s build_type=Debug -pr mac_armv8
# conan create . -b missing -s build_type=MinSizeRel -pr mac_armv8
- name: Creating Release build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Release -pr mac_armv8

- name: Creating Debug build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Debug -pr mac_armv8

- name: Creating MinSizeRel build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=MinSizeRel -pr mac_armv8
22 changes: 19 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,24 @@ jobs:

- name: Setting up packages
shell: pwsh
run: conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
run: |
conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
conan remote add libhal-trunk https://libhal.jfrog.io/artifactory/api/conan/trunk-conan

# - name: Building audio-cpp
# shell: pwsh
# run: |
# conan create . -b missing -s build_type=Release -pr windows_x86_64
# conan create . -b missing -s build_type=Debug -pr windows_x86_64
# conan create . -b missing -s build_type=MinSizeRel -pr windows_x86_64
- name: Creating Release build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Release -pr windows_x86_64

- name: Creating Debug build for audio-cpp
shell: pwsh
run: conan create . -b missing -s build_type=Debug -pr windows_x86_64

- name: Building audio-cpp
- name: Creating MinSizeRel build for audio-cpp
shell: pwsh
run: conan build . -b missing
run: conan create . -b missing -s build_type=MinSizeRel -pr windows_x86_64
50 changes: 43 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,58 @@
cmake_minimum_required(VERSION 3.25)
project(audio-cpp LANGUAGES C CXX)
cmake_minimum_required(VERSION 4.0)

build_library(
DIRECTORIES src
# Generate compile commands for anyone using our libraries.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_COLOR_DIAGNOSTICS ON)

ENABLE_TESTS ON
project(audio-cpp LANGUAGES CXX)

static_library(
ENABLE_TESTS ON

UNIT_TEST_SOURCES
tests/main.test.cpp
tests/basic_audio.test.cpp

LOCAL_PACKAGES
audio-cpp

PACKAGES
miniaudio

LINK_PACKAGES
miniaudio::miniaudio
)

generate_compile_commands()
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_23)

target_sources(${PROJECT_NAME} PUBLIC
FILE_SET CXX_MODULES
TYPE CXX_MODULES
FILES
audio-cpp/audio.cppm
audio-cpp/sound.cppm
)

install(
TARGETS ${PROJECT_NAME}
EXPORT audio-cpp_targets
FILE_SET CXX_MODULES DESTINATION "."
LIBRARY DESTINATION "lib"
ARCHIVE DESTINATION "lib"
CXX_MODULES_BMI DESTINATION "bmi"
)

install(
EXPORT audio-cpp_targets
FILE "audio-cpp-config.cmake"
DESTINATION "lib/cmake"
CXX_MODULES_DIRECTORY "cxx-modules"
)

target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_LIST_DIR})
# Always run this custom target by making it depend on ALL
add_custom_target(copy_compile_commands ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_BINARY_DIR}/compile_commands.json
${CMAKE_SOURCE_DIR}/compile_commands.json
DEPENDS ${CMAKE_BINARY_DIR}/compile_commands.json
)
9 changes: 9 additions & 0 deletions audio-cpp/audio.cppm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module;

export module audio;

export import :sound;


export namespace audio::inline v1 {
};
Loading
Loading