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-05-10 17:29:58 +00:00
|
|
|
env:
|
|
|
|
CACHE_VERSION: 1
|
|
|
|
|
2020-07-30 04:44:32 +00:00
|
|
|
jobs:
|
|
|
|
clang-format:
|
|
|
|
name: "clang-format"
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
env:
|
2021-10-22 01:45:29 +00:00
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
2020-07-30 04:44:32 +00:00
|
|
|
CMAKE_GENERATOR: "Ninja"
|
|
|
|
steps:
|
2022-05-10 17:29:58 +00:00
|
|
|
- name: "Clone"
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: "Prerequisites: Apt-Get"
|
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-05-10 17:29:58 +00:00
|
|
|
${{ matrix.packages }} \
|
2020-09-09 03:06:15 +00:00
|
|
|
qt5-default libqwt-qt5-dev libqt5svg5-dev \
|
|
|
|
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
|
2021-10-22 01:45:29 +00:00
|
|
|
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
|
2022-05-10 17:29:58 +00:00
|
|
|
|
|
|
|
- name: "Dependencies: Cache"
|
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2020-07-30 04:44:32 +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 }}
|
|
|
|
|
|
|
|
- name: "StreamFX: Configure"
|
2020-07-30 04:44:32 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake -H. -B"build/temp" \
|
2022-05-10 17:29:58 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
2020-07-30 04:44:32 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX="build/distrib" \
|
2022-05-10 17:29:58 +00:00
|
|
|
-DCMAKE_PACKAGE_NAME="streamfx-${{ matrix.id }}" \
|
|
|
|
-DCMAKE_PACKAGE_PREFIX="build/package" \
|
|
|
|
-DENABLE_CLANG=TRUE
|
|
|
|
|
|
|
|
- name: "StreamFX: Format"
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-07-30 04:44:32 +00:00
|
|
|
cmake --build "build/temp" --config RelWithDebInfo --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 --
|