2023-02-28 01:15:26 +00:00
|
|
|
# AUTOGENERATED COPYRIGHT HEADER START
|
|
|
|
# Copyright (C) 2019-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
|
|
|
# AUTOGENERATED COPYRIGHT HEADER END
|
|
|
|
|
2020-04-02 18:22:44 +00:00
|
|
|
name: Build
|
2019-09-03 19:18:14 +00:00
|
|
|
|
2021-03-22 21:30:05 +00:00
|
|
|
on:
|
2020-04-23 23:55:40 +00:00
|
|
|
push:
|
2021-10-05 20:10:25 +00:00
|
|
|
branches:
|
2022-12-02 04:05:12 +00:00
|
|
|
- '*'
|
2020-09-25 19:06:59 +00:00
|
|
|
tags:
|
|
|
|
- '*'
|
2020-04-23 23:55:40 +00:00
|
|
|
pull_request:
|
2020-04-24 04:18:40 +00:00
|
|
|
branches:
|
|
|
|
- '*'
|
2019-09-03 19:18:14 +00:00
|
|
|
|
2022-06-02 05:42:04 +00:00
|
|
|
concurrency:
|
2023-02-28 04:14:08 +00:00
|
|
|
group: build-${{ github.ref_name }}
|
2022-06-02 05:42:04 +00:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-11-02 15:52:21 +00:00
|
|
|
env:
|
2022-12-02 04:05:12 +00:00
|
|
|
CACHE_VERSION: "2022-12-02"
|
2020-11-02 15:52:21 +00:00
|
|
|
|
2019-09-03 19:18:14 +00:00
|
|
|
jobs:
|
2023-05-13 20:27:45 +00:00
|
|
|
windows:
|
2020-04-02 18:22:44 +00:00
|
|
|
strategy:
|
2022-06-11 03:25:29 +00:00
|
|
|
fail-fast: false
|
2021-03-22 21:30:05 +00:00
|
|
|
matrix:
|
2023-05-13 20:30:00 +00:00
|
|
|
runner: [ "windows-2022" ]
|
|
|
|
name: [ "Windows" ]
|
2023-05-13 20:27:45 +00:00
|
|
|
compiler: [ "MSVC", "Clang" ]
|
2023-05-13 20:42:56 +00:00
|
|
|
qt: [ 6 ]
|
2020-04-02 18:22:44 +00:00
|
|
|
include:
|
2023-05-13 20:27:45 +00:00
|
|
|
- compiler: "MSVC"
|
2023-05-13 20:30:00 +00:00
|
|
|
package_name: "windows"
|
2022-08-13 14:49:08 +00:00
|
|
|
CMAKE_SYSTEM_VERSION: "10.0.20348.0"
|
2022-06-02 05:42:04 +00:00
|
|
|
CMAKE_GENERATOR: "Visual Studio 17 2022"
|
|
|
|
CMAKE_GENERATOR_PLATFORM: "x64"
|
2023-05-13 20:27:45 +00:00
|
|
|
- compiler: "Clang"
|
2023-05-13 20:30:00 +00:00
|
|
|
package_name: "windows-clang"
|
2023-05-13 20:27:45 +00:00
|
|
|
CMAKE_SYSTEM_VERSION: "10.0.20348.0"
|
|
|
|
CMAKE_GENERATOR: "Visual Studio 17 2022"
|
|
|
|
CMAKE_GENERATOR_TOOLSET: "ClangCL"
|
|
|
|
CMAKE_GENERATOR_PLATFORM: "x64"
|
2022-08-14 08:31:43 +00:00
|
|
|
runs-on: "${{ matrix.runner }}"
|
2023-05-13 20:27:45 +00:00
|
|
|
name: "${{ matrix.name }} (${{ matrix.compiler }})"
|
2020-04-02 18:22:44 +00:00
|
|
|
env:
|
2022-08-13 14:49:08 +00:00
|
|
|
CMAKE_GENERATOR: "${{ matrix.CMAKE_GENERATOR }}"
|
|
|
|
CMAKE_GENERATOR_PLATFORM: "${{ matrix.CMAKE_GENERATOR_PLATFORM }}"
|
|
|
|
CMAKE_GENERATOR_TOOLSET: "${{ matrix.CMAKE_GENERATOR_TOOLSET }}"
|
|
|
|
CMAKE_SYSTEM_VERSION: "${{ matrix.CMAKE_SYSTEM_VERSION }}"
|
2020-02-13 09:11:33 +00:00
|
|
|
steps:
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "Clone"
|
2022-06-02 05:42:04 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-02-18 22:13:43 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-03-23 15:42:34 +00:00
|
|
|
fetch-depth: 0
|
2023-05-13 20:27:45 +00:00
|
|
|
- name: "Gather Information"
|
|
|
|
id: info
|
2023-01-30 12:19:08 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-13 20:27:45 +00:00
|
|
|
# Define buildspec file
|
|
|
|
buildspec="${{ github.workspace }}/third-party/obs-studio/buildspec.json"
|
2023-01-30 12:19:08 +00:00
|
|
|
|
2023-05-13 20:27:45 +00:00
|
|
|
# Prebuilt Dependencies Version
|
|
|
|
IFS=$'\n' buildspecdata=($(node tools/buildspec.js "${buildspec}" "prebuilt" "windows-x64"))
|
2023-05-13 23:25:03 +00:00
|
|
|
echo "obs_deps_version=${buildspecdata[0]}" >> "$GITHUB_ENV"
|
|
|
|
echo "obs_deps_hash=${buildspecdata[1]}" >> "$GITHUB_ENV"
|
|
|
|
echo "obs_deps_url=${buildspecdata[2]}" >> "$GITHUB_ENV"
|
2023-05-13 20:27:45 +00:00
|
|
|
|
|
|
|
# Qt Version
|
|
|
|
IFS=$'\n' buildspecdata=($(node tools/buildspec.js "${buildspec}" "qt${{ matrix.qt }}" "windows-x64"))
|
2023-05-13 23:25:03 +00:00
|
|
|
echo "qt_version=${buildspecdata[0]}" >> "$GITHUB_ENV"
|
|
|
|
echo "qt_hash=${buildspecdata[1]}" >> "$GITHUB_ENV"
|
|
|
|
echo "qt_url=${buildspecdata[2]}" >> "$GITHUB_ENV"
|
2023-05-13 20:27:45 +00:00
|
|
|
|
|
|
|
# libOBS Version
|
2023-05-13 23:25:03 +00:00
|
|
|
echo "obs_version=$(cd "${{ github.workspace }}/third-party/obs-studio" && git describe --tags --long)" >> "$GITHUB_ENV"
|
2023-05-13 20:27:45 +00:00
|
|
|
- name: "Dependency: Qt (Cache)"
|
|
|
|
id: qt-cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: "${{ github.workspace }}/build/qt"
|
|
|
|
key: "qt${{ env.qt_hash }}-${{ env.CACHE_VERSION }}"
|
|
|
|
- name: "Dependency: Qt"
|
|
|
|
id: qt
|
|
|
|
if: ${{ steps.qt-cache.outputs.cache-hit != 'true' }}
|
|
|
|
shell: bash
|
2023-01-30 12:19:08 +00:00
|
|
|
run: |
|
2023-05-13 20:27:45 +00:00
|
|
|
curl --retry 5 --retry-delay 30 -jLo /tmp/qt.zip "${{ env.qt_url }}"
|
|
|
|
if [[ ! -f "${{ github.workspace }}/build/qt" ]]; then mkdir -p "${{ github.workspace }}/build/qt"; fi
|
|
|
|
7z x -y -o"${{ github.workspace }}/build/qt" -- "/tmp/qt.zip"
|
|
|
|
- name: "Dependency: Prebuilt OBS Studio Dependencies (Cache)"
|
|
|
|
id: obsdeps-cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: "${{ github.workspace }}/build/obsdeps"
|
|
|
|
key: "obsdeps${{ env.obs_deps_hash }}-${{ env.CACHE_VERSION }}"
|
|
|
|
- name: "Dependency: Prebuilt OBS Studio Dependencies"
|
|
|
|
id: obsdeps
|
|
|
|
if: ${{ steps.obsdeps-cache.outputs.cache-hit != 'true' }}
|
2023-01-30 12:19:08 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-13 20:27:45 +00:00
|
|
|
curl --retry 5 --retry-delay 30 -jLo /tmp/obsdeps.zip "${{ env.obs_deps_url }}"
|
|
|
|
if [[ ! -f "${{ github.workspace }}/build/obsdeps" ]]; then mkdir -p "${{ github.workspace }}/build/obsdeps"; fi
|
|
|
|
7z x -y -o"${{ github.workspace }}/build/obsdeps" -- "/tmp/obsdeps.zip"
|
|
|
|
- name: "Dependency: OBS Libraries (Cache)"
|
|
|
|
id: obs-cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: "${{ github.workspace }}/build/obs"
|
|
|
|
key: "obs${{ env.obs_version }}-obsdeps${{ env.obs_deps_hash }}-qt${{ env.qt_hash }}-${{ env.CACHE_VERSION }}"
|
|
|
|
- name: "Dependency: OBS Libraries"
|
|
|
|
id: obs
|
|
|
|
if: ${{ steps.obs-cache.outputs.cache-hit != 'true' }}
|
2023-01-30 12:19:08 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-13 20:27:45 +00:00
|
|
|
cmake \
|
|
|
|
-S "${{ github.workspace }}/third-party/obs-studio" \
|
|
|
|
-B "${{ github.workspace }}/build/obs" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/obs/install" \
|
|
|
|
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/build/obsdeps;${{ github.workspace }}/build/qt" \
|
|
|
|
-DENABLE_PLUGINS=OFF \
|
|
|
|
-DENABLE_UI=OFF \
|
|
|
|
-DENABLE_SCRIPTING=OFF
|
|
|
|
cmake \
|
|
|
|
--build "${{ github.workspace }}/build/obs" \
|
2023-05-13 21:02:25 +00:00
|
|
|
--config RelWithDebInfo \
|
2023-05-13 20:27:45 +00:00
|
|
|
--target obs-frontend-api
|
|
|
|
cmake \
|
|
|
|
--install "${{ github.workspace }}/build/obs" \
|
2023-05-13 21:02:25 +00:00
|
|
|
--config RelWithDebInfo \
|
2023-05-13 20:27:45 +00:00
|
|
|
--component obs_libraries
|
|
|
|
- name: "Configure"
|
|
|
|
continue-on-error: true
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake \
|
|
|
|
-S "${{ github.workspace }}" \
|
|
|
|
-B "${{ github.workspace }}/build/ci" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/ci/install" \
|
|
|
|
-DPACKAGE_NAME="streamfx-${{ matrix.package_name }}" \
|
|
|
|
-DPACKAGE_PREFIX="${{ github.workspace }}/build/package" \
|
2023-05-13 23:27:45 +00:00
|
|
|
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/build/obs/install;${{ github.workspace }}/build/qt;${{ github.workspace }}/build/obsdeps" \
|
|
|
|
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
|
2023-05-13 20:27:45 +00:00
|
|
|
- name: "Build: Debug"
|
|
|
|
continue-on-error: true
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
CMAKE_BUILD_TYPE: "Debug"
|
|
|
|
run: |
|
|
|
|
cmake --build "build/ci" --config ${{ env.CMAKE_BUILD_TYPE }} --target StreamFX
|
|
|
|
- name: "Build: Release"
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
CMAKE_BUILD_TYPE: "RelWithDebInfo"
|
|
|
|
run: |
|
|
|
|
cmake --build "build/ci" --config ${{ env.CMAKE_BUILD_TYPE }} --target install
|
|
|
|
- name: "Packaging: Install InnoSetup"
|
2023-01-30 12:19:08 +00:00
|
|
|
if: startsWith( matrix.runner, 'windows' )
|
|
|
|
run: |
|
|
|
|
curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.2.1.exe" "-f" "--retry" "5" "-o" "inno.exe"
|
|
|
|
.\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART
|
2023-05-13 20:27:45 +00:00
|
|
|
- name: "Packaging"
|
|
|
|
shell: cmd
|
2023-01-30 12:19:08 +00:00
|
|
|
run: |
|
2023-05-13 20:27:45 +00:00
|
|
|
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\ci\installer.iss"
|
|
|
|
- name: "Artifacts"
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: "${{ matrix.runner }}-${{ matrix.compiler }}-qt${{ matrix.qt }}"
|
|
|
|
path: "${{ github.workspace }}/build/package"
|
2023-01-30 12:19:08 +00:00
|
|
|
|
2023-05-13 20:27:45 +00:00
|
|
|
macos:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-05-13 20:30:40 +00:00
|
|
|
runner: [ "macos-12" ]
|
2023-05-13 20:27:45 +00:00
|
|
|
compiler: [ "Clang" ]
|
2023-05-13 20:42:56 +00:00
|
|
|
qt: [ 6 ]
|
2023-05-13 20:27:45 +00:00
|
|
|
include:
|
|
|
|
- compiler: "Clang"
|
2023-05-13 20:30:00 +00:00
|
|
|
name: "MacOS"
|
|
|
|
package_name: "macos"
|
2023-05-13 20:27:45 +00:00
|
|
|
CMAKE_GENERATOR: "Xcode"
|
|
|
|
CMAKE_OSX_DEPLOYMENT_TARGET: "10.15"
|
|
|
|
CMAKE_OSX_ARCHITECTURES: "x86_64;arm64"
|
|
|
|
runs-on: "${{ matrix.runner }}"
|
|
|
|
name: "${{ matrix.name }} (${{ matrix.compiler }})"
|
|
|
|
env:
|
|
|
|
CMAKE_GENERATOR: "${{ matrix.CMAKE_GENERATOR }}"
|
|
|
|
CMAKE_GENERATOR_PLATFORM: "${{ matrix.CMAKE_GENERATOR_PLATFORM }}"
|
|
|
|
CMAKE_GENERATOR_TOOLSET: "${{ matrix.CMAKE_GENERATOR_TOOLSET }}"
|
|
|
|
CMAKE_SYSTEM_VERSION: "${{ matrix.CMAKE_SYSTEM_VERSION }}"
|
|
|
|
CMAKE_OSX_DEPLOYMENT_TARGET: "${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}"
|
|
|
|
CMAKE_OSX_ARCHITECTURES: "${{ matrix.CMAKE_OSX_ARCHITECTURES }}"
|
|
|
|
steps:
|
|
|
|
- name: "Clone"
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: "Gather Information"
|
2022-08-14 08:31:43 +00:00
|
|
|
id: info
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-13 17:50:20 +00:00
|
|
|
# Define buildspec file
|
|
|
|
buildspec="${{ github.workspace }}/third-party/obs-studio/buildspec.json"
|
|
|
|
|
|
|
|
# Prebuilt Dependencies Version
|
2023-05-13 20:27:45 +00:00
|
|
|
IFS=$'\n' buildspecdata=($(node tools/buildspec.js "${buildspec}" "prebuilt" "macos-universal"))
|
2023-05-13 23:25:03 +00:00
|
|
|
echo "obs_deps_version=${buildspecdata[0]}" >> "$GITHUB_ENV"
|
|
|
|
echo "obs_deps_hash=${buildspecdata[1]}" >> "$GITHUB_ENV"
|
|
|
|
echo "obs_deps_url=${buildspecdata[2]}" >> "$GITHUB_ENV"
|
2023-05-13 17:50:20 +00:00
|
|
|
|
|
|
|
# Qt Version
|
2023-05-13 20:27:45 +00:00
|
|
|
IFS=$'\n' buildspecdata=($(node tools/buildspec.js "${buildspec}" "qt${{ matrix.qt }}" "macos-universal"))
|
2023-05-13 23:25:03 +00:00
|
|
|
echo "qt_version=${buildspecdata[0]}" >> "$GITHUB_ENV"
|
|
|
|
echo "qt_hash=${buildspecdata[1]}" >> "$GITHUB_ENV"
|
|
|
|
echo "qt_url=${buildspecdata[2]}" >> "$GITHUB_ENV"
|
2023-05-13 17:50:20 +00:00
|
|
|
|
|
|
|
# libOBS Version
|
2023-05-13 23:25:03 +00:00
|
|
|
echo "obs_version=$(cd "${{ github.workspace }}/third-party/obs-studio" && git describe --tags --long)" >> "$GITHUB_ENV"
|
2022-08-14 08:31:43 +00:00
|
|
|
- name: "Dependency: Qt (Cache)"
|
|
|
|
id: qt-cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: "${{ github.workspace }}/build/qt"
|
2023-05-13 20:27:45 +00:00
|
|
|
key: "qt${{ env.qt_hash }}-${{ env.CACHE_VERSION }}"
|
2023-05-13 18:51:45 +00:00
|
|
|
- name: "Dependency: Qt"
|
2022-08-14 08:31:43 +00:00
|
|
|
id: qt
|
2023-05-13 20:27:45 +00:00
|
|
|
if: ${{ steps.qt-cache.outputs.cache-hit != 'true' }}
|
2022-08-14 08:31:43 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-13 20:27:45 +00:00
|
|
|
curl --retry 5 --retry-delay 30 -jLo /tmp/qt.tar.xz "${{ env.qt_url }}"
|
|
|
|
if [[ ! -f "${{ github.workspace }}/build/qt" ]]; then mkdir -p "${{ github.workspace }}/build/qt"; fi
|
|
|
|
tar -xvf "/tmp/qt.tar.xz" -C "${{ github.workspace }}/build/qt"
|
|
|
|
- name: "Dependency: Prebuilt OBS Studio Dependencies (Cache)"
|
2022-08-14 08:31:43 +00:00
|
|
|
id: obsdeps-cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: "${{ github.workspace }}/build/obsdeps"
|
2023-05-13 20:27:45 +00:00
|
|
|
key: "obsdeps${{ env.obs_deps_hash }}-${{ env.CACHE_VERSION }}"
|
|
|
|
- name: "Dependency: Prebuilt OBS Studio Dependencies"
|
2022-08-14 08:31:43 +00:00
|
|
|
id: obsdeps
|
2023-05-13 20:27:45 +00:00
|
|
|
if: ${{ steps.obsdeps-cache.outputs.cache-hit != 'true' }}
|
2022-08-14 08:31:43 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-13 20:27:45 +00:00
|
|
|
curl --retry 5 --retry-delay 30 -jLo /tmp/obsdeps.tar.xz "${{ env.obs_deps_url }}"
|
|
|
|
if [[ ! -f "${{ github.workspace }}/build/obsdeps" ]]; then mkdir -p "${{ github.workspace }}/build/obsdeps"; fi
|
|
|
|
tar -xvf "/tmp/obsdeps.tar.xz" -C "${{ github.workspace }}/build/obsdeps"
|
|
|
|
- name: "Dependency: OBS Libraries (Cache)"
|
|
|
|
id: obs-cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: "${{ github.workspace }}/build/obs"
|
|
|
|
key: "obs${{ env.obs_version }}-obsdeps${{ env.obs_deps_hash }}-qt${{ env.qt_hash }}-${{ env.CACHE_VERSION }}"
|
2022-08-14 08:31:43 +00:00
|
|
|
- name: "Dependency: OBS Libraries"
|
|
|
|
id: obs
|
|
|
|
if: ${{ steps.obs-cache.outputs.cache-hit != 'true' }}
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake \
|
2022-08-18 19:17:10 +00:00
|
|
|
-S "${{ github.workspace }}/third-party/obs-studio" \
|
|
|
|
-B "${{ github.workspace }}/build/obs" \
|
2022-08-14 08:31:43 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/obs/install" \
|
2023-05-13 19:25:51 +00:00
|
|
|
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/build/obsdeps;${{ github.workspace }}/build/qt" \
|
2022-08-14 08:31:43 +00:00
|
|
|
-DENABLE_PLUGINS=OFF \
|
|
|
|
-DENABLE_UI=OFF \
|
2023-05-13 20:27:45 +00:00
|
|
|
-DENABLE_SCRIPTING=OFF
|
2022-08-14 08:31:43 +00:00
|
|
|
cmake \
|
|
|
|
--build "${{ github.workspace }}/build/obs" \
|
2023-05-13 21:02:25 +00:00
|
|
|
--config RelWithDebInfo \
|
2022-08-14 08:31:43 +00:00
|
|
|
--target obs-frontend-api
|
|
|
|
cmake \
|
|
|
|
--install "${{ github.workspace }}/build/obs" \
|
2023-05-13 21:02:25 +00:00
|
|
|
--config RelWithDebInfo \
|
2022-08-14 08:31:43 +00:00
|
|
|
--component obs_libraries
|
2023-02-28 04:00:42 +00:00
|
|
|
- name: "Configure"
|
2022-08-13 14:49:08 +00:00
|
|
|
continue-on-error: true
|
2021-02-18 22:13:43 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-08-14 08:31:43 +00:00
|
|
|
cmake \
|
2022-08-18 19:17:10 +00:00
|
|
|
-S "${{ github.workspace }}" \
|
2023-02-28 04:00:42 +00:00
|
|
|
-B "${{ github.workspace }}/build/ci" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/ci/install" \
|
2023-05-03 15:17:02 +00:00
|
|
|
-DPACKAGE_NAME="streamfx-${{ matrix.package_name }}" \
|
2022-08-14 08:31:43 +00:00
|
|
|
-DPACKAGE_PREFIX="${{ github.workspace }}/build/package" \
|
2023-05-13 23:27:45 +00:00
|
|
|
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/build/obs/install;${{ github.workspace }}/build/qt;${{ github.workspace }}/build/obsdeps" \
|
|
|
|
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
|
2023-02-28 04:00:42 +00:00
|
|
|
- name: "Build: Debug"
|
|
|
|
continue-on-error: true
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-13 20:27:45 +00:00
|
|
|
cmake --build "build/ci" --config Debug --target StreamFX
|
2023-02-28 04:00:42 +00:00
|
|
|
- name: "Build: Release"
|
2022-08-03 05:33:16 +00:00
|
|
|
shell: bash
|
2022-08-14 08:31:43 +00:00
|
|
|
env:
|
|
|
|
CMAKE_BUILD_TYPE: "RelWithDebInfo"
|
2022-08-03 05:33:16 +00:00
|
|
|
run: |
|
2023-05-13 20:27:45 +00:00
|
|
|
cmake --build "build/ci" --config RelWithDebInfo --target install
|
|
|
|
- name: 'Packaging: Install Packages'
|
|
|
|
if: startsWith( matrix.runner, 'macos' )
|
2021-02-18 22:13:43 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-13 20:27:45 +00:00
|
|
|
curl -kL https://cdn.xaymar.com/ci/Packages-1.2.10.dmg -f --retry 5 -o "Packages.dmg"
|
|
|
|
sudo hdiutil attach ./Packages.dmg
|
|
|
|
pushd /Volumes/Packages*
|
|
|
|
sudo installer -pkg ./Install\ Packages.pkg -target /
|
|
|
|
- name: "Packaging"
|
2022-06-02 05:42:04 +00:00
|
|
|
shell: cmd
|
|
|
|
run: |
|
2023-02-28 04:00:42 +00:00
|
|
|
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\ci\installer.iss"
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "Artifacts"
|
2021-02-18 22:13:43 +00:00
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2023-05-13 20:27:45 +00:00
|
|
|
name: "${{ matrix.runner }}-${{ matrix.compiler }}-qt${{ matrix.qt }}"
|
2022-08-14 08:31:43 +00:00
|
|
|
path: "${{ github.workspace }}/build/package"
|
2023-01-30 12:19:08 +00:00
|
|
|
|
2023-05-13 20:27:45 +00:00
|
|
|
ubuntu:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
runner: [ "ubuntu-22.04", "ubuntu-20.04" ]
|
2023-05-13 23:14:50 +00:00
|
|
|
compiler: [ "GCC-12", "GCC-11", "GCC-10", "Clang-16", "Clang-15", "Clang-14" ]
|
2023-05-13 20:27:45 +00:00
|
|
|
qt: [ 5, 6 ]
|
2023-05-13 23:14:50 +00:00
|
|
|
CMAKE_GENERATOR: [ "Ninja Multi-Config" ]
|
2023-05-13 20:27:45 +00:00
|
|
|
exclude:
|
|
|
|
- runner: "ubuntu-22.04"
|
|
|
|
qt: 5
|
2023-05-13 23:14:50 +00:00
|
|
|
- runner: "ubuntu-22.04"
|
|
|
|
compiler: "gcc-10"
|
2023-05-13 20:27:45 +00:00
|
|
|
- runner: "ubuntu-20.04"
|
|
|
|
qt: 6
|
2023-05-13 23:14:50 +00:00
|
|
|
- runner: "ubuntu-20.04"
|
|
|
|
compiler: "gcc-12"
|
2023-05-13 20:27:45 +00:00
|
|
|
include:
|
|
|
|
- runner: "ubuntu-22.04"
|
|
|
|
name: "Ubuntu 22.04"
|
|
|
|
package_name: "ubuntu22.04-qt6"
|
|
|
|
- runner: "ubuntu-20.04"
|
|
|
|
name: "Ubuntu 20.04"
|
|
|
|
package_name: "ubuntu20.04-qt5"
|
|
|
|
runs-on: "${{ matrix.runner }}"
|
|
|
|
name: "${{ matrix.name }} (${{ matrix.compiler }}, Qt${{ matrix.qt }})"
|
|
|
|
env:
|
|
|
|
CMAKE_GENERATOR: "${{ matrix.CMAKE_GENERATOR }}"
|
|
|
|
CMAKE_GENERATOR_PLATFORM: "${{ matrix.CMAKE_GENERATOR_PLATFORM }}"
|
|
|
|
CMAKE_GENERATOR_TOOLSET: "${{ matrix.CMAKE_GENERATOR_TOOLSET }}"
|
|
|
|
CMAKE_SYSTEM_VERSION: "${{ matrix.CMAKE_SYSTEM_VERSION }}"
|
2023-05-13 23:14:50 +00:00
|
|
|
PACKAGE_NAME: "streamfx-${{ matrix.package_name }}"
|
2023-05-13 20:27:45 +00:00
|
|
|
steps:
|
|
|
|
- name: "Clone"
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: "Install Build Tools"
|
|
|
|
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 \
|
|
|
|
checkinstall \
|
|
|
|
pkg-config \
|
|
|
|
cmake \
|
|
|
|
ninja-build \
|
|
|
|
git
|
2023-05-13 23:18:42 +00:00
|
|
|
IFS=$'-' compiler=($(echo "${{ matrix.compiler }}")) # ToDo: Can this be done without invoking a sub-shell?
|
2023-05-13 23:14:50 +00:00
|
|
|
if [[ "${compiler[0]}" == "GCC" ]]; then
|
2023-05-13 23:42:28 +00:00
|
|
|
sudo apt-get purge "gcc" "g++"
|
2023-05-13 23:14:50 +00:00
|
|
|
sudo apt-get install \
|
2023-05-13 23:25:03 +00:00
|
|
|
binutils gcc-${compiler[1]} g++-${compiler[1]}
|
2023-05-13 23:14:50 +00:00
|
|
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${compiler[1]} 800 --slave /usr/bin/g++ g++ /usr/bin/g++-${compiler[1]}
|
2023-05-13 23:25:03 +00:00
|
|
|
echo "CMAKE_C_COMPILER=gcc-${compiler[1]}" >> "$GITHUB_ENV"
|
|
|
|
echo "CMAKE_CXX_COMPILER=g++-${compiler[1]}" >> "$GITHUB_ENV"
|
|
|
|
echo "CMAKE_C_FLAGS=-fuse-ld=ld" >> "$GITHUB_ENV"
|
|
|
|
echo "CMAKE_CXX_FLAGS=-fuse-ld=ld" >> "$GITHUB_ENV"
|
2023-05-13 23:14:50 +00:00
|
|
|
elif [[ "${compiler[0]}" == "Clang" ]]; then
|
2023-05-13 23:42:28 +00:00
|
|
|
sudo apt-get purge "clang" "clangd" "clang++" "lld" "clang-format" "clang-tidy"
|
2023-05-13 20:27:45 +00:00
|
|
|
curl -jLo /tmp/llvm.sh "https://apt.llvm.org/llvm.sh"
|
|
|
|
chmod +x /tmp/llvm.sh
|
2023-05-13 23:14:50 +00:00
|
|
|
sudo /tmp/llvm.sh ${compiler[1]} all
|
|
|
|
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${compiler[1]} 800
|
|
|
|
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-${compiler[1]} 800
|
|
|
|
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${compiler[1]} 800
|
|
|
|
sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-${compiler[1]} 800
|
|
|
|
sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-${compiler[1]} 800
|
|
|
|
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${compiler[1]} 800
|
|
|
|
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${compiler[1]} 800
|
2023-05-13 23:25:03 +00:00
|
|
|
echo "CMAKE_C_COMPILER=clang-${compiler[1]}" >> "$GITHUB_ENV"
|
|
|
|
echo "CMAKE_CXX_COMPILER=clang++-${compiler[1]}" >> "$GITHUB_ENV"
|
|
|
|
echo "CMAKE_C_FLAGS=-fuse-ld=ld.lld" >> "$GITHUB_ENV"
|
|
|
|
echo "CMAKE_CXX_FLAGS=-fuse-ld=ld.lld" >> "$GITHUB_ENV"
|
2023-05-13 23:14:50 +00:00
|
|
|
else
|
|
|
|
echo "Unknown Compiler"
|
|
|
|
exit 1
|
2023-05-13 20:27:45 +00:00
|
|
|
fi
|
2023-05-13 23:14:50 +00:00
|
|
|
|
|
|
|
# Adjust package name
|
2023-05-13 23:25:03 +00:00
|
|
|
echo "PACKAGE_NAME=${{ env.PACKAGE_NAME }}-${compiler[0]}${compiler[1]}" >> "$GITHUB_ENV"
|
2023-05-13 20:27:45 +00:00
|
|
|
- name: "Dependency: Qt"
|
|
|
|
id: qt
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
if [[ ${{ matrix.qt }} -eq 5 ]]; then
|
|
|
|
sudo apt-get -y install -V \
|
|
|
|
qtbase5-dev qtbase5-private-dev libqt5svg5-dev
|
|
|
|
elif [[ ${{ matrix.qt }} -eq 6 ]]; then
|
|
|
|
sudo apt-get -y install -V \
|
|
|
|
qt6-base-dev qt6-base-private-dev libqt6svg6-dev libgles2-mesa-dev libegl1-mesa-dev libgl1-mesa-dev
|
|
|
|
fi
|
|
|
|
- name: "Dependency: Prebuilt OBS Studio Dependencies"
|
|
|
|
id: obsdeps
|
2023-01-30 12:19:08 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-13 20:27:45 +00:00
|
|
|
sudo apt-get -y install -V \
|
|
|
|
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \
|
|
|
|
libcurl4-openssl-dev
|
2023-05-13 20:56:06 +00:00
|
|
|
- name: "Dependency: OBS Libraries (Cache)"
|
|
|
|
id: obs-cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: "${{ github.workspace }}/build/obs"
|
2023-05-13 23:14:50 +00:00
|
|
|
key: "obs${{ env.obs_version }}-${{ matrix.runner }}-${{ matrix.compiler }}-${{ env.CACHE_VERSION }}"
|
2023-05-13 20:27:45 +00:00
|
|
|
- name: "Dependency: OBS Libraries"
|
|
|
|
id: obs
|
2023-05-13 20:56:06 +00:00
|
|
|
if: ${{ steps.obs-cache.outputs.cache-hit != 'true' }}
|
2023-05-13 20:27:45 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-05-13 20:56:06 +00:00
|
|
|
# Extra requirements by libobs on Linux.
|
|
|
|
sudo apt-get install \
|
|
|
|
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \
|
|
|
|
libx264-dev libcurl4-openssl-dev libmbedtls-dev libgl1-mesa-dev libjansson-dev libluajit-5.1-dev python3-dev \
|
|
|
|
libx11-dev libxcb-randr0-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcomposite-dev libxinerama-dev \
|
|
|
|
libxcb1-dev libx11-xcb-dev libxcb-xfixes0-dev swig libcmocka-dev libxss-dev libglvnd-dev libgles2-mesa \
|
|
|
|
libgles2-mesa-dev libwayland-dev \
|
|
|
|
libasound2-dev libfdk-aac-dev libfontconfig-dev libfreetype6-dev libjack-jackd2-dev libpulse-dev \
|
|
|
|
libsndio-dev libspeexdsp-dev libudev-dev libv4l-dev libva-dev libvlc-dev libdrm-dev
|
|
|
|
cmake \
|
|
|
|
-S "${{ github.workspace }}/third-party/obs-studio" \
|
|
|
|
-B "${{ github.workspace }}/build/obs" \
|
2023-05-13 23:14:50 +00:00
|
|
|
-G "Unix Makefiles" \
|
|
|
|
-DCMAKE_BUILD_TYPE="Release" \
|
2023-05-13 20:56:06 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/obs/install" \
|
|
|
|
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/build/obsdeps;${{ github.workspace }}/build/qt" \
|
|
|
|
-DENABLE_PLUGINS=OFF \
|
|
|
|
-DENABLE_UI=OFF \
|
|
|
|
-DENABLE_SCRIPTING=OFF
|
|
|
|
cmake \
|
|
|
|
--build "${{ github.workspace }}/build/obs" \
|
2023-05-13 23:14:50 +00:00
|
|
|
--config Release \
|
2023-05-13 20:56:06 +00:00
|
|
|
--target obs-frontend-api
|
|
|
|
cmake \
|
|
|
|
--install "${{ github.workspace }}/build/obs" \
|
2023-05-13 23:14:50 +00:00
|
|
|
--config Release \
|
2023-05-13 20:56:06 +00:00
|
|
|
--component obs_libraries
|
2023-05-13 20:27:45 +00:00
|
|
|
- name: "Configure"
|
|
|
|
continue-on-error: true
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake \
|
|
|
|
-S "${{ github.workspace }}" \
|
|
|
|
-B "${{ github.workspace }}/build/ci" \
|
2023-05-13 20:56:06 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/ci/install" \
|
2023-05-13 23:14:50 +00:00
|
|
|
-DPACKAGE_NAME="streamfx-${{ env.PACKAGE_NAME }}" \
|
2023-05-13 20:27:45 +00:00
|
|
|
-DPACKAGE_PREFIX="${{ github.workspace }}/build/package" \
|
2023-05-13 23:27:45 +00:00
|
|
|
-Dlibobs_DIR="${{ github.workspace }}/build/obs/install" \
|
|
|
|
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
|
2023-05-13 20:27:45 +00:00
|
|
|
- name: "Build: Debug"
|
|
|
|
continue-on-error: true
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake --build "build/ci" --config Debug --target StreamFX
|
|
|
|
- name: "Build: Release"
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake --build "build/ci" --config RelWithDebInfo --target install/strip
|
|
|
|
- name: "Packaging"
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir "${{ github.workspace }}/build/package"
|
|
|
|
cmake --build "${{ github.workspace }}/build/ci" --config RelWithDebInfo --target PACKAGE_7Z
|
|
|
|
- name: "Artifacts"
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: "${{ matrix.runner }}-${{ matrix.compiler }}-qt${{ matrix.qt }}"
|
|
|
|
path: "${{ github.workspace }}/build/package"
|