obs-StreamFX/.github/workflows/main.yml

274 lines
10 KiB
YAML
Raw Normal View History

name: Build
2021-03-22 21:30:05 +00:00
on:
push:
2020-09-25 19:06:59 +00:00
tags:
- '*'
branches-ignore:
- 'l10n_master'
pull_request:
2020-04-24 04:18:40 +00:00
branches:
- '*'
2020-11-02 15:52:21 +00:00
env:
2021-03-23 16:53:21 +00:00
QT_VERSION: "5.15.2"
OBS_VERSION: "26.1.0-ci"
OBSDEPS_VERSION: "26.1.0"
2020-11-02 15:52:21 +00:00
jobs:
windows:
name: "Windows 64-bit"
strategy:
2020-11-02 16:04:29 +00:00
fail-fast: true
2021-03-22 21:30:05 +00:00
matrix:
runner: [ windows-2019 ]
include:
- runner: windows-2019
id: windows-2019
windows_sdk: "10.0.18362.0"
cmake_generator: "Visual Studio 16 2019"
cmake_generator_platform: "x64"
runs-on: ${{ matrix.runner }}
env:
CMAKE_GENERATOR: ${{ matrix.cmake_generator }}
CMAKE_GENERATOR_PLATFORM: ${{ matrix.cmake_generator_platform }}
CMAKE_GENERATOR_TOOLSET: "host=x64"
CMAKE_SYSTEM_VERSION: ${{ matrix.windows_sdk }}
steps:
2021-03-23 15:42:34 +00:00
- name: "Clone"
uses: actions/checkout@v2
with:
submodules: recursive
2021-03-23 15:42:34 +00:00
fetch-depth: 0
- name: "libobs: Cache"
2020-11-02 15:52:21 +00:00
uses: actions/cache@v2
with:
2021-03-23 15:42:34 +00:00
path: |
build/temp/libobs-download
2021-03-23 16:53:21 +00:00
build/temp/libobs-build
build/temp/libobs-src
key: libobs-${{ matrix.id }}-${{ env.OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH }}-${{ secrets.CACHE_VERSION }}
2021-03-23 15:42:34 +00:00
- name: "obsdeps: Cache"
2020-11-02 15:52:21 +00:00
uses: actions/cache@v2
with:
2021-03-23 15:42:34 +00:00
path: |
build/temp/obsdeps-download
2021-03-23 16:53:21 +00:00
build/temp/obsdeps-build
build/temp/obsdeps-src
key: obsdeps-${{ matrix.id }}-${{ env.OBSDEPS_VERSION }}-${{ env.DOWNLOAD_OBSDEPS_HASH }}-${{ secrets.CACHE_VERSION }}
2021-03-23 15:42:34 +00:00
- name: "qt: Cache"
uses: actions/cache@v2
with:
2021-03-23 16:53:21 +00:00
path: |
build/temp/qt-download
build/temp/qt-build
build/temp/qt-src
key: qt-${{ matrix.id }}-${{ env.OBSDEPS_VERSION }}-${{ env.QT_VERSION }}-${{ secrets.CACHE_VERSION }}
2021-03-23 15:42:34 +00:00
- name: "StreamFX: Configure"
shell: bash
2020-01-14 08:31:41 +00:00
run: |
2020-09-28 19:28:21 +00:00
cmake -H. -B"build/temp" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
2020-09-28 19:28:21 +00:00
-DCMAKE_INSTALL_PREFIX="build/distrib" \
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
-DPACKAGE_PREFIX="build/package" \
2021-03-23 16:53:21 +00:00
-DDOWNLOAD_QT=ON \
-DDOWNLOAD_OBS_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBS_VERSION }}/obs-studio-x64-0.0.0.0-windows-64.7z" \
-DDOWNLOAD_OBS_HASH="SHA256=EA9EE4CCEC0A19605C0768F1F4C21391A919CF0886F7A7CC94D63A95402CFD9B" \
-DDOWNLOAD_OBSDEPS_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBSDEPS_VERSION }}/deps_windows_x86.7z" \
-DDOWNLOAD_OBSDEPS_HASH="SHA256=F5F8F5A53FDB26FF8F4D24811CA0FEA891B3A0C8477515B886129669A81D37C2" \
-DDOWNLOAD_QT_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBSDEPS_VERSION }}/qt_${{ env.QT_VERSION }}_windows_64.7z" \
-DDOWNLOAD_QT_HASH="SHA256=109B9C21EF165B0C46DFAA9AD23124F2070ED4D74207C4AFB308183CB8D43BDD"
2021-03-23 15:42:34 +00:00
- name: "StreamFX: Build"
shell: bash
2020-01-14 08:31:41 +00:00
run: |
cmake --build "build/temp" --config RelWithDebInfo --target INSTALL
2021-03-23 15:42:34 +00:00
- name: "StreamFX: Package (Install Prerequisites)"
run: |
curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.0.3.exe" "-f" "--retry" "5" "-o" "inno.exe"
.\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART
- name: "StreamFX: Package"
shell: bash
run: |
2020-02-13 09:15:23 +00:00
mkdir build/package
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
2021-03-23 15:42:34 +00:00
- name: "StreamFX: Package Installer"
run: |
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\temp\installer.iss"
2021-03-23 15:42:34 +00:00
- name: "Artifacts"
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.id }}
path: build/package
ubuntu:
name: "Ubuntu 64-bit"
strategy:
2020-11-02 16:04:29 +00:00
fail-fast: true
matrix:
ubuntu: [ focal ]
compiler: [ gcc, clang ]
include:
- ubuntu: focal
compiler: gcc
compiler-cxx: g++
runner: ubuntu-20.04
packages: gcc-9 g++9
extra_command: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 800 --slave /usr/bin/g++ g++ /usr/bin/g++-9
id: ubuntu-20.04
- ubuntu: focal
compiler: clang
2020-09-28 19:28:21 +00:00
compiler-cxx: clang++
compiler-version: 9
runner: ubuntu-20.04
2020-09-28 19:28:21 +00:00
packages: clang-9 clang-format-9 clang-tidy-9
extra_command: ""
id: ubuntu-20.04-clang
runs-on: ${{ matrix.runner }}
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler-cxx }}
2021-03-23 16:53:21 +00:00
CMAKE_GENERATOR: "Ninja"
steps:
2021-03-23 15:42:34 +00:00
- name: "Clone"
uses: actions/checkout@v2
with:
submodules: recursive
2021-03-23 15:42:34 +00:00
fetch-depth: 0
- name: "Prerequisites: Apt-Get"
shell: bash
run: |
sudo apt-get -qq update
sudo apt-get purge libjpeg9-dev:amd64 libjpeg8-dev:amd64 libjpeg-turbo8-dev:amd64
sudo apt-get install \
build-essential \
cmake \
ninja-build \
git \
2020-08-10 00:46:25 +00:00
qt5-default libqwt-qt5-dev libqt5svg5-dev \
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \
libcurl4-openssl-dev \
${{ matrix.packages }} \
checkinstall pkg-config
${{ matrix.extra_command }}
2021-03-23 15:42:34 +00:00
- name: "libobs: Cache"
uses: actions/cache@v2
with:
2021-03-23 15:42:34 +00:00
path: |
build/temp/libobs-download
2021-03-23 16:53:21 +00:00
build/temp/libobs-build
build/temp/libobs-src
key: libobs-${{ matrix.id }}-${{ env.OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH }}-${{ secrets.CACHE_VERSION }}
2021-03-23 15:42:34 +00:00
- name: "StreamFX: Configure"
shell: bash
run: |
2020-09-28 19:28:21 +00:00
cmake -H. -B"build/temp" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
2020-09-28 19:28:21 +00:00
-DCMAKE_INSTALL_PREFIX="build/distrib" \
-DENABLE_FILTER_NVIDIA_FACE_TRACKING=FALSE \
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
2021-03-23 16:53:21 +00:00
-DPACKAGE_PREFIX="build/package" \
-DDOWNLOAD_OBS_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBS_VERSION }}/obs-studio-x64-0.0.0.0-ubuntu-64.7z" \
-DDOWNLOAD_OBS_HASH="SHA256=2B2793CDD0C3F5940924665022E31A76C10E34174073BF7B221325C11E764DF5"
2021-03-23 15:42:34 +00:00
- name: "StreamFX: Build"
shell: bash
run: |
cmake --build "build/temp" --config RelWithDebInfo --target install
2021-03-23 15:42:34 +00:00
- name: "StreamFX: Package"
shell: bash
run: |
2020-02-13 09:15:23 +00:00
mkdir build/package
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
2021-03-23 15:42:34 +00:00
- name: "Artifacts"
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.id }}
path: build/package
macos:
strategy:
fail-fast: true
2021-03-22 21:30:05 +00:00
matrix:
runner: [ macos-latest ]
include:
- runner: macos-latest
id: macos-10.15
target-version: "10.15"
name: "MacOS (${{ matrix.target-version }})"
runs-on: ${{ matrix.runner }}
env:
CMAKE_GENERATOR: "Xcode"
CMAKE_OSX_DEPLOYMENT_TARGET: "${{ matrix.target-version }}"
steps:
2021-03-23 15:42:34 +00:00
- name: "Clone"
uses: actions/checkout@v2
with:
submodules: recursive
2021-03-23 15:42:34 +00:00
fetch-depth: 0
- name: "libobs: Cache"
uses: actions/cache@v2
with:
path: |
build/temp/libobs-download
2021-03-23 16:53:21 +00:00
build/temp/libobs-build
build/temp/libobs-src
key: libobs-${{ matrix.id }}-${{ env.OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH }}-${{ secrets.CACHE_VERSION }}
2021-03-23 15:42:34 +00:00
- name: "obsdeps: Cache"
uses: actions/cache@v2
with:
path: |
build/temp/obsdeps-download
2021-03-23 16:53:21 +00:00
build/temp/obsdeps-build
build/temp/obsdeps-src
key: obsdeps-${{ matrix.id }}-${{ env.OBSDEPS_VERSION }}-${{ env.DOWNLOAD_OBSDEPS_HASH }}-${{ secrets.CACHE_VERSION }}
2021-03-23 15:42:34 +00:00
- name: "qt: Cache"
uses: actions/cache@v2
id: qt-cache
with:
path: |
/usr/local/Cellar/qt@5
2021-03-23 16:53:21 +00:00
key: qt-${{ matrix.id }}-${{ env.QT_VERSION }}-${{ secrets.CACHE_VERSION }}
- name: "qt: Install"
2021-03-23 15:42:34 +00:00
if: "steps.qt-cache.outputs.cache-hit != 'true'"
shell: bash
run: |
brew install qt@5
2021-03-23 15:42:34 +00:00
- name: "StreamFX: Configure"
shell: bash
run: |
cmake -H. -B"build/temp" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX="build/distrib" \
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
-DPACKAGE_PREFIX="build/package" \
2021-03-23 16:53:21 +00:00
-DQt5_DIR=$(brew --prefix)/Cellar/qt@5/${{ env.QT_VERSION }}/lib/cmake/Qt5 \
-DDOWNLOAD_OBS_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBS_VERSION }}/obs-studio-x64-0.0.0.0-macos-64.7z" \
-DDOWNLOAD_OBS_HASH="SHA256=34ABD3E574C62DA4E026E5DE271B93AB5151927E564F77264A59456F6ABCBDD0" \
-DDOWNLOAD_OBSDEPS_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBSDEPS_VERSION }}/deps_macos_x86.tar.gz" \
-DDOWNLOAD_OBSDEPS_HASH="SHA256=B316DD7802E0DEAE2BD43F52D4C8BD52EF893D203B90148C2AB851A00AA733FF"
2021-03-23 15:42:34 +00:00
- name: "StreamFX: Build"
shell: bash
run: |
cmake --build "build/temp" --config RelWithDebInfo --target install
2021-03-23 15:42:34 +00:00
- name: "StreamFX: Package"
shell: bash
run: |
mkdir build/package
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
2021-03-23 20:55:12 +00:00
- name: 'Packages: Install'
shell: bash
run: |
curl -L -O http://s.sudre.free.fr/Software/files/Packages.dmg
sudo hdiutil attach ./Packages.dmg
sudo installer -pkg /Volumes/Packages\ 1.2.9/Install\ Packages.pkg -target /
- name: "Packages: Package"
shell: bash
run: |
packagesbuild ./build/temp/installer.pkgproj
2021-03-23 15:42:34 +00:00
- name: "Artifacts"
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.id }}
path: build/package