Merge pull request #2688 from DDRBoxman/githubformat

CI: Move clang format check into a seperate github workflow
This commit is contained in:
Colin Edwards 2020-04-09 21:27:53 -05:00 committed by GitHub
commit 1627623f4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 22 deletions

48
.github/workflows/clang-format.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: Clang Format Check
on: [push, pull_request]
jobs:
ubuntu64:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install clang format
run: |
# gets us newer clang
sudo bash -c "cat >> /etc/apt/sources.list" << LLVMAPT
# 3.8
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main
LLVMAPT
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-get -qq update
sudo apt-get install -y clang-format-8
- name: Check the Formatting
run: |
./formatcode.sh
./CI/check-format.sh
macos64:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install clang-format
run: |
brew install clang-format
- name: Check the Formatting
run: |
./formatcode.sh
./CI/check-format.sh

View File

@ -1,10 +1,5 @@
#!/bin/bash
./formatcode.sh
if ! ./CI/check-format.sh; then
exit 1
fi
set -ex
ccache -s || echo "CCache is not available."
mkdir build && cd build

View File

@ -3,11 +3,6 @@ export PATH=/usr/local/opt/ccache/libexec:$PATH
git fetch --tags
./formatcode.sh
if ! ./CI/check-format.sh; then
exit 1
fi
mkdir build
cd build
cmake -DENABLE_SPARKLE_UPDATER=ON \

View File

@ -3,15 +3,6 @@ set -ex
curl -L https://packagecloud.io/github/git-lfs/gpgkey | sudo apt-key add -
# gets us newer clang
sudo bash -c "cat >> /etc/apt/sources.list" << LLVMAPT
# 3.8
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main
LLVMAPT
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-get -qq update
sudo apt-get install -y \
build-essential \
@ -52,8 +43,7 @@ sudo apt-get install -y \
python3-dev \
qtbase5-dev \
libqt5svg5-dev \
swig \
clang-format-8
swig
# build cef
wget --quiet --retry-connrefused --waitretry=1 https://cdn-fastly.obsproject.com/downloads/cef_binary_${CEF_BUILD_VERSION}_linux64.tar.bz2

View File

@ -28,7 +28,7 @@ sudo installer -pkg ./Packages.pkg -target /
brew update
#Base OBS Deps and ccache
brew install jack speexdsp ccache mbedtls clang-format freetype fdk-aac
brew install jack speexdsp ccache mbedtls freetype fdk-aac
brew install https://gist.githubusercontent.com/DDRBoxman/9c7a2b08933166f4b61ed9a44b242609/raw/ef4de6c587c6bd7f50210eccd5bd51ff08e6de13/qt.rb
brew unlink swig
brew install https://gist.githubusercontent.com/DDRBoxman/4cada55c51803a2f963fa40ce55c9d3e/raw/572c67e908bfbc1bcb8c476ea77ea3935133f5b5/swig.rb