friendly backtraces in actions (#2591)
* symlink to backtrace.h in dockerfile Add defines for BOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE update testing scripts to handle clang linking to gcc backtrace.h symlinked location Continue on Error in ps1 scripts * use boost 1.70 for clang to allow for `BOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE` definition revert win actions guards in assert_internal
This commit is contained in:
parent
861979cc82
commit
b81da489f5
8 changed files with 26 additions and 6 deletions
|
|
@ -53,6 +53,9 @@ set (NANO_FUZZER_TEST OFF CACHE BOOL "")
|
||||||
option (NANO_STACKTRACE_BACKTRACE "Use BOOST_STACKTRACE_USE_BACKTRACE in stacktraces, for POSIX" OFF)
|
option (NANO_STACKTRACE_BACKTRACE "Use BOOST_STACKTRACE_USE_BACKTRACE in stacktraces, for POSIX" OFF)
|
||||||
if (NANO_STACKTRACE_BACKTRACE)
|
if (NANO_STACKTRACE_BACKTRACE)
|
||||||
add_definitions(-DNANO_STACKTRACE_BACKTRACE=1)
|
add_definitions(-DNANO_STACKTRACE_BACKTRACE=1)
|
||||||
|
if (BACKTRACE_INCLUDE)
|
||||||
|
add_definitions(-DBOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE=${BACKTRACE_INCLUDE})
|
||||||
|
endif()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (${NANO_TIMED_LOCKS} GREATER 0)
|
if (${NANO_TIMED_LOCKS} GREATER 0)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
# Stop immediately if any error happens
|
$ErrorActionPreference = "Continue"
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
|
|
||||||
if (${env:artifact} -eq 1) {
|
if (${env:artifact} -eq 1) {
|
||||||
if ( ${env:BETA} -eq 1 ) {
|
if ( ${env:BETA} -eq 1 ) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
# Stop immediately if any error happens
|
$ErrorActionPreference = "Continue"
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
|
|
||||||
if ( ${env:BETA} -eq 1 ) {
|
if ( ${env:BETA} -eq 1 ) {
|
||||||
$network_cfg="beta"
|
$network_cfg="beta"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
$ErrorActionPreference = "Continue"
|
||||||
|
|
||||||
Set-MpPreference -DisableArchiveScanning $true
|
Set-MpPreference -DisableArchiveScanning $true
|
||||||
Set-MpPreference -DisableRealtimeMonitoring $true
|
Set-MpPreference -DisableRealtimeMonitoring $true
|
||||||
Set-MpPreference -DisableBehaviorMonitoring $true
|
Set-MpPreference -DisableBehaviorMonitoring $true
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
$ErrorActionPreference = "Continue"
|
||||||
|
|
||||||
function Get-RedirectedUri {
|
function Get-RedirectedUri {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
$ErrorActionPreference = "Continue"
|
||||||
|
|
||||||
if (Test-Path env:CSC_LINK) {
|
if (Test-Path env:CSC_LINK) {
|
||||||
$path = Join-Path -Path "$env:TMP" -ChildPath csc.p12
|
$path = Join-Path -Path "$env:TMP" -ChildPath csc.p12
|
||||||
[IO.File]::WriteAllBytes($path, [Convert]::FromBase64String($env:CSC_LINK))
|
[IO.File]::WriteAllBytes($path, [Convert]::FromBase64String($env:CSC_LINK))
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,15 @@ ulimit -S -n 8192
|
||||||
if [[ "$OS" == 'Linux' ]]; then
|
if [[ "$OS" == 'Linux' ]]; then
|
||||||
ROCKSDB="-DROCKSDB_LIBRARIES=/tmp/rocksdb/lib/librocksdb.a \
|
ROCKSDB="-DROCKSDB_LIBRARIES=/tmp/rocksdb/lib/librocksdb.a \
|
||||||
-DROCKSDB_INCLUDE_DIRS=/tmp/rocksdb/include"
|
-DROCKSDB_INCLUDE_DIRS=/tmp/rocksdb/include"
|
||||||
|
if clang --version; then
|
||||||
|
BACKTRACE="-DNANO_STACKTRACE_BACKTRACE=ON \
|
||||||
|
-DBACKTRACE_INCLUDE=</tmp/backtrace.h>"
|
||||||
|
else
|
||||||
|
BACKTRACE="-DNANO_STACKTRACE_BACKTRACE=ON"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
ROCKSDB=""
|
ROCKSDB=""
|
||||||
|
BACKTRACE=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmake \
|
cmake \
|
||||||
|
|
@ -61,6 +68,7 @@ cmake \
|
||||||
-DBOOST_ROOT=/tmp/boost/ \
|
-DBOOST_ROOT=/tmp/boost/ \
|
||||||
-DQt5_DIR=${qt_dir} \
|
-DQt5_DIR=${qt_dir} \
|
||||||
-DCI_TEST="1" \
|
-DCI_TEST="1" \
|
||||||
|
${BACKTRACE} \
|
||||||
${SANITIZERS} \
|
${SANITIZERS} \
|
||||||
..
|
..
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,11 @@ RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
|
||||||
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100
|
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100
|
||||||
ENV BOOST_ROOT=/tmp/boost
|
ENV BOOST_ROOT=/tmp/boost
|
||||||
|
|
||||||
ADD util/build_prep/fetch_boost.sh fetch_boost.sh
|
ADD util/build_prep/bootstrap_boost.sh bootstrap_boost.sh
|
||||||
|
RUN ./bootstrap_boost.sh -m -c -B 1.70
|
||||||
|
|
||||||
RUN ./fetch_boost.sh
|
# workaround to get a path that can be easily passed into cmake for
|
||||||
|
# BOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE
|
||||||
|
# see https://www.boost.org/doc/libs/1_70_0/doc/html/stacktrace/configuration_and_build.html#stacktrace.configuration_and_build.f3
|
||||||
|
|
||||||
|
RUN ln -s /usr/lib/gcc/x86_64-linux-gnu/5/include/backtrace.h /tmp/backtrace.h
|
||||||
Loading…
Add table
Add a link
Reference in a new issue