name: Validation on: pull_request: branches: - '*' jobs: clang-format: name: "clang-format" runs-on: ubuntu-20.04 env: CC: clang-9 CXX: clang-9 CMAKE_GENERATOR: "Ninja" steps: - name: "Clone Repository" uses: actions/checkout@v1 - name: "Submodules & Packages" shell: bash run: | git submodule update --init --recursive 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 clang clang-format checkinstall pkg-config cmake ninja-build git qt5-default libqwt-qt5-dev libqt5svg5-dev libavcodec-dev libavutil-dev libswscale-dev - name: "Cache: Prerequisites" uses: actions/cache@v2 with: path: | build/temp/libobs-download/libobs-download-prefix/src/libobs.7z key: ubuntu-20.04 - name: "Configure & Format Project" shell: bash run: | cmake -H. -B"build/temp" \ -DCMAKE_INSTALL_PREFIX="build/distrib" \ -DCMAKE_PACKAGE_NAME="streamfx-${{ matrix.id }}" -DCMAKE_PACKAGE_PREFIX="build/package" \ -DOBS_DOWNLOAD=ON \ -DENABLE_CLANG=TRUE cmake --build "build/temp" --config RelWithDebInfo --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 --