Some improvements to CI (#121)

* Removing option as not supported by CI

Will migrate CI forward and readd.

* Made failure for clang-format errors.

* Improved handling of errors during CI.

* Prevent failures escaping.

* Clang-format fix

* Remove stderr

* Update azure-pipelines.yml

Co-Authored-By: Paul Liétar <plietar@users.noreply.github.com>

Co-authored-by: Paul Liétar <plietar@users.noreply.github.com>
This commit is contained in:
Matthew Parkinson
2020-02-03 21:01:06 +00:00
committed by GitHub
parent 7e22d302ad
commit afc77d9a0a
3 changed files with 12 additions and 4 deletions

View File

@@ -21,7 +21,6 @@ AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true

View File

@@ -207,6 +207,7 @@ jobs:
cmakeArgs: '.. -DCMAKE_BUILD_TYPE=$(BuildType) -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On'
- script: |
set -eo pipefail
make -j 4
workingDirectory: build
@@ -214,6 +215,7 @@ jobs:
displayName: 'Compile'
- script: |
set -eo pipefail
ctest -j 4 --output-on-failure -C $(BuildType)
workingDirectory: build
@@ -226,6 +228,7 @@ jobs:
vmImage: 'ubuntu-16.04'
steps:
- script: |
set -eo pipefail
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main"
sudo apt-get update
@@ -240,14 +243,17 @@ jobs:
cmakeArgs: '..'
- script: |
set -eo pipefail
make clangformat
git diff
if [ "$(git diff $(Build.SourceVersion))" != "" ]; then exit 1; fi
git diff --exit-code $(Build.SourceVersion)
workingDirectory: build
failOnStderr: true
displayName: 'Clang-Format'
- script: |
set -eo pipefail
clang-tidy-8 src/override/malloc.cc -header-filter="`pwd`/*" -export-fixes=tidy.fail -- -std=c++17 -mcx16
if [ -f tidy.fail ] ; then exit 1 ; fi

View File

@@ -70,7 +70,6 @@ void _cdecl error(int signal)
_exit(1);
}
# define CALL_LAST 0
LONG WINAPI VectoredHandler(struct _EXCEPTION_POINTERS* ExceptionInfo)
{
UNUSED(ExceptionInfo);
@@ -89,7 +88,11 @@ void setup()
_set_abort_behavior(0, _WRITE_ABORT_MSG);
signal(SIGABRT, error);
AddVectoredExceptionHandler(CALL_LAST, VectoredHandler);
// If we have an unhandled exception print a stack trace.
SetUnhandledExceptionFilter(VectoredHandler);
// Disable OS level dialog boxes during CI.
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
}
#else
void setup() {}