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:
|
|
|
|
- 'master'
|
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:
|
|
|
|
group: build-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-11-02 15:52:21 +00:00
|
|
|
env:
|
2022-08-18 19:35:16 +00:00
|
|
|
CACHE_VERSION: "2022-08-19"
|
2020-11-02 15:52:21 +00:00
|
|
|
|
2019-09-03 19:18:14 +00:00
|
|
|
jobs:
|
2022-06-02 05:42:04 +00:00
|
|
|
build:
|
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:
|
2022-08-14 08:31:43 +00:00
|
|
|
runner: [ "windows-2022", "macos-12", "ubuntu-22.04", "ubuntu-20.04" ]
|
|
|
|
qt: [ 5, 6 ]
|
|
|
|
generator: [ "MSVC", "GCC", "Clang" ]
|
2022-06-11 02:46:34 +00:00
|
|
|
exclude:
|
|
|
|
- runner: windows-2022
|
|
|
|
generator: GCC
|
2022-07-30 23:41:53 +00:00
|
|
|
- runner: windows-2022
|
|
|
|
generator: Clang
|
2022-06-11 02:46:34 +00:00
|
|
|
- runner: macos-12
|
|
|
|
generator: MSVC
|
|
|
|
- runner: macos-12
|
|
|
|
generator: GCC
|
2022-08-13 14:49:08 +00:00
|
|
|
- runner: ubuntu-22.04
|
2022-06-11 02:46:34 +00:00
|
|
|
generator: MSVC
|
2022-08-13 14:49:08 +00:00
|
|
|
- runner: ubuntu-20.04
|
2022-06-11 02:46:34 +00:00
|
|
|
generator: MSVC
|
2022-08-14 08:31:43 +00:00
|
|
|
- runner: ubuntu-20.04
|
|
|
|
qt: 6
|
2020-04-02 18:22:44 +00:00
|
|
|
include:
|
2022-08-13 14:49:08 +00:00
|
|
|
# Windows supports MSVC
|
2022-06-02 05:42:04 +00:00
|
|
|
- runner: windows-2022
|
2022-08-13 14:49:08 +00:00
|
|
|
name: "Windows"
|
|
|
|
package_name: "windows"
|
|
|
|
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"
|
2022-08-13 14:49:08 +00:00
|
|
|
|
|
|
|
# MacOS supports Clang
|
|
|
|
- runner: macos-12
|
|
|
|
name: "MacOS"
|
|
|
|
package_name: "macos"
|
|
|
|
CMAKE_GENERATOR: "Xcode"
|
|
|
|
CMAKE_OSX_DEPLOYMENT_TARGET: "10.15"
|
2022-08-14 08:31:43 +00:00
|
|
|
CMAKE_OSX_ARCHITECTURES: "x86_64;arm64"
|
2022-08-13 14:49:08 +00:00
|
|
|
|
|
|
|
# Ubuntu needs version-specific binaries
|
2022-06-02 05:42:04 +00:00
|
|
|
- runner: ubuntu-22.04
|
2022-08-13 14:49:08 +00:00
|
|
|
name: "Ubuntu 22.04"
|
|
|
|
package_name: "ubuntu-22"
|
2022-06-02 05:42:04 +00:00
|
|
|
CMAKE_GENERATOR: "Ninja"
|
|
|
|
- runner: ubuntu-20.04
|
2022-08-13 14:49:08 +00:00
|
|
|
name: "Ubuntu 20.04"
|
|
|
|
package_name: "ubuntu-20"
|
2022-06-02 05:42:04 +00:00
|
|
|
CMAKE_GENERATOR: "Ninja"
|
2022-08-13 14:49:08 +00:00
|
|
|
|
2022-08-14 08:31:43 +00:00
|
|
|
runs-on: "${{ matrix.runner }}"
|
|
|
|
name: "${{ matrix.name }} (${{ matrix.generator }}, Qt${{ matrix.qt }})"
|
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 }}"
|
2022-06-02 05:42:04 +00:00
|
|
|
CMAKE_OSX_DEPLOYMENT_TARGET: "${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}"
|
2022-08-13 14:49:08 +00:00
|
|
|
CMAKE_OSX_ARCHITECTURES: "${{ matrix.CMAKE_OSX_ARCHITECTURES }}"
|
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
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2022-08-14 08:31:43 +00:00
|
|
|
- name: "Gather Information"
|
|
|
|
id: info
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
# Dependency Versioning
|
|
|
|
if [[ "${{ matrix.runner }}" = windows* ]]; then
|
|
|
|
[[ $(cat "${{ github.workspace }}/third-party/obs-studio/.github/workflows/main.yml") =~ DEPS_VERSION_WIN:\ \'([0-9a-zA-Z\-]+)\' ]]
|
|
|
|
echo "::set-output name=obs_deps_version::${BASH_REMATCH[1]}"
|
|
|
|
elif [[ "${{ matrix.runner }}" = macos* ]]; then
|
|
|
|
[[ $(cat "${{ github.workspace }}/third-party/obs-studio/.github/workflows/main.yml") =~ DEPS_VERSION_MAC:\ \'([0-9a-zA-Z\-]+)\' ]]
|
|
|
|
echo "::set-output name=obs_deps_version::${BASH_REMATCH[1]}"
|
|
|
|
else
|
|
|
|
echo "::set-output name=obs_deps_version::BADVALUE"
|
|
|
|
fi
|
|
|
|
echo "::set-output name=obs_version::$(cd "${{ github.workspace }}/third-party/obs-studio" && git describe --tags --long)"
|
|
|
|
|
2022-08-18 19:17:10 +00:00
|
|
|
# CMake Flags
|
|
|
|
if [[ "${{ matrix.CMAKE_GENERATOR }}" != "" ]]; then
|
|
|
|
echo "::set-output name=cmake_generator::-G \"${{ matrix.CMAKE_GENERATOR }}\""
|
|
|
|
fi
|
|
|
|
if [[ "${{ matrix.CMAKE_GENERATOR_TOOLSET }}" != "" ]]; then
|
|
|
|
echo "::set-output name=cmake_generator_toolset::-T \"${{ matrix.CMAKE_GENERATOR_TOOLSET }}\""
|
|
|
|
fi
|
|
|
|
if [[ "${{ matrix.CMAKE_GENERATOR_PLATFORM }}" != "" ]]; then
|
|
|
|
echo "::set-output name=cmake_generator_platform::-A \"${{ matrix.CMAKE_GENERATOR_PLATFORM }}\""
|
|
|
|
fi
|
|
|
|
|
2022-08-03 05:27:35 +00:00
|
|
|
- name: "Dependencies: Windows"
|
|
|
|
if: startsWith( matrix.runner, 'windows' )
|
|
|
|
run: |
|
|
|
|
curl "-kL" "https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.4/LLVM-14.0.4-win64.exe" "-f" "--retry" "5" "-o" "llvm.exe"
|
|
|
|
7z x -y -o"C:\Program Files\LLVM" llvm.exe "bin" "include" "lib" "libexec" "share" "Uninstall.exe"
|
2022-08-14 06:57:29 +00:00
|
|
|
echo "CLANG_PATH=\"C:\\Program Files\\LLVM\\bin\"" >> "${GITHUB_ENV}"
|
2022-08-03 05:27:35 +00:00
|
|
|
curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.2.1.exe" "-f" "--retry" "5" "-o" "inno.exe"
|
|
|
|
.\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART
|
|
|
|
|
|
|
|
- name: "Dependencies: Linux"
|
2022-06-02 05:42:04 +00:00
|
|
|
if: startsWith( matrix.runner, 'ubuntu' )
|
2020-04-02 18:22:44 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo apt-get -qq update
|
2020-04-24 01:09:59 +00:00
|
|
|
sudo apt-get purge libjpeg9-dev:amd64 libjpeg8-dev:amd64 libjpeg-turbo8-dev:amd64
|
2020-04-02 22:17:36 +00:00
|
|
|
sudo apt-get install \
|
2020-04-24 01:09:59 +00:00
|
|
|
build-essential \
|
2021-08-28 12:36:42 +00:00
|
|
|
checkinstall \
|
|
|
|
pkg-config \
|
2020-04-02 22:17:36 +00:00
|
|
|
cmake \
|
|
|
|
ninja-build \
|
2022-08-14 08:31:43 +00:00
|
|
|
git
|
2022-08-13 14:49:08 +00:00
|
|
|
|
|
|
|
# clang-format, clang-tidy
|
|
|
|
curl -jLo /tmp/llvm.sh "https://apt.llvm.org/llvm.sh"
|
|
|
|
chmod +x /tmp/llvm.sh
|
|
|
|
sudo /tmp/llvm.sh 14 all
|
|
|
|
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800
|
|
|
|
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800
|
2022-08-14 06:57:29 +00:00
|
|
|
echo "CLANG_PATH=/usr/bin" >> "${GITHUB_ENV}"
|
2022-08-13 14:49:08 +00:00
|
|
|
|
|
|
|
# Compiler
|
2022-08-03 05:27:35 +00:00
|
|
|
if [[ "${{ matrix.generator }}" = "GCC" ]]; then
|
|
|
|
sudo apt-get install gcc-10 g++10
|
|
|
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 800 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
2022-08-13 14:49:08 +00:00
|
|
|
echo "CC=gcc-10" >> "${GITHUB_ENV}"
|
|
|
|
echo "CXX=gcc-10" >> "${GITHUB_ENV}"
|
|
|
|
echo "LD=ld" >> "${GITHUB_ENV}"
|
2022-08-03 05:27:35 +00:00
|
|
|
elif [[ "${{ matrix.generator }}" = "Clang" ]]; then
|
|
|
|
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800
|
|
|
|
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800
|
|
|
|
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800
|
|
|
|
sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 800
|
|
|
|
sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-14 800
|
2022-08-13 14:49:08 +00:00
|
|
|
echo "CC=clang-14" >> "${GITHUB_ENV}"
|
|
|
|
echo "CXX=clang++-14" >> "${GITHUB_ENV}"
|
|
|
|
echo "LD=lld" >> "${GITHUB_ENV}"
|
2022-08-03 05:27:35 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
- name: 'Dependencies: MacOS'
|
2022-06-02 05:42:04 +00:00
|
|
|
if: startsWith( matrix.runner, 'macos' )
|
2020-02-13 09:11:33 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-06-02 05:42:04 +00:00
|
|
|
curl -kL http://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 /
|
2022-08-14 06:57:29 +00:00
|
|
|
echo "CLANG_PATH=$(brew --prefix llvm@14)/bin/" >> "${GITHUB_ENV}"
|
2021-08-28 12:36:42 +00:00
|
|
|
|
2022-08-14 08:31:43 +00:00
|
|
|
- name: "Dependency: Qt (Cache)"
|
|
|
|
id: qt-cache
|
|
|
|
if: ${{ ! startsWith( matrix.runner, 'ubuntu' ) }}
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: "${{ github.workspace }}/build/qt"
|
2022-08-18 19:35:16 +00:00
|
|
|
key: "${{ matrix.runner }}-obsdeps${{ steps.info.outputs.obs_deps_version }}-qt${{ matrix.qt }}-${{ env.CACHE_VERSION }}"
|
2022-08-14 08:31:43 +00:00
|
|
|
- name: "Dependency: Qt "
|
|
|
|
id: qt
|
|
|
|
if: ${{ startsWith( matrix.runner, 'ubuntu' ) || (steps.qt-cache.outputs.cache-hit != 'true') }}
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
if [[ "${{ matrix.runner }}" = windows* ]]; then
|
|
|
|
curl --retry 5 --retry-delay 30 -jLo /tmp/qt.zip "https://github.com/obsproject/obs-deps/releases/download/${{ steps.info.outputs.obs_deps_version }}/windows-deps-qt${{ matrix.qt }}-${{ steps.info.outputs.obs_deps_version }}-x64.zip"
|
|
|
|
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"
|
|
|
|
elif [[ "${{ matrix.runner }}" = macos* ]]; then
|
|
|
|
curl --retry 5 --retry-delay 30 -jLo /tmp/qt.tar.xz "https://github.com/obsproject/obs-deps/releases/download/${{ steps.info.outputs.obs_deps_version }}/macos-deps-qt${{ matrix.qt }}-${{ steps.info.outputs.obs_deps_version }}-universal.tar.xz"
|
|
|
|
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"
|
|
|
|
elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then
|
|
|
|
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
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: "Dependency: OBS Dependencies (FFmpeg, CURL, ...) (Cache)"
|
|
|
|
id: obsdeps-cache
|
|
|
|
if: ${{ ! startsWith( matrix.runner, 'ubuntu' ) }}
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: "${{ github.workspace }}/build/obsdeps"
|
2022-08-18 19:35:16 +00:00
|
|
|
key: "${{ matrix.runner }}-obsdeps${{ steps.info.outputs.obs_deps_version }}-${{ env.CACHE_VERSION }}"
|
2022-08-14 08:31:43 +00:00
|
|
|
- name: "Dependency: OBS Dependencies (FFmpeg, CURL, ...)"
|
|
|
|
id: obsdeps
|
|
|
|
if: ${{ startsWith( matrix.runner, 'ubuntu' ) || (steps.obsdeps-cache.outputs.cache-hit != 'true') }}
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
if [[ "${{ matrix.runner }}" = windows* ]]; then
|
|
|
|
curl --retry 5 --retry-delay 30 -jLo /tmp/obsdeps.zip "https://github.com/obsproject/obs-deps/releases/download/${{ steps.info.outputs.obs_deps_version }}/windows-deps-${{ steps.info.outputs.obs_deps_version }}-x64.zip"
|
|
|
|
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"
|
|
|
|
elif [[ "${{ matrix.runner }}" = macos* ]]; then
|
|
|
|
curl --retry 5 --retry-delay 30 -jLo /tmp/obsdeps.tar.xz "https://github.com/obsproject/obs-deps/releases/download/${{ steps.info.outputs.obs_deps_version }}/macos-deps-${{ steps.info.outputs.obs_deps_version }}-universal.tar.xz"
|
|
|
|
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"
|
|
|
|
elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then
|
|
|
|
sudo apt-get -y install -V \
|
|
|
|
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \
|
|
|
|
libcurl4-openssl-dev
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: "Dependency: OBS Libraries (Cache)"
|
|
|
|
id: obs-cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: "${{ github.workspace }}/build/obs"
|
2022-08-18 19:35:16 +00:00
|
|
|
key: "${{ matrix.runner }}-${{ matrix.generator }}-obs${{ steps.info.outputs.obs_version }}-obsdeps${{ steps.info.outputs.obs_deps_version }}-qt${{ matrix.qt }}-${{ 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
|
2022-08-18 19:17:10 +00:00
|
|
|
env:
|
|
|
|
CMAKE_BUILD_TYPE: "Release"
|
2022-08-14 08:31:43 +00:00
|
|
|
run: |
|
|
|
|
# Extra requirements by libobs on Linux.
|
|
|
|
if [[ "${{ matrix.runner }}" = ubuntu* ]]; then
|
|
|
|
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
|
|
|
|
fi
|
|
|
|
cmake \
|
2022-08-18 19:17:10 +00:00
|
|
|
-S "${{ github.workspace }}/third-party/obs-studio" \
|
|
|
|
-B "${{ github.workspace }}/build/obs" \
|
|
|
|
${{ steps.info.outputs.cmake_generator }} \
|
|
|
|
${{ steps.info.outputs.cmake_generator_toolset }} \
|
|
|
|
${{ steps.info.outputs.cmake_generator_platform }} \
|
2022-08-20 05:58:55 +00:00
|
|
|
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \
|
2022-08-18 19:17:10 +00:00
|
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET="${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" \
|
|
|
|
-DCMAKE_SYSTEM_VERSION="${{ matrix.CMAKE_SYSTEM_VERSION }}" \
|
|
|
|
-DCMAKE_BUILD_TYPE="${{ env.CMAKE_BUILD_TYPE }}" \
|
2022-08-14 08:31:43 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/obs/install" \
|
|
|
|
-DENABLE_PLUGINS=OFF \
|
|
|
|
-DENABLE_UI=OFF \
|
|
|
|
-DENABLE_SCRIPTING=OFF \
|
|
|
|
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/build/obsdeps;${{ github.workspace }}/build/qt"
|
|
|
|
cmake \
|
|
|
|
--build "${{ github.workspace }}/build/obs" \
|
|
|
|
--config Release \
|
|
|
|
--target obs-frontend-api
|
|
|
|
cmake \
|
|
|
|
--install "${{ github.workspace }}/build/obs" \
|
|
|
|
--config Release \
|
|
|
|
--component obs_libraries
|
|
|
|
|
2022-08-13 14:49:08 +00:00
|
|
|
- name: "Configure & Build (Debug)"
|
|
|
|
continue-on-error: true
|
2021-02-18 22:13:43 +00:00
|
|
|
shell: bash
|
2022-08-14 08:31:43 +00:00
|
|
|
env:
|
|
|
|
CMAKE_BUILD_TYPE: "Debug"
|
2021-02-18 22:13:43 +00:00
|
|
|
run: |
|
2022-08-14 08:31:43 +00:00
|
|
|
cmake \
|
2022-08-18 19:17:10 +00:00
|
|
|
-S "${{ github.workspace }}" \
|
|
|
|
-B "${{ github.workspace }}/build/debug" \
|
|
|
|
${{ steps.info.outputs.cmake_generator }} \
|
|
|
|
${{ steps.info.outputs.cmake_generator_toolset }} \
|
|
|
|
${{ steps.info.outputs.cmake_generator_platform }} \
|
2022-08-20 05:58:55 +00:00
|
|
|
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \
|
2022-08-18 19:17:10 +00:00
|
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET="${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" \
|
|
|
|
-DCMAKE_SYSTEM_VERSION="${{ matrix.CMAKE_SYSTEM_VERSION }}" \
|
|
|
|
-DCMAKE_BUILD_TYPE="${{ env.CMAKE_BUILD_TYPE }}" \
|
2022-08-14 08:31:43 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/debug/install" \
|
2022-08-13 14:49:08 +00:00
|
|
|
-DPACKAGE_NAME="streamfx-${{ matrix.package_name }}-debug" \
|
2022-08-14 08:31:43 +00:00
|
|
|
-DPACKAGE_PREFIX="${{ github.workspace }}/build/package" \
|
2022-08-14 06:57:29 +00:00
|
|
|
-DENABLE_CLANG=TRUE -DCLANG_PATH="${{ env.CLANG_PATH }}" \
|
2022-08-14 08:31:43 +00:00
|
|
|
-DENABLE_PROFILING=ON \
|
|
|
|
-Dlibobs_DIR="${{ github.workspace }}/build/obs/install" \
|
|
|
|
-DQt_DIR="${{ github.workspace }}/build/qt" \
|
|
|
|
-DFFmpeg_DIR="${{ github.workspace }}/build/obsdeps" \
|
|
|
|
-DCURL_DIR="${{ github.workspace }}/build/obsdeps"
|
2022-08-13 14:49:08 +00:00
|
|
|
if [[ "${{ matrix.runner }}" = windows* ]]; then
|
2022-08-18 19:17:10 +00:00
|
|
|
cmake --build "build/debug" --config ${{ env.CMAKE_BUILD_TYPE }} --target install
|
2022-08-13 14:49:08 +00:00
|
|
|
elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then
|
2022-08-14 08:31:43 +00:00
|
|
|
cmake --build "build/debug" --config ${{ env.CMAKE_BUILD_TYPE }} --target install
|
2022-08-13 14:49:08 +00:00
|
|
|
elif [[ "${{ matrix.runner }}" = macos* ]]; then
|
2022-08-14 08:31:43 +00:00
|
|
|
cmake --build "build/debug" --config ${{ env.CMAKE_BUILD_TYPE }} --target install
|
2022-08-13 14:49:08 +00:00
|
|
|
fi
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2022-08-13 14:49:08 +00:00
|
|
|
- name: "Configure & 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: |
|
2022-08-14 08:31:43 +00:00
|
|
|
cmake \
|
2022-08-18 19:17:10 +00:00
|
|
|
-S "${{ github.workspace }}" \
|
|
|
|
-B "${{ github.workspace }}/build/release" \
|
|
|
|
${{ steps.info.outputs.cmake_generator }} \
|
|
|
|
${{ steps.info.outputs.cmake_generator_toolset }} \
|
|
|
|
${{ steps.info.outputs.cmake_generator_platform }} \
|
2022-08-20 05:58:55 +00:00
|
|
|
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \
|
2022-08-18 19:17:10 +00:00
|
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET="${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" \
|
|
|
|
-DCMAKE_SYSTEM_VERSION="${{ matrix.CMAKE_SYSTEM_VERSION }}" \
|
|
|
|
-DCMAKE_BUILD_TYPE="${{ env.CMAKE_BUILD_TYPE }}" \
|
2022-08-14 08:31:43 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/release/install" \
|
2022-08-13 14:49:08 +00:00
|
|
|
-DPACKAGE_NAME="streamfx-${{ matrix.package_name }}" \
|
2022-08-14 08:31:43 +00:00
|
|
|
-DPACKAGE_PREFIX="${{ github.workspace }}/build/package" \
|
2022-08-14 06:57:29 +00:00
|
|
|
-DENABLE_CLANG=TRUE -DCLANG_PATH="${{ env.CLANG_PATH }}" \
|
2022-08-14 08:31:43 +00:00
|
|
|
-DENABLE_PROFILING=OFF \
|
|
|
|
-Dlibobs_DIR="${{ github.workspace }}/build/obs/install" \
|
|
|
|
-DQt_DIR="${{ github.workspace}}/build/qt" \
|
|
|
|
-DFFmpeg_DIR="${{ github.workspace }}/build/obsdeps" \
|
|
|
|
-DCURL_DIR="${{ github.workspace }}/build/obsdeps"
|
2022-08-13 14:49:08 +00:00
|
|
|
if [[ "${{ matrix.runner }}" = windows* ]]; then
|
2022-08-18 19:17:10 +00:00
|
|
|
cmake --build "build/release" --config ${{ env.CMAKE_BUILD_TYPE }} --target install
|
2022-08-13 14:49:08 +00:00
|
|
|
elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then
|
2022-08-14 08:31:43 +00:00
|
|
|
cmake --build "build/release" --config ${{ env.CMAKE_BUILD_TYPE }} --target install/strip
|
2022-08-13 14:49:08 +00:00
|
|
|
elif [[ "${{ matrix.runner }}" = macos* ]]; then
|
2022-08-14 08:31:43 +00:00
|
|
|
cmake --build "build/release" --config ${{ env.CMAKE_BUILD_TYPE }} --target install
|
2022-08-13 14:49:08 +00:00
|
|
|
fi
|
2022-08-03 05:33:16 +00:00
|
|
|
|
2022-08-13 14:49:08 +00:00
|
|
|
- name: "Validate Formatting"
|
2022-08-03 05:33:16 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-08-14 08:31:43 +00:00
|
|
|
cmake --build "${{ github.workspace }}/build/debug" --config Debug --target StreamFX_clang-format
|
|
|
|
cmake --build "${{ github.workspace }}/build/release" --config RelWithDebInfo --target StreamFX_clang-format
|
2022-08-03 05:33:16 +00:00
|
|
|
git --no-pager diff --patch --minimal HEAD --
|
|
|
|
git update-index --refresh
|
|
|
|
git diff-index --quiet HEAD --
|
|
|
|
|
2022-06-02 05:42:04 +00:00
|
|
|
- name: "Package: Archives"
|
2021-02-18 22:13:43 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-08-14 08:31:43 +00:00
|
|
|
mkdir "${{ github.workspace }}/build/package"
|
|
|
|
cmake --build "${{ github.workspace }}/build/debug" --config Debug --target PACKAGE_7Z
|
|
|
|
cmake --build "${{ github.workspace }}/build/release" --config RelWithDebInfo --target PACKAGE_7Z
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2022-06-02 05:42:04 +00:00
|
|
|
- name: "Package: Installer (Windows)"
|
|
|
|
if: startsWith( matrix.runner, 'windows' )
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
2022-08-13 14:49:08 +00:00
|
|
|
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\debug\installer.iss"
|
|
|
|
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\release\installer.iss"
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2022-06-02 05:42:04 +00:00
|
|
|
- name: "Package: Installer (MacOS)"
|
|
|
|
if: startsWith( matrix.runner, 'macos' )
|
2021-03-23 20:55:12 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-08-14 08:31:43 +00:00
|
|
|
packagesbuild "${{ github.workspace }}/build/debug/installer.pkgproj"
|
|
|
|
packagesbuild "${{ github.workspace }}/build/release/installer.pkgproj"
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "Artifacts"
|
2021-02-18 22:13:43 +00:00
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2022-08-14 08:31:43 +00:00
|
|
|
name: "${{ matrix.runner }}-${{ matrix.generator }}-qt${{ matrix.qt }}"
|
|
|
|
path: "${{ github.workspace }}/build/package"
|