CI: Update some stuff

This commit is contained in:
tt2468 2021-08-30 02:30:48 -07:00
parent ac78acd28c
commit d669db24ac

View File

@ -1,356 +1,346 @@
name: "CI Multiplatform Build" name: "CI Multiplatform Build"
on: on:
push: push:
paths-ignore: paths-ignore:
- 'docs/**' - 'docs/**'
branches: branches:
- master - master
tags: tags:
- '[45].[0-9]+.[0-9]+*' - '[45].[0-9]+.[0-9]+*'
pull_request: pull_request:
paths-ignore: paths-ignore:
- 'docs/**' - 'docs/**'
- '**.md' - '**.md'
branches: branches:
- master - master
jobs: jobs:
windows: windows:
name: 'Windows 32/64-bit' name: 'Windows 32/64-bit'
runs-on: [windows-latest] runs-on: [windows-latest]
if: contains(github.event.head_commit.message, '[skip ci]') != true if: contains(github.event.head_commit.message, '[skip ci]') != true
env: env:
QT_CACHE_VERSION: '2' # Change whenever updating OBS dependencies URL, in order to force a cache reset QT_CACHE_VERSION: '2' # Change whenever updating OBS dependencies URL, in order to force a cache reset
QT_VERSION: '5.15.2' QT_VERSION: '5.15.2'
WINDOWS_DEPS_CACHE_VERSION: '1' # Change whenever updating Qt dependency URL, in order to force a cache reset WINDOWS_DEPS_CACHE_VERSION: '1' # Change whenever updating Qt dependency URL, in order to force a cache reset
WINDOWS_DEPS_VERSION: '2019' WINDOWS_DEPS_VERSION: '2019'
CMAKE_GENERATOR: "Visual Studio 16 2019" CMAKE_GENERATOR: "Visual Studio 16 2019"
CMAKE_SYSTEM_VERSION: "10.0" CMAKE_SYSTEM_VERSION: "10.0"
steps: steps:
- name: 'Add msbuild to PATH' - name: 'Add msbuild to PATH'
uses: microsoft/setup-msbuild@v1.0.2 uses: microsoft/setup-msbuild@v1.0.2
- name: 'Checkout obs-websocket' - name: 'Checkout obs-websocket'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
path: ${{ github.workspace }}/obs-websocket path: ${{ github.workspace }}/obs-websocket
submodules: 'recursive' submodules: 'recursive'
- name: 'Checkout OBS-Studio' - name: 'Checkout OBS-Studio'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: obsproject/obs-studio repository: obsproject/obs-studio
path: ${{ github.workspace }}/obs-studio path: ${{ github.workspace }}/obs-studio
submodules: 'recursive' submodules: 'recursive'
- name: 'Get OBS-Studio Git Info' - name: 'Get OBS-Studio Git Info'
shell: bash shell: bash
working-directory: ${{ github.workspace }}/obs-studio working-directory: ${{ github.workspace }}/obs-studio
run: | run: |
git fetch --prune --unshallow git fetch --prune --unshallow
echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})' - name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
shell: bash shell: bash
working-directory: ${{ github.workspace }}/obs-studio working-directory: ${{ github.workspace }}/obs-studio
run: | run: |
git checkout ${{ env.OBS_GIT_TAG }} git checkout ${{ env.OBS_GIT_TAG }}
git submodule update git submodule update
- name: 'Get obs-websocket Git Info' - name: 'Get obs-websocket Git Info'
shell: bash shell: bash
working-directory: ${{ github.workspace }}/obs-websocket working-directory: ${{ github.workspace }}/obs-websocket
run: | run: |
git fetch --prune --unshallow git fetch --prune --unshallow
GIT_HASH=$(git rev-parse --short HEAD) GIT_HASH=$(git rev-parse --short HEAD)
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
GIT_TAG=$(git describe --exact-match --tags --abbrev=0) || GIT_TAG="" GIT_TAG=$(git describe --exact-match --tags --abbrev=0) || GIT_TAG=""
echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV
if [ "$GIT_TAG" ] ; then \ if [ "$GIT_TAG" ] ; then \
VERSION="$GIT_TAG" ; \ VERSION="$GIT_TAG" ; \
else \ else \
VERSION="$GIT_HASH-git" ; \ VERSION="$GIT_HASH-git" ; \
fi fi
echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
- name: 'Restore Cached Qt' - name: 'Restore Cached Qt'
id: qtcache id: qtcache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: Qt_${{ env.QT_VERSION }}.7z path: Qt_${{ env.QT_VERSION }}.7z
key: 'qtdep-${{ env.QT_CACHE_VERSION }} | ${{ runner.os }}' key: 'qtdep-${{ env.QT_CACHE_VERSION }} | ${{ runner.os }}'
restore-keys: | restore-keys: |
qtdep-${{ env.QT_CACHE_VERSION }} | ${{ runner.os }} qtdep-${{ env.QT_CACHE_VERSION }} | ${{ runner.os }}
- name: 'Download Prerequisite: Qt' - name: 'Download Prerequisite: Qt'
if: steps.qtcache.outputs.cache-hit != 'true' if: steps.qtcache.outputs.cache-hit != 'true'
run: | run: |
curl -kLO https://tt2468.net/dl/Qt_${{ env.QT_VERSION }}.7z -f --retry 5 -C - curl -kLO https://tt2468.net/dl/Qt_${{ env.QT_VERSION }}.7z -f --retry 5 -C -
- name: 'Extract Prerequisite: Qt' - name: 'Extract Prerequisite: Qt'
run: | run: |
7z x Qt_${{ env.QT_VERSION }}.7z -o"${{ github.workspace }}\cmbuild\QT" 7z x Qt_${{ env.QT_VERSION }}.7z -o"${{ github.workspace }}\cmbuild\QT"
- name: 'Restore Cached OBS-Studio Dependencies' - name: 'Restore Cached OBS-Studio Dependencies'
id: obscache id: obscache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ${{ github.workspace }}\cmbuild\deps\** path: ${{ github.workspace }}\cmbuild\deps\**
key: 'obsdep-${{ env.WINDOWS_DEPS_CACHE_VERSION }} | ${{ runner.os }}' key: 'obsdep-${{ env.WINDOWS_DEPS_CACHE_VERSION }} | ${{ runner.os }}'
restore-keys: | restore-keys: |
obsdep-${{ env.WINDOWS_DEPS_CACHE_VERSION }} | ${{ runner.os }} obsdep-${{ env.WINDOWS_DEPS_CACHE_VERSION }} | ${{ runner.os }}
- name: 'Install Prerequisite: Pre-built OBS-Studio dependencies' - name: 'Install Prerequisite: Pre-built OBS-Studio dependencies'
if: steps.obscache.outputs.cache-hit != 'true' if: steps.obscache.outputs.cache-hit != 'true'
run: | run: |
curl -kLO https://cdn-fastly.obsproject.com/downloads/dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -f --retry 5 -C - curl -kLO https://cdn-fastly.obsproject.com/downloads/dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -f --retry 5 -C -
7z x dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -o"${{ github.workspace }}\cmbuild\deps" 7z x dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -o"${{ github.workspace }}\cmbuild\deps"
- name: 'Restore OBS-Studio 32-bit Build v${{ env.OBS_GIT_TAG }} from Cache' - name: 'Restore OBS-Studio 32-bit Build v${{ env.OBS_GIT_TAG }} from Cache'
id: build-cache-obs-32 id: build-cache-obs-32
uses: actions/cache@v2 uses: actions/cache@v2
env: env:
CACHE_NAME: 'build-cache-obs-32' CACHE_NAME: 'build-cache-obs-32'
with: with:
path: ${{ github.workspace }}/obs-studio/build32 path: ${{ github.workspace }}/obs-studio/build32
key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }} key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.CACHE_NAME }}- ${{ runner.os }}-${{ env.CACHE_NAME }}-
- name: 'Configure OBS-Studio 32-bit' - name: 'Configure OBS-Studio 32-bit'
if: steps.build-cache-obs-32.outputs.cache-hit != 'true' if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio working-directory: ${{ github.workspace }}/obs-studio
run: | run: |
if(!(Test-Path -Path ".\build32")){New-Item -ItemType directory -Path .\build32} if(!(Test-Path -Path ".\build32")){New-Item -ItemType directory -Path .\build32}
cd .\build32 cd .\build32
cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES -DBUILD_BROWSER=OFF .. cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES -DBUILD_BROWSER=OFF ..
- name: 'Build OBS-Studio 32-bit' - name: 'Build OBS-Studio 32-bit'
if: steps.build-cache-obs-32.outputs.cache-hit != 'true' if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio working-directory: ${{ github.workspace }}/obs-studio
run: | run: |
msbuild /m /p:Configuration=RelWithDebInfo .\build32\libobs\libobs.vcxproj msbuild /m /p:Configuration=RelWithDebInfo .\build32\libobs\libobs.vcxproj
msbuild /m /p:Configuration=RelWithDebInfo .\build32\UI\obs-frontend-api\obs-frontend-api.vcxproj msbuild /m /p:Configuration=RelWithDebInfo .\build32\UI\obs-frontend-api\obs-frontend-api.vcxproj
- name: 'Restore OBS-Studio 64-bit Build v${{ env.OBS_GIT_TAG }} from Cache' - name: 'Restore OBS-Studio 64-bit Build v${{ env.OBS_GIT_TAG }} from Cache'
id: build-cache-obs-64 id: build-cache-obs-64
uses: actions/cache@v1 uses: actions/cache@v1
env: env:
CACHE_NAME: 'build-cache-obs-64' CACHE_NAME: 'build-cache-obs-64'
with: with:
path: ${{ github.workspace }}/obs-studio/build64 path: ${{ github.workspace }}/obs-studio/build64
key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }} key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.CACHE_NAME }}- ${{ runner.os }}-${{ env.CACHE_NAME }}-
- name: 'Configure OBS-Studio 64-bit' - name: 'Configure OBS-Studio 64-bit'
if: steps.build-cache-obs-64.outputs.cache-hit != 'true' if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio working-directory: ${{ github.workspace }}/obs-studio
run: | run: |
if(!(Test-Path -Path ".\build64")){New-Item -ItemType directory -Path .\build64} if(!(Test-Path -Path ".\build64")){New-Item -ItemType directory -Path .\build64}
cd .\build64 cd .\build64
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES -DBUILD_BROWSER=OFF .. cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES -DBUILD_BROWSER=OFF ..
- name: 'Build OBS-Studio 64-bit' - name: 'Build OBS-Studio 64-bit'
if: steps.build-cache-obs-64.outputs.cache-hit != 'true' if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio working-directory: ${{ github.workspace }}/obs-studio
run: | run: |
msbuild /m /p:Configuration=RelWithDebInfo .\build64\libobs\libobs.vcxproj msbuild /m /p:Configuration=RelWithDebInfo .\build64\libobs\libobs.vcxproj
msbuild /m /p:Configuration=RelWithDebInfo .\build64\UI\obs-frontend-api\obs-frontend-api.vcxproj msbuild /m /p:Configuration=RelWithDebInfo .\build64\UI\obs-frontend-api\obs-frontend-api.vcxproj
- name: 'Configure obs-websocket 32-bit' - name: 'Configure obs-websocket 32-bit'
working-directory: ${{ github.workspace }}/obs-websocket working-directory: ${{ github.workspace }}/obs-websocket
run: | run: |
mkdir .\build32 mkdir .\build32
cd .\build32 cd .\build32
cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build32\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build32\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build32\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" .. cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build32\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build32\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build32\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ..
- name: 'Configure obs-websocket 64-bit' - name: 'Configure obs-websocket 64-bit'
working-directory: ${{ github.workspace }}/obs-websocket working-directory: ${{ github.workspace }}/obs-websocket
run: | run: |
mkdir .\build64 mkdir .\build64
cd .\build64 cd .\build64
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019_64" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build64\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build64\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" .. cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019_64" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build64\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build64\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ..
- name: 'Build obs-websocket 32-bit' - name: 'Build obs-websocket 32-bit'
working-directory: ${{ github.workspace }}/obs-websocket working-directory: ${{ github.workspace }}/obs-websocket
run: msbuild /m /p:Configuration=RelWithDebInfo .\build32\obs-websocket.sln run: msbuild /m /p:Configuration=RelWithDebInfo .\build32\obs-websocket.sln
- name: 'Build obs-websocket 64-bit' - name: 'Build obs-websocket 64-bit'
working-directory: ${{ github.workspace }}/obs-websocket working-directory: ${{ github.workspace }}/obs-websocket
run: msbuild /m /p:Configuration=RelWithDebInfo .\build64\obs-websocket.sln run: msbuild /m /p:Configuration=RelWithDebInfo .\build64\obs-websocket.sln
- name: 'Set PR Artifact Filename' - name: 'Set PR Artifact Filename'
shell: bash shell: bash
run: | run: |
if [ "${{ env.GIT_TAG }}" ] ; then \ echo "WIN_FILENAME=obs-websocket-${{ env.PACKAGE_VERSION }}-Windows" >> $GITHUB_ENV
FILENAME="obs-websocket-${{ env.GIT_TAG }}-Windows" ; \ - name: 'Package obs-websocket'
else \ working-directory: ${{ github.workspace }}/obs-websocket
FILENAME="obs-websocket-${{ env.GIT_HASH }}-git-Windows" ; \ run: |
fi mkdir package
echo "WIN_FILENAME=$FILENAME" >> $GITHUB_ENV cd package
- name: 'Package obs-websocket' 7z a "${{ env.WIN_FILENAME }}.zip" "..\release\*"
working-directory: ${{ github.workspace }}/obs-websocket iscc ..\installer\installer-windows.generated.iss /O. /F"${{ env.WIN_FILENAME }}-Installer"
run: | - name: 'Publish ${{ env.WIN_FILENAME }}.zip'
mkdir package if: success()
cd package uses: actions/upload-artifact@v2-preview
7z a "${{ env.WIN_FILENAME }}.zip" "..\release\*" with:
iscc ..\installer\installer-windows.generated.iss /O. /F"${{ env.WIN_FILENAME }}-Installer" name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Windows'
- name: 'Publish ${{ env.WIN_FILENAME }}.zip' path: ${{ github.workspace }}/obs-websocket/package/*.zip
if: success() - name: 'Publish ${{ env.WIN_FILENAME }}-Installer.exe'
uses: actions/upload-artifact@v2-preview if: success()
with: uses: actions/upload-artifact@v2-preview
name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Windows' with:
path: ${{ github.workspace }}/obs-websocket/package/*.zip name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Windows-Installer'
- name: 'Publish ${{ env.WIN_FILENAME }}-Installer.exe' path: ${{ github.workspace }}/obs-websocket/package/*.exe
if: success() ubuntu64:
uses: actions/upload-artifact@v2-preview name: "Linux/Ubuntu 64-bit"
with: runs-on: [ubuntu-latest]
name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Windows-Installer' if: contains(github.event.head_commit.message, '[skip ci]') != true
path: ${{ github.workspace }}/obs-websocket/package/*.exe steps:
ubuntu64: - name: 'Checkout obs-websocket'
name: "Linux/Ubuntu 64-bit" uses: actions/checkout@v2
runs-on: [ubuntu-latest] with:
if: contains(github.event.head_commit.message, '[skip ci]') != true path: ${{ github.workspace }}/obs-websocket
steps: submodules: 'recursive'
- name: 'Checkout obs-websocket' - name: 'Checkout OBS-Studio'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
path: ${{ github.workspace }}/obs-websocket repository: obsproject/obs-studio
submodules: 'recursive' path: ${{ github.workspace }}/obs-studio
- name: 'Checkout OBS-Studio' submodules: 'recursive'
uses: actions/checkout@v2 - name: 'Get OBS-Studio Git Info'
with: shell: bash
repository: obsproject/obs-studio working-directory: ${{ github.workspace }}/obs-studio
path: ${{ github.workspace }}/obs-studio run: |
submodules: 'recursive' git fetch --prune --unshallow
- name: 'Get OBS-Studio Git Info' echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
shell: bash echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
working-directory: ${{ github.workspace }}/obs-studio - name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
run: | shell: bash
git fetch --prune --unshallow working-directory: ${{ github.workspace }}/obs-studio
echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV run: |
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV git checkout ${{ env.OBS_GIT_TAG }}
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})' git submodule update
shell: bash - name: 'Get obs-websocket git info'
working-directory: ${{ github.workspace }}/obs-studio working-directory: ${{ github.workspace }}/obs-websocket
run: | run: |
git checkout ${{ env.OBS_GIT_TAG }} git fetch --prune --unshallow
git submodule update GIT_HASH=$(git rev-parse --short HEAD)
- name: 'Get obs-websocket git info' echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
working-directory: ${{ github.workspace }}/obs-websocket GIT_TAG=$(git describe --exact-match --tags --abbrev=0) || GIT_TAG=""
run: | echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV
git fetch --prune --unshallow if [ "$GIT_TAG" ] ; then \
GIT_HASH=$(git rev-parse --short HEAD) VERSION="$GIT_TAG" ; \
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV else \
GIT_TAG=$(git describe --exact-match --tags --abbrev=0) || GIT_TAG="" VERSION="1-$GIT_HASH-git" ; \
echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV fi
if [ "$GIT_TAG" ] ; then \ echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
VERSION="$GIT_TAG" ; \ - name: 'Install prerequisites (Apt)'
else \ shell: bash
VERSION="$GIT_HASH-git" ; \ run: |
fi sudo dpkg --add-architecture amd64
echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV sudo apt-get -qq update
- name: 'Install prerequisites (Apt)' sudo apt-get install -y \
shell: bash build-essential \
run: | checkinstall \
sudo dpkg --add-architecture amd64 cmake \
sudo apt-get -qq update libasound2-dev \
sudo apt-get install -y \ libavcodec-dev \
build-essential \ libavdevice-dev \
checkinstall \ libavfilter-dev \
cmake \ libavformat-dev \
libasound2-dev \ libavutil-dev \
libavcodec-dev \ libcurl4-openssl-dev \
libavdevice-dev \ libfdk-aac-dev \
libavfilter-dev \ libfontconfig-dev \
libavformat-dev \ libfreetype6-dev \
libavutil-dev \ libgl1-mesa-dev \
libcurl4-openssl-dev \ libjack-jackd2-dev \
libfdk-aac-dev \ libjansson-dev \
libfontconfig-dev \ libluajit-5.1-dev \
libfreetype6-dev \ libpulse-dev \
libgl1-mesa-dev \ libqt5x11extras5-dev \
libjack-jackd2-dev \ libspeexdsp-dev \
libjansson-dev \ libswresample-dev \
libluajit-5.1-dev \ libswscale-dev \
libpulse-dev \ libudev-dev \
libqt5x11extras5-dev \ libv4l-dev \
libspeexdsp-dev \ libva-dev \
libswresample-dev \ libvlc-dev \
libswscale-dev \ libx11-dev \
libudev-dev \ libx264-dev \
libv4l-dev \ libxcb-randr0-dev \
libva-dev \ libxcb-shm0-dev \
libvlc-dev \ libxcb-xinerama0-dev \
libx11-dev \ libxcomposite-dev \
libx264-dev \ libxinerama-dev \
libxcb-randr0-dev \ libmbedtls-dev \
libxcb-shm0-dev \ pkg-config \
libxcb-xinerama0-dev \ python3-dev \
libxcomposite-dev \ qtbase5-dev \
libxinerama-dev \ qtbase5-private-dev \
libmbedtls-dev \ libqt5svg5-dev \
pkg-config \ swig \
python3-dev \ libxcb-randr0-dev \
qtbase5-dev \ libxcb-xfixes0-dev \
qtbase5-private-dev \ libx11-xcb-dev \
libqt5svg5-dev \ libxcb1-dev \
swig \ libxss-dev \
libxcb-randr0-dev \ - name: 'Configure OBS-Studio'
libxcb-xfixes0-dev \ working-directory: ${{ github.workspace }}/obs-studio
libx11-xcb-dev \ shell: bash
libxcb1-dev \ run: |
libxss-dev \ mkdir ./build
- name: 'Configure OBS-Studio' cd ./build
working-directory: ${{ github.workspace }}/obs-studio cmake -DDISABLE_PLUGINS=YES -DENABLE_SCRIPTING=NO -DUNIX_STRUCTURE=YES -DCMAKE_INSTALL_PREFIX=/usr ..
shell: bash - name: 'Build OBS-Studio'
run: | working-directory: ${{ github.workspace }}/obs-studio
mkdir ./build shell: bash
cd ./build run: |
cmake -DDISABLE_PLUGINS=YES -DENABLE_SCRIPTING=NO -DUNIX_STRUCTURE=YES -DCMAKE_INSTALL_PREFIX=/usr .. set -e
- name: 'Build OBS-Studio' cd ./build
working-directory: ${{ github.workspace }}/obs-studio make -j4 libobs obs-frontend-api
shell: bash - name: 'Install OBS-Studio'
run: | working-directory: ${{ github.workspace }}/obs-studio
set -e shell: bash
cd ./build run: |
make -j4 libobs obs-frontend-api cd ./build
- name: 'Install OBS-Studio' sudo cp ./libobs/libobs.so /usr/lib
working-directory: ${{ github.workspace }}/obs-studio sudo cp ./UI/obs-frontend-api/libobs-frontend-api.so /usr/lib
shell: bash sudo mkdir -p /usr/include/obs
run: | sudo cp ../UI/obs-frontend-api/obs-frontend-api.h /usr/include/obs/obs-frontend-api.h
cd ./build - name: 'Configure obs-websocket'
sudo cp ./libobs/libobs.so /usr/lib working-directory: ${{ github.workspace }}/obs-websocket
sudo cp ./UI/obs-frontend-api/libobs-frontend-api.so /usr/lib shell: bash
sudo mkdir -p /usr/include/obs run: |
sudo cp ../UI/obs-frontend-api/obs-frontend-api.h /usr/include/obs/obs-frontend-api.h mkdir ./build
- name: 'Configure obs-websocket' cd ./build
working-directory: ${{ github.workspace }}/obs-websocket if [ "${{ env.GIT_TAG }}" ] ; then \
shell: bash cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=TRUE -DCMAKE_BUILD_TYPE=Release .. ; \
run: | else \
mkdir ./build cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=TRUE .. ; \
cd ./build fi
if [ "${{ env.GIT_TAG }}" ] ; then \ - name: 'Build obs-websocket'
cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=TRUE -DCMAKE_BUILD_TYPE=Release .. ; \ working-directory: ${{ github.workspace }}/obs-websocket
else \ shell: bash
cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=TRUE .. ; \ run: |
fi set -e
- name: 'Build obs-websocket' cd ./build
working-directory: ${{ github.workspace }}/obs-websocket make -j4
shell: bash - name: 'Set PR Artifact Filename'
run: | shell: bash
set -e run: |
cd ./build echo "LINUX_FILENAME=obs-websocket-${{ env.PACKAGE_VERSION }}-Ubuntu64.deb" >> $GITHUB_ENV
make -j4 - name: 'Package ${{ env.LINUX_FILENAME }}'
- name: 'Set PR Artifact Filename' if: success()
shell: bash working-directory: ${{ github.workspace }}/obs-websocket
run: | shell: bash
if [ "${{ env.GIT_TAG }}" ] ; then \ run: |
FILENAME="obs-websocket-${{ env.GIT_TAG }}-Ubuntu64.deb" ; \ cd ./build
else \ sudo checkinstall -y --type=debian --fstrans=no -nodoc \
FILENAME="obs-websocket-${{ env.GIT_HASH }}-git-Ubuntu64.deb" ; \ --backup=no --deldoc=yes --install=no --pkgname=obs-websocket --pkgversion=${{ env.PACKAGE_VERSION }} \
fi --pkglicense="GPLv2.0" --maintainer="${{ github.event.pusher.email }}" --pkggroup="video" \
echo "FILENAME=$FILENAME" >> $GITHUB_ENV --pkgsource="${{ github.event.repository.html_url }}" \
- name: 'Package ${{ env.FILENAME }}' --requires="obs-studio,libqt5network5,libqt5concurrent5,qt5-image-formats-plugins" \
if: success() --pakdir="../package"
working-directory: ${{ github.workspace }}/obs-websocket sudo chmod ao+r ../package/*
shell: bash sudo mv ../package/* ../package/${{ env.LINUX_FILENAME }}
run: | cd -
cd ./build - name: 'Publish ${{ env.LINUX_FILENAME }}'
sudo checkinstall -y --type=debian --fstrans=no -nodoc \ if: success()
--backup=no --deldoc=yes --install=no --pkgname=obs-websocket --pkgversion=${{ env.PACKAGE_VERSION }} \ uses: actions/upload-artifact@v2-preview
--pkglicense="GPLv2.0" --maintainer="${{ github.event.pusher.email }}" --pkggroup="video" \ with:
--pkgsource="${{ github.event.repository.html_url }}" \ name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Ubuntu64'
--requires="obs-studio,libqt5network5,libqt5concurrent5,qt5-image-formats-plugins" \ path: '${{ github.workspace }}/obs-websocket/package/*.deb'
--pakdir="../package"
sudo chmod ao+r ../package/*
sudo mv ../package/* ../package/${{ env.FILENAME }}
cd -
- name: 'Publish ${{ env.FILENAME }}'
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Ubuntu64'
path: '${{ github.workspace }}/obs-websocket/package/*.deb'