feat(examples): add volume example #12
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
on: | |
workflow_dispatch: | |
inputs: | |
debug: | |
type: boolean | |
description: Enable Debugging | |
push: | |
branches: ["**"] | |
paths-ignore: | |
- "**/*.md" | |
pull_request: | |
branches: ["**"] | |
name: Test | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: ["Release", "Debug"] | |
container: ["archlinux", "fedora:40"] | |
runs-on: ubuntu-latest | |
container: ${{ matrix.container }} | |
name: π§ͺ Test on ${{ matrix.container }} (βοΈ ${{ matrix.config }}) | |
steps: | |
- name: π₯ Checkout | |
uses: actions/checkout@v4 | |
- name: π§° Install Dependencies | |
if: ${{ matrix.container == 'archlinux' }} | |
run: pacman --noconfirm -Syu base-devel cmake gcc git make pipewire pipewire-pulse tmate openssh dbus xorg-server-xvfb | |
- name: π§° Install Dependencies | |
if: ${{ matrix.container == 'fedora:40' }} | |
run: dnf install -y pipewire-devel make automake git gcc gcc-c++ kernel-devel cmake libasan tmate dbus-daemon xorg-x11-server-Xvfb | |
- name: π Debug Workflow | |
if: ${{ github.event.inputs.debug == 'true' }} | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
install-dependencies: false | |
limit-access-to-actor: true | |
- name: π¨ Compile | |
run: | | |
cmake -B build -Drohrkabel_examples=ON -Drohrkabel_sanitizer=ON | |
cmake --build build --config ${{ matrix.config }} | |
- name: π§ Setup PipeWire / π¬ Run Examples | |
run: | | |
export XDG_RUNTIME_DIR=/tmp | |
export PIPEWIRE_RUNTIME_DIR=/tmp | |
export PULSE_RUNTIME_DIR=/tmp | |
export DISPLAY=:0.0 | |
mkdir -p /run/dbus | |
dbus-daemon --system --fork | |
Xvfb -screen $DISPLAY 1920x1080x24 & | |
pipewire & | |
./build/examples/roundtrip/roundtrip-example |