Skip to content

Commit

Permalink
Use Matrix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dimtpap committed Jul 15, 2024
1 parent 510569e commit 68dca33
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 115 deletions.
94 changes: 0 additions & 94 deletions .github/actions/build/action.yml

This file was deleted.

77 changes: 56 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,67 @@ on:
- '**'

jobs:
build-plugin-versions:
name: 'Build Plugin Versions'
build-plugin:
strategy:
matrix:
obs-version: ['28.0.0', '30.2.0']
name: 'Build Plugin'
runs-on: ubuntu-latest

steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: Build for OBS >= 28
uses: ./.github/actions/build
- name: Restore OBS from cache
uses: actions/cache@v4
id: cache-obs
with:
obs-version: '28.0.0'
plugin-output-path: 'linux-pipewire-audio-obs28.tar.gz'
- name: 'Upload'
uses: actions/upload-artifact@v4
path: ${{ github.workspace }}/obs/
key: ${{ matrix.obs-version }}
- name: Checkout OBS
if: steps.cache-obs.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
name: linux-pipewire-audio-obs28
path: linux-pipewire-audio-obs28.tar.gz
- name: Build for OBS >= 30.2
uses: ./.github/actions/build
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:
obs-version: '30.2.0'
additional-deps: 'uthash-dev libjansson-dev'
additional-obs-cmake-flags: '-DOBS_CMAKE_VERSION=3'
plugin-output-path: 'linux-pipewire-audio-obs30-2.tar.gz'
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:
name: linux-pipewire-audio-obs30-2
path: linux-pipewire-audio-obs30-2.tar.gz
path: linux-pipewire-audio-${{ matrix.obs-version }}.tar.gz
name: linux-pipewire-audio-${{ matrix.obs-version }}

0 comments on commit 68dca33

Please sign in to comment.