mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
6d85b9e990
* The python we were using on trusty was EOL and so breaking in sphinx. Rather than continuing on trusty, we upgrade to bionic and deliberately target gcc-5 and clang-3.8 (the only thing we care about being old/minspec to ensure we don't break it).
51 lines
2.3 KiB
Bash
Executable File
51 lines
2.3 KiB
Bash
Executable File
#!/bin/sh
|
|
set -ev
|
|
|
|
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
|
sudo add-apt-repository -y 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.8 main'
|
|
sudo apt-get update -qq
|
|
sudo apt-get install --allow-unauthenticated -y -qq libx11-dev mesa-common-dev libgl1-mesa-dev qtbase5-dev libqt5svg5-dev libqt5x11extras5-dev libxcb-keysyms1-dev gdb clang-format-3.8 clang++-3.8 g++-5
|
|
|
|
# check last 100 commits are all correctly sized. First line must be no
|
|
# longer than 72 characters, so it fits in git log and github history
|
|
# We don't check the first commit since in pull requests this is an invisible 'merge' commit.
|
|
if git log --oneline | tail -n +2 | head -n 100 | cut -d ' ' -f2- | grep -q '.\{73\}'; then
|
|
echo "***************************************************";
|
|
echo "*** Some of your commit messages summaries are ***";
|
|
echo "*** longer than 72 characters. ***";
|
|
echo "*** Please shorten them so they fit <= 72 chars ***";
|
|
echo "*** on the first line, with a longer summary in ***";
|
|
echo "*** the body after a blank line. ***";
|
|
echo "*** For more information see ***";
|
|
echo "*** docs/CONTRIBUTING.md. ***";
|
|
echo "*** Thanks! ***";
|
|
echo "*** ***";
|
|
echo "*** Commit messages: ***";
|
|
echo;
|
|
git log --oneline | tail -n +2 | head -n 100 | cut -d ' ' -f2- | grep '.\{73\}'
|
|
echo;
|
|
echo "***************************************************";
|
|
exit 1;
|
|
fi
|
|
|
|
# check formatting matches clang-format-3.8. Since newer versions can have
|
|
# changes in formatting even without any rule changes, we have to fix on a
|
|
# single version.
|
|
. ./util/clang_format_all.sh
|
|
|
|
git clean -f
|
|
|
|
# Print any diff here, so the error message below is the last thing
|
|
git diff
|
|
|
|
git diff --quiet || (
|
|
echo "***************************************************";
|
|
echo "*** The code is not clean against clang-format ***";
|
|
echo "*** Please run clang-format-3.8 and fix the ***";
|
|
echo "*** differences then rebase/squash them into ***";
|
|
echo "*** the relevant commits. Do not add a commit ***";
|
|
echo "*** for just formatting fixes. Thanks! ***";
|
|
echo "***************************************************";
|
|
exit 1;
|
|
)
|