Skip to content

Commit

Permalink
debug build_and_run_asan job
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr Ivanov <[email protected]>
  • Loading branch information
alexander-e1off committed Jul 9, 2024
1 parent bd36cb4 commit 4a6d2e4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/sanitizers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
key: deps-${{ steps.get-hash.outputs.deps_hash }}
- name: List deps/srcs
run: ls -lah ${{ github.workspace }}/deps/srcs
- name: San name
run: echo ${{ inputs.sanitizer-name }}
- name: ROOT name
run: pwd
# - name: San name
# run: echo ${{ inputs.sanitizer-name }}
# - name: ROOT name
# run: pwd
- name: Build BlazingMQ and dependencies with sanitizer instrumentation
run: ./.github/workflows/build_sanitizer.sh
35 changes: 35 additions & 0 deletions .github/workflows/sanitizers/build_sanitizer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

# This script can be used to build BlazingMQ, and all of its transitive
# dependencies (up to and including the standard library) using:
# - Clang
# - LLVM libc++ standard library
# - A CMake toolchain file specific for instrumented build
# It is currently used to build instrumented BlazingMQ binaries for CI for all
# Clang sanitizers (i.e. Address/Leak, Memory, Thread, UndefinedBehavior).
#
# It performs the following:
# 1) Install clang compiler.
# 2) Download llvm-project required for libc++ instrumentation.
# 3) Download external dependencies required for instrumentation.
# 4) Build libc++ with the instrumentation specified by <LLVM Sanitizer Name>.
# 5) Build sanitizer-instrumented dependencies including BDE, NTF, GoogleTest,
# Google Benchmark and zlib.
# 6) Build sanitizer-instrumented BlazingMQ unit tests.
# 7) Generate scripts to run unit tests:
# ./cmake.bld/Linux/run-unittests.sh
# This script is used as-is by CI to run unit tests with sanitizer.

set -eux

# :: Required arguments :::::::::::::::::::::::::::::::::::::::::::::::::::::::
if [ -z ${1} ]; then
echo 'Error: Missing sanitizer name.' >&2
echo ' (Usage: build_sanitizer.sh <sanitizer-name>)' >&2
exit 1
fi

SANITIZER_NAME="${1}"

echo SANITIZER_NAME: "${SANITIZER_NAME}"
echo ROOT: "${PWD}"

0 comments on commit 4a6d2e4

Please sign in to comment.