forked from bloomberg/blazingmq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Aleksandr Ivanov <[email protected]>
- Loading branch information
1 parent
8142686
commit 3e9b35d
Showing
7 changed files
with
163 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: Debug sanitizers | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- fix-sanitizer-issues | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build_dependencies: | ||
name: Build deps [ubuntu] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get dependencies hash | ||
id: get-hash | ||
run: echo "deps_hash=`cat docker/build_deps.sh | shasum`" >> $GITHUB_OUTPUT | ||
- name: Cache lookup | ||
uses: actions/cache/restore@v4 | ||
id: cache-lookup | ||
with: | ||
path: deps | ||
key: deps-${{ steps.get-hash.outputs.deps_hash }} | ||
lookup-only: true | ||
- name: Set up dependencies | ||
if: steps.cache-lookup.outputs.cache-hit != 'true' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -qy build-essential \ | ||
gdb \ | ||
curl \ | ||
python3.10 \ | ||
python3-pip \ | ||
cmake \ | ||
ninja-build \ | ||
pkg-config \ | ||
bison \ | ||
libfl-dev \ | ||
libbenchmark-dev \ | ||
libgmock-dev \ | ||
libz-dev | ||
- name: Fetch & Build non packaged dependencies | ||
if: steps.cache-lookup.outputs.cache-hit != 'true' | ||
run: | | ||
mkdir -p deps | ||
cd deps | ||
../docker/build_deps.sh | ||
- name: Cache save | ||
if: steps.cache-lookup.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: deps | ||
key: deps-${{ steps.get-hash.outputs.deps_hash }} | ||
|
||
unit_tests_cxx: | ||
name: UT [c++] | ||
runs-on: ubuntu-latest | ||
needs: build_dependencies | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get dependencies hash | ||
id: get-hash | ||
run: echo "deps_hash=`cat docker/build_deps.sh | shasum`" >> $GITHUB_OUTPUT | ||
- uses: actions/cache/restore@v4 | ||
with: | ||
path: deps | ||
key: deps-${{ steps.get-hash.outputs.deps_hash }} | ||
- name: Set up dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -qy build-essential \ | ||
gdb \ | ||
curl \ | ||
python3.10 \ | ||
python3-pip \ | ||
cmake \ | ||
ninja-build \ | ||
pkg-config \ | ||
bison \ | ||
libfl-dev \ | ||
libbenchmark-dev \ | ||
libgmock-dev \ | ||
libz-dev | ||
- name: Install cached non packaged dependencies | ||
working-directory: deps | ||
run: ../docker/build_deps.sh | ||
- name: Build BlazingMQ UTs | ||
env: | ||
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/opt/bb/lib64/pkgconfig | ||
run: | | ||
cmake -S . -B build/blazingmq -G Ninja \ | ||
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/deps/srcs/bde-tools/BdeBuildSystem/toolchains/linux/gcc-default.cmake \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DBDE_BUILD_TARGET_SAFE=ON \ | ||
-DBDE_BUILD_TARGET_64=ON \ | ||
-DBDE_BUILD_TARGET_CPP17=ON \ | ||
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/deps/srcs/bde-tools/BdeBuildSystem \ | ||
-DCMAKE_INSTALL_LIBDIR=lib64 | ||
cmake --build build/blazingmq --parallel 8 --target all.t | ||
- name: Run C++ Unit Tests | ||
run: | | ||
cd ${{ github.workspace }}/build/blazingmq | ||
ctest -E mwcsys_executil.t --output-on-failure | ||
run_asan: | ||
needs: build_dependencies | ||
uses: ./.github/workflows/sanitizer-check.yaml | ||
with: | ||
sanitizer-name: 'asan' | ||
|
||
run_msan: | ||
needs: build_dependencies | ||
uses: ./.github/workflows/sanitizer-check.yaml | ||
with: | ||
sanitizer-name: 'msan' | ||
|
||
run_tsan: | ||
needs: build_dependencies | ||
uses: ./.github/workflows/sanitizer-check.yaml | ||
with: | ||
sanitizer-name: 'tsan' | ||
|
||
run_ubsan: | ||
needs: build_dependencies | ||
uses: ./.github/workflows/sanitizer-check.yaml | ||
with: | ||
sanitizer-name: 'ubsan' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters