2020-07-30 04:44:32 +00:00
|
|
|
name: Validation
|
|
|
|
|
2021-06-23 14:55:10 +00:00
|
|
|
on:
|
2020-07-30 04:44:32 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
2021-06-23 14:55:10 +00:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
2020-07-30 04:44:32 +00:00
|
|
|
|
2022-06-13 03:23:15 +00:00
|
|
|
concurrency:
|
2022-06-02 05:42:04 +00:00
|
|
|
group: validate-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-05-10 17:29:58 +00:00
|
|
|
env:
|
2022-06-02 05:42:04 +00:00
|
|
|
CACHE_VERSION: 2
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2020-07-30 04:44:32 +00:00
|
|
|
jobs:
|
2022-06-02 05:42:04 +00:00
|
|
|
validation:
|
|
|
|
strategy:
|
2022-06-11 03:25:29 +00:00
|
|
|
fail-fast: false
|
2022-06-02 05:42:04 +00:00
|
|
|
matrix:
|
|
|
|
runner: [ "windows-2022", "windows-2019", "ubuntu-22.04", "ubuntu-20.04" ]
|
|
|
|
CMAKE_BUILD_TYPE: [ "Debug", "Release" ]
|
|
|
|
include:
|
|
|
|
- runner: "windows-2022"
|
2022-06-13 01:59:03 +00:00
|
|
|
experimental: true
|
2022-06-02 05:42:04 +00:00
|
|
|
id: "windows-2022-validate"
|
|
|
|
name: "Windows 11"
|
|
|
|
CMAKE_SYSTEM_VERSION: "10.0.18362.0"
|
|
|
|
CMAKE_GENERATOR: "Visual Studio 17 2022"
|
|
|
|
CMAKE_GENERATOR_PLATFORM: "x64"
|
|
|
|
- runner: "windows-2019"
|
2022-06-13 01:59:03 +00:00
|
|
|
experimental: true
|
2022-06-02 05:42:04 +00:00
|
|
|
id: "windows-2019-validate"
|
|
|
|
name: "Windows 10"
|
|
|
|
CMAKE_SYSTEM_VERSION: "10.0.18362.0"
|
|
|
|
CMAKE_GENERATOR: "Visual Studio 16 2019"
|
|
|
|
CMAKE_GENERATOR_PLATFORM: "x64"
|
|
|
|
- runner: "ubuntu-22.04"
|
2022-06-13 01:59:03 +00:00
|
|
|
experimental: false
|
2022-06-02 05:42:04 +00:00
|
|
|
id: "linux-22.04-validate"
|
|
|
|
name: "Ubuntu 22.04"
|
|
|
|
CMAKE_GENERATOR: "Ninja"
|
|
|
|
- runner: "ubuntu-20.04"
|
2022-06-13 01:59:03 +00:00
|
|
|
experimental: false
|
2022-06-02 05:42:04 +00:00
|
|
|
id: "linux-20.04-validate"
|
|
|
|
name: "Ubuntu 20.04"
|
|
|
|
CMAKE_GENERATOR: "Ninja"
|
|
|
|
name: "${{ matrix.name }} (${{ matrix.CMAKE_BUILD_TYPE }})"
|
|
|
|
runs-on: ${{ matrix.runner }}
|
2022-06-13 01:59:03 +00:00
|
|
|
continue-on-error: ${{ matrix.experimental }}
|
2020-07-30 04:44:32 +00:00
|
|
|
env:
|
2021-10-22 01:45:29 +00:00
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
2022-06-02 05:42:04 +00:00
|
|
|
CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }}
|
|
|
|
CMAKE_SYSTEM_VERSION: ${{ matrix.CMAKE_SYSTEM_VERSION }}
|
|
|
|
CMAKE_GENERATOR: ${{ matrix.CMAKE_GENERATOR }}
|
|
|
|
CMAKE_GENERATOR_PLATFORM: ${{ matrix.CMAKE_GENERATOR_PLATFORM }}
|
2020-07-30 04:44:32 +00:00
|
|
|
steps:
|
2022-05-10 17:29:58 +00:00
|
|
|
- name: "Clone"
|
2022-06-02 05:42:04 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-05-10 17:29:58 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2022-06-13 03:23:15 +00:00
|
|
|
- name: "Dependency: Ninja, Qt, FFmpeg, CURL (Linux)"
|
|
|
|
if: startsWith( matrix.runner, 'ubuntu' )
|
2020-07-30 04:44:32 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo apt-get -qq update
|
|
|
|
sudo apt-get purge libjpeg9-dev:amd64 libjpeg8-dev:amd64 libjpeg-turbo8-dev:amd64
|
2020-09-09 03:06:15 +00:00
|
|
|
sudo apt-get install \
|
|
|
|
build-essential \
|
2022-05-10 17:29:58 +00:00
|
|
|
checkinstall \
|
|
|
|
pkg-config \
|
2020-09-09 03:06:15 +00:00
|
|
|
cmake \
|
|
|
|
ninja-build \
|
|
|
|
git \
|
2022-06-02 05:42:04 +00:00
|
|
|
qtbase5-dev qtbase5-private-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 \
|
2022-05-10 17:29:58 +00:00
|
|
|
libcurl4-openssl-dev
|
2022-06-13 03:23:15 +00:00
|
|
|
|
|
|
|
- name: "Dependency: Clang (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"
|
|
|
|
|
|
|
|
- name: "Dependency: Clang (Linux)"
|
|
|
|
if: startsWith( matrix.runner, 'ubuntu' )
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 all
|
2022-06-13 01:59:03 +00:00
|
|
|
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800
|
2022-06-13 03:23:15 +00:00
|
|
|
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800
|
2022-06-13 01:59:03 +00:00
|
|
|
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800
|
2022-06-13 03:23:15 +00:00
|
|
|
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
|
|
|
|
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-05-10 17:29:58 +00:00
|
|
|
|
|
|
|
- name: "Dependencies: Cache"
|
2022-06-02 05:42:04 +00:00
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
uses: actions/cache@v3
|
2020-07-30 04:44:32 +00:00
|
|
|
with:
|
|
|
|
path: |
|
2022-05-10 17:29:58 +00:00
|
|
|
build/temp/autodeps
|
|
|
|
key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }}
|
|
|
|
|
|
|
|
- name: "StreamFX: Configure"
|
2020-07-30 04:44:32 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake -H. -B"build/temp" \
|
2022-06-02 05:42:04 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \
|
2022-06-13 03:23:15 +00:00
|
|
|
-DENABLE_CLANG=TRUE \
|
|
|
|
-DENABLE_PROFILING=TRUE
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2022-06-02 05:42:04 +00:00
|
|
|
- name: "StreamFX: clang-tidy"
|
|
|
|
continue-on-error: true
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-tidy
|
|
|
|
|
|
|
|
- name: "StreamFX: clang-format"
|
2022-05-10 17:29:58 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-06-02 05:42:04 +00:00
|
|
|
cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-format
|
2022-05-10 17:29:58 +00:00
|
|
|
|
2020-07-30 04:44:32 +00:00
|
|
|
- name: "Validate Formatting"
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
git --no-pager diff --patch --minimal HEAD --
|
|
|
|
git update-index --refresh
|
2021-06-23 14:55:10 +00:00
|
|
|
git diff-index --quiet HEAD --
|