mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +00:00
ci: Merge validation into main script
This reduces the necessary variations for CI, and makes status checks easier to enforce.
This commit is contained in:
parent
5f27998c01
commit
6e510f17f6
2 changed files with 15 additions and 135 deletions
15
.github/workflows/main.yml
vendored
15
.github/workflows/main.yml
vendored
|
@ -223,6 +223,21 @@ jobs:
|
|||
-DENABLE_CLANG=TRUE \
|
||||
-DENABLE_PROFILING=${ENABLE_PROFILING}
|
||||
|
||||
- name: "Validation: clang-tidy"
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-tidy
|
||||
|
||||
- name: "Validation: Formatting (clang-format)"
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: |
|
||||
cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-format
|
||||
git --no-pager diff --patch --minimal HEAD --
|
||||
git update-index --refresh
|
||||
git diff-index --quiet HEAD --
|
||||
|
||||
- name: "Build"
|
||||
shell: bash
|
||||
run: |
|
||||
|
|
135
.github/workflows/validate.yml
vendored
135
.github/workflows/validate.yml
vendored
|
@ -1,135 +0,0 @@
|
|||
name: Validation
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
concurrency:
|
||||
group: validate-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CACHE_VERSION: 2
|
||||
|
||||
jobs:
|
||||
validation:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runner: [ "windows-2022", "windows-2019", "ubuntu-22.04", "ubuntu-20.04" ]
|
||||
CMAKE_BUILD_TYPE: [ "Debug", "Release" ]
|
||||
include:
|
||||
- runner: "windows-2022"
|
||||
experimental: true
|
||||
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"
|
||||
experimental: true
|
||||
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"
|
||||
experimental: false
|
||||
id: "linux-22.04-validate"
|
||||
name: "Ubuntu 22.04"
|
||||
CMAKE_GENERATOR: "Ninja"
|
||||
- runner: "ubuntu-20.04"
|
||||
experimental: false
|
||||
id: "linux-20.04-validate"
|
||||
name: "Ubuntu 20.04"
|
||||
CMAKE_GENERATOR: "Ninja"
|
||||
name: "${{ matrix.name }} (${{ matrix.CMAKE_BUILD_TYPE }})"
|
||||
runs-on: ${{ matrix.runner }}
|
||||
continue-on-error: ${{ matrix.experimental }}
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
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 }}
|
||||
steps:
|
||||
- name: "Clone"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Dependency: Ninja, Qt, FFmpeg, CURL (Linux)"
|
||||
if: startsWith( matrix.runner, 'ubuntu' )
|
||||
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 \
|
||||
qtbase5-dev qtbase5-private-dev libqt5svg5-dev \
|
||||
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \
|
||||
libcurl4-openssl-dev
|
||||
|
||||
- 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
|
||||
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/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
|
||||
|
||||
- name: "Dependencies: Cache"
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
build/temp/autodeps
|
||||
key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }}
|
||||
|
||||
- name: "StreamFX: Configure"
|
||||
shell: bash
|
||||
run: |
|
||||
cmake -H. -B"build/temp" \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \
|
||||
-DENABLE_CLANG=TRUE \
|
||||
-DENABLE_PROFILING=TRUE
|
||||
|
||||
- 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"
|
||||
shell: bash
|
||||
run: |
|
||||
cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-format
|
||||
|
||||
- name: "Validate Formatting"
|
||||
shell: bash
|
||||
run: |
|
||||
git --no-pager diff --patch --minimal HEAD --
|
||||
git update-index --refresh
|
||||
git diff-index --quiet HEAD --
|
Loading…
Reference in a new issue