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
|
|
|
|
2020-11-02 15:52:21 +00:00
|
|
|
env:
|
2022-05-10 17:29:58 +00:00
|
|
|
CACHE_VERSION: 1
|
2021-10-17 06:20:16 +00:00
|
|
|
LIBAOM_VERSION: "3.2.0.0"
|
2020-11-02 15:52:21 +00:00
|
|
|
|
2019-09-03 19:18:14 +00:00
|
|
|
jobs:
|
2019-12-18 05:46:03 +00:00
|
|
|
windows:
|
2020-04-02 18:22:44 +00:00
|
|
|
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:
|
2020-04-22 22:36:40 +00:00
|
|
|
runner: [ windows-2019 ]
|
2020-04-02 18:22:44 +00:00
|
|
|
include:
|
|
|
|
- runner: windows-2019
|
2020-12-14 17:13:04 +00:00
|
|
|
id: windows-2019
|
2020-04-02 18:22:44 +00:00
|
|
|
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 }}
|
2019-09-03 19:18:14 +00:00
|
|
|
steps:
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "Clone"
|
2021-02-18 22:13:43 +00:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-03-23 15:42:34 +00:00
|
|
|
fetch-depth: 0
|
2022-05-10 17:29:58 +00:00
|
|
|
|
|
|
|
- name: "Dependencies: Cache"
|
2021-11-26 03:28:00 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2021-08-28 12:36:42 +00:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
2022-05-10 17:29:58 +00:00
|
|
|
build/temp/autodeps
|
|
|
|
key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }}
|
|
|
|
|
2021-11-14 01:57:46 +00:00
|
|
|
- name: "Code Signing"
|
2021-11-26 03:28:00 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2021-11-14 01:57:46 +00:00
|
|
|
id: codesign
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
# Restore the Certificate back into a file.
|
|
|
|
echo "${{ secrets.CODESIGN_CERT_WIN }}" | base64 --decode > "${{ github.workspace }}/cert.pfx"
|
2021-11-26 01:49:01 +00:00
|
|
|
echo "::set-output name=cmake_args::-DENABLE_CODESIGN=ON -DCODESIGN_TIMESTAMPS=ON"
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "StreamFX: Configure"
|
2020-01-14 08:41:24 +00:00
|
|
|
shell: bash
|
2021-11-14 01:57:46 +00:00
|
|
|
env:
|
2021-11-26 01:49:01 +00:00
|
|
|
CODESIGN_FILE: ${{ github.workspace }}/cert.pfx
|
|
|
|
CODESIGN_PASS: ${{ secrets.CODESIGN_CERT_WIN_PASSWORD }}
|
2020-01-14 08:31:41 +00:00
|
|
|
run: |
|
2020-09-28 19:28:21 +00:00
|
|
|
cmake -H. -B"build/temp" \
|
2021-11-14 01:57:46 +00:00
|
|
|
${{ steps.codesign.outputs.cmake_args }} \
|
2021-02-18 22:13:43 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
2020-09-28 19:28:21 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX="build/distrib" \
|
2020-12-14 17:13:04 +00:00
|
|
|
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
|
|
|
|
-DPACKAGE_PREFIX="build/package" \
|
2021-08-28 12:36:42 +00:00
|
|
|
-DAOM_PATH="build/libaom/"
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "StreamFX: Build"
|
2020-01-14 08:41:24 +00:00
|
|
|
shell: bash
|
2020-01-14 08:31:41 +00:00
|
|
|
run: |
|
2020-02-13 09:11:33 +00:00
|
|
|
cmake --build "build/temp" --config RelWithDebInfo --target INSTALL
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "StreamFX: Package (Install Prerequisites)"
|
|
|
|
run: |
|
2021-06-02 18:05:01 +00:00
|
|
|
curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.1.2.exe" "-f" "--retry" "5" "-o" "inno.exe"
|
2021-03-23 15:42:34 +00:00
|
|
|
.\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "StreamFX: Package"
|
2020-01-14 08:41:24 +00:00
|
|
|
shell: bash
|
2019-12-18 05:46:03 +00:00
|
|
|
run: |
|
2020-02-13 09:15:23 +00:00
|
|
|
mkdir build/package
|
2020-01-14 08:41:24 +00:00
|
|
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
|
|
|
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-11-14 01:57:46 +00:00
|
|
|
- name: "StreamFX: Signed Installer Preparation"
|
2021-11-26 03:28:00 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2021-11-14 01:57:46 +00:00
|
|
|
id: codesign_install
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
if [[ -f "${{ github.workspace }}/cert.pfx" ]]; then
|
|
|
|
signtool=$(awk 'match($0, /^;signtool=(.+)$/, ary) {print ary[1]}' "${{ github.workspace }}/build/temp/installer.iss")
|
|
|
|
echo "::set-output name=iscc_signtool::${signtool}"
|
|
|
|
fi
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "StreamFX: Package Installer"
|
2021-11-14 01:57:46 +00:00
|
|
|
shell: cmd
|
2019-12-18 05:46:03 +00:00
|
|
|
run: |
|
2021-11-14 01:57:46 +00:00
|
|
|
echo '"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 "/Ssigntool=${{ steps.codesign_install.outputs.iscc_signtool }} $p" ".\build\temp\installer.iss"'
|
|
|
|
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 "/Ssigntool=${{ steps.codesign_install.outputs.iscc_signtool }} $p" ".\build\temp\installer.iss"
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "Artifacts"
|
2019-12-18 05:46:03 +00:00
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2020-04-02 22:17:36 +00:00
|
|
|
name: ${{ matrix.id }}
|
2019-12-18 05:46:03 +00:00
|
|
|
path: build/package
|
2021-08-28 12:36:42 +00:00
|
|
|
|
2020-04-02 18:22:44 +00:00
|
|
|
ubuntu:
|
2020-04-24 01:09:59 +00:00
|
|
|
name: "Ubuntu 64-bit"
|
2020-04-02 18:22:44 +00:00
|
|
|
strategy:
|
2020-11-02 16:04:29 +00:00
|
|
|
fail-fast: true
|
2020-04-24 01:09:59 +00:00
|
|
|
matrix:
|
2021-01-31 16:27:01 +00:00
|
|
|
ubuntu: [ focal ]
|
2020-04-23 23:50:16 +00:00
|
|
|
compiler: [ gcc, clang ]
|
2020-04-02 18:22:44 +00:00
|
|
|
include:
|
2020-07-29 03:31:02 +00:00
|
|
|
- ubuntu: focal
|
2020-04-23 23:50:16 +00:00
|
|
|
compiler: gcc
|
2020-04-24 01:09:59 +00:00
|
|
|
compiler-cxx: g++
|
2020-07-29 03:31:02 +00:00
|
|
|
runner: ubuntu-20.04
|
2020-04-24 01:09:59 +00:00
|
|
|
packages: gcc-9 g++9
|
2020-04-23 23:50:16 +00:00
|
|
|
extra_command: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 800 --slave /usr/bin/g++ g++ /usr/bin/g++-9
|
2020-07-29 03:31:02 +00:00
|
|
|
id: ubuntu-20.04
|
|
|
|
- ubuntu: focal
|
2020-04-23 23:50:16 +00:00
|
|
|
compiler: clang
|
2020-09-28 19:28:21 +00:00
|
|
|
compiler-cxx: clang++
|
2020-07-29 03:31:02 +00:00
|
|
|
runner: ubuntu-20.04
|
2021-10-22 01:45:29 +00:00
|
|
|
packages: ""
|
|
|
|
extra_command: 'sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"'
|
2020-07-29 03:31:02 +00:00
|
|
|
id: ubuntu-20.04-clang
|
2020-04-02 18:22:44 +00:00
|
|
|
runs-on: ${{ matrix.runner }}
|
|
|
|
env:
|
2020-04-23 23:50:16 +00:00
|
|
|
CC: ${{ matrix.compiler }}
|
|
|
|
CXX: ${{ matrix.compiler-cxx }}
|
2021-03-23 16:53:21 +00:00
|
|
|
CMAKE_GENERATOR: "Ninja"
|
2020-02-13 09:11:33 +00:00
|
|
|
steps:
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "Clone"
|
2021-02-18 22:13:43 +00:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-03-23 15:42:34 +00:00
|
|
|
fetch-depth: 0
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2020-04-02 18:22:44 +00:00
|
|
|
- name: "Prerequisites: Apt-Get"
|
|
|
|
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 \
|
|
|
|
git \
|
2021-08-28 12:36:42 +00:00
|
|
|
${{ matrix.packages }} \
|
2020-08-10 00:46:25 +00:00
|
|
|
qt5-default libqwt-qt5-dev libqt5svg5-dev \
|
2020-09-09 03:06:15 +00:00
|
|
|
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \
|
2021-08-28 12:36:42 +00:00
|
|
|
libcurl4-openssl-dev
|
2020-04-23 23:50:16 +00:00
|
|
|
${{ matrix.extra_command }}
|
2022-05-10 17:29:58 +00:00
|
|
|
|
|
|
|
- name: "Dependencies: Cache"
|
2021-11-26 03:28:00 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2020-07-15 19:43:49 +00:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2021-03-23 15:42:34 +00:00
|
|
|
path: |
|
2022-05-10 17:29:58 +00:00
|
|
|
build/temp/autodeps
|
|
|
|
key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }}
|
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "StreamFX: Configure"
|
2020-02-13 09:11:33 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-09-28 19:28:21 +00:00
|
|
|
cmake -H. -B"build/temp" \
|
2021-02-18 22:13:43 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
2020-09-28 19:28:21 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX="build/distrib" \
|
2020-12-14 17:13:04 +00:00
|
|
|
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
|
2022-05-10 17:29:58 +00:00
|
|
|
-DPACKAGE_PREFIX="build/package"
|
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "StreamFX: Build"
|
2020-02-13 09:11:33 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-04-02 18:22:44 +00:00
|
|
|
cmake --build "build/temp" --config RelWithDebInfo --target install
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "StreamFX: Package"
|
2020-02-13 09:11:33 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-02-13 09:15:23 +00:00
|
|
|
mkdir build/package
|
2020-04-02 18:22:44 +00:00
|
|
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
|
|
|
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "Artifacts"
|
2020-02-13 09:11:33 +00:00
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2020-04-02 22:17:36 +00:00
|
|
|
name: ${{ matrix.id }}
|
2021-01-31 16:27:01 +00:00
|
|
|
path: build/package
|
2021-08-28 12:36:42 +00:00
|
|
|
|
2021-02-18 22:13:43 +00:00
|
|
|
macos:
|
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
2021-03-22 21:30:05 +00:00
|
|
|
matrix:
|
2021-02-18 22:13:43 +00:00
|
|
|
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"
|
2021-02-18 22:13:43 +00:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-03-23 15:42:34 +00:00
|
|
|
fetch-depth: 0
|
2022-05-10 17:29:58 +00:00
|
|
|
|
|
|
|
- name: "Dependencies: Cache"
|
2021-11-26 03:28:00 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2021-03-23 15:42:34 +00:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
2022-05-10 17:29:58 +00:00
|
|
|
build/temp/autodeps
|
|
|
|
key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }}
|
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "StreamFX: Configure"
|
2021-02-18 22:13:43 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake -H. -B"build/temp" \
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
|
-DCMAKE_INSTALL_PREFIX="build/distrib" \
|
|
|
|
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
|
2022-05-10 17:29:58 +00:00
|
|
|
-DPACKAGE_PREFIX="build/package"
|
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "StreamFX: Build"
|
2021-02-18 22:13:43 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake --build "build/temp" --config RelWithDebInfo --target install
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-03-23 15:42:34 +00:00
|
|
|
- name: "StreamFX: Package"
|
2021-02-18 22:13:43 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir build/package
|
|
|
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
|
|
|
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
|
2022-05-10 17:29:58 +00:00
|
|
|
|
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
|
2022-02-09 16:38:20 +00:00
|
|
|
pushd /Volumes/Packages*
|
|
|
|
sudo installer -pkg ./Install\ Packages.pkg -target /
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2021-03-23 20:55:12 +00:00
|
|
|
- name: "Packages: Package"
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
packagesbuild ./build/temp/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:
|
|
|
|
name: ${{ matrix.id }}
|
|
|
|
path: build/package
|