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

166 lines
5.6 KiB
YAML
Raw Normal View History

name: Build
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:
- '*'
jobs:
windows:
name: "Windows 64-bit"
strategy:
matrix:
runner: [ windows-2019 ]
include:
- runner: windows-2019
id: windows2019
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:
- name: "Clone Repository"
uses: actions/checkout@v1
2020-03-25 19:23:47 +00:00
- name: "Clone Submodules"
shell: bash
run: git submodule update --init --recursive
- name: "Cache: Prerequisites"
uses: actions/cache@v2
with:
path: |
build/temp/qt-download/qt-download-prefix/src/qt.7z
build/temp/obsdeps-download/obsdeps-download-prefix/src/obsdeps.7z
build/temp/libobs-download/libobs-download-prefix/src/libobs.7z
key: ${{ matrix.id }}
2020-01-14 08:31:41 +00:00
- name: "Configure Project"
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_INSTALL_PREFIX="build/distrib" \
-DCMAKE_PACKAGE_NAME="streamfx-${{ matrix.id }}" \
-DCMAKE_PACKAGE_PREFIX="build/package"
2020-01-14 08:31:41 +00:00
- name: "Build Project"
shell: bash
2020-01-14 08:31:41 +00:00
run: |
cmake --build "build/temp" --config RelWithDebInfo --target INSTALL
2020-01-14 08:31:41 +00:00
- name: "Package Project"
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
- name: "Package Installer (Prereqs)"
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: "Package Installer (Compile)"
run: |
2020-02-13 09:25:33 +00:00
& 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' /Qp ".\build\temp\installer.iss"
- name: "Upload Artifacts"
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.id }}
path: build/package
ubuntu:
name: "Ubuntu 64-bit"
strategy:
matrix:
ubuntu: [ bionic, focal ]
compiler: [ gcc, clang ]
include:
- ubuntu: bionic
compiler: gcc
compiler-cxx: g++
runner: ubuntu-18.04
packages: gcc-8 g++8
extra_command: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
id: ubuntu-18.04
- ubuntu: bionic
compiler: clang
2020-09-28 19:28:21 +00:00
compiler-cxx: clang++
compiler-version: 8
runner: ubuntu-18.04
2020-09-28 19:28:21 +00:00
packages: clang-8 clang-format-8 clang-tidy-8
extra_command: ""
id: ubuntu-18.04-clang
- 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:
CMAKE_GENERATOR: "Ninja"
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler-cxx }}
steps:
- name: "Clone Repository"
uses: actions/checkout@v1
- name: "Prerequisites: Submodules"
2020-03-25 19:23:47 +00:00
shell: bash
run: git submodule update --init --recursive
- 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 }}
- name: "Cache: Prerequisites"
uses: actions/cache@v2
with:
path: |
build/temp/libobs-download/libobs-download-prefix/src/libobs.7z
key: ${{ matrix.id }}
- name: "Configure Project"
shell: bash
run: |
2020-09-28 19:28:21 +00:00
cmake -H. -B"build/temp" \
-DCMAKE_INSTALL_PREFIX="build/distrib" \
-DCMAKE_PACKAGE_NAME="streamfx-${{ matrix.id }}" \
-DCMAKE_PACKAGE_PREFIX="build/package" \
-DENABLE_FILTER_NVIDIA_FACE_TRACKING=FALSE
- name: "Build Project"
shell: bash
run: |
cmake --build "build/temp" --config RelWithDebInfo --target install
- name: "Package Project"
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
- name: "Upload Artifacts"
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.id }}
path: build/package