Skip to content

Use Matrix workflow #52

Use Matrix workflow

Use Matrix workflow #52

Workflow file for this run

name: Build
on:
push:
paths:
- .github/workflows/main.yml
- 'src/**'
- 'cmake/**'
- 'CMakeLists.txt'
tags:
- '*'
branches:
- '**'
jobs:
build-plugin:
strategy:
matrix:
obs-version: ['28.0.0', '30.2.0']
name: 'Build Plugin'
runs-on: ubuntu-latest
steps:
- name: Restore OBS from cache
uses: actions/cache@v4

Check failure on line 24 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

You have an error in your yaml syntax on line 24
id: cache-obs
with:
path: ${{ github.workspace }}/obs/
key: ${{ matrix.obs-version }}
- name: Checkout OBS
if: steps.cache-obs.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: 'obsproject/obs-studio'
path: 'obs-src'
ref: ${{ matrix.obs-version }}
submodules: 'recursive'
- name: 'Install system dependencies'
run: |
sudo apt update
sudo apt install cmake ninja-build pkg-config clang clang-format build-essential curl ccache git zsh\
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev\
libcurl4-openssl-dev\
libxcb1-dev libx11-xcb-dev\
libgl1-mesa-dev\
libglvnd-dev\
libgles2-mesa\
libgles2-mesa-dev\
libpipewire-0.3-dev\
uthash-dev libjansson-dev
- name: 'Configure OBS'
if: steps.cache-obs.outputs.cache-hit != 'true'
run: cmake -B obs-src/build -S obs-src -DOBS_CMAKE_VERSION=3 -DENABLE_BROWSER=OFF -DENABLE_UI=OFF -DENABLE_SCRIPTING=OFF -DENABLE_PULSEAUDIO=OFF -DENABLE_WAYLAND=OFF -DENABLE_PLUGINS=OFF
- name: 'Build OBS'
if: steps.cache-obs.outputs.cache-hit != 'true'
run: cmake --build obs-src/build -j4
- name: 'Install OBS'
if: steps.cache-obs.outputs.cache-hit != 'true'
run: cmake --install obs-src/build --prefix obs
- name: 'Checkout'
uses: actions/checkout@v4
with:
path: 'plugin'
- name: 'Configure'
run: cmake -B ./plugin/build -S ./plugin -DCMAKE_BUILD_TYPE=RelWithDebInfo -Dlibobs_DIR="$GITHUB_WORKSPACE/obs/lib/cmake/libobs/"
- name: 'Build'
run: cmake --build ./plugin/build -j4
- name: 'Package'
run: |
mkdir -p linux-pipewire-audio/bin/64bit linux-pipewire-audio/data/locale
cp ./plugin/build/linux-pipewire-audio.so ./linux-pipewire-audio/bin/64bit/linux-pipewire-audio.so
cp ./plugin/data/locale/en-US.ini ./linux-pipewire-audio/data/locale/en-US.ini
tar -zcvf linux-pipewire-audio-$OBS_VERSION.tar.gz linux-pipewire-audio
env:
OBS_VERSION: ${{ matrix.obs-version }}
- name: 'Upload'
uses: actions/upload-artifact@v4
with:
path: linux-pipewire-audio-${{ matrix.obs-version }}.tar.gz