Skip to content

Commit 387f3f8

Browse files
authored
Added the sanitizer to the verify script [HZ-5191] (#1338)
Added the sanitizer to the verify script. The nightly tests were failing with: ``` Undefined symbols for architecture arm64: "___asan_after_dynamic_init", referenced from: ```
1 parent 61760ae commit 387f3f8

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

.github/workflows/build-pr.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ jobs:
210210
name: windows-${{ matrix.options.address_model }}-(${{ matrix.build_type }}, ${{ matrix.shared_libs.name }}, ${{ matrix.with_openssl.name }})
211211
steps:
212212
- uses: actions/checkout@v5
213-
if: ${{ matrix.with_openssl.toggle != 'OFF' }}
214213
with:
215214
ref: ${{ needs.get-refs.outputs.ref }}
216215
token: ${{ secrets.GH_TOKEN }}

.github/workflows/nightly-macos-x86_64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
- name: Verify Installation
5555
env:
5656
BUILD_DIR: build-examples
57+
BUILD_TYPE: ${{ matrix.build_type }}
5758
run: |
5859
./scripts/verify-installation-unix.sh \
5960
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/destination \

.github/workflows/nightly-ubuntu-x86_64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
- name: Verify Installation
6666
env:
6767
BUILD_DIR: build-examples
68+
BUILD_TYPE: ${{ matrix.build_type }}
6869
run: |
6970
./scripts/verify-installation-unix.sh \
7071
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/destination \

scripts/verify-installation-unix.sh

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#
66
# This environment variables are the parameters to this script:
77
# - BUILD_DIR : build directory
8+
# - BUILD_TYPE : build type (Release, Debug, etc.)
89
# - BIT_VERSION : target platform architecture (32 or 64)
910
# - CXXFLAGS : additional compiler flags
1011
#
@@ -19,6 +20,18 @@ if [ -n "$BIT_VERSION" ]; then
1920
CXXFLAGS="$CXXFLAGS -m$BIT_VERSION"
2021
fi
2122

23+
if [ "${BUILD_TYPE}" = "Debug" ]; then
24+
# treat compiler warnings as errors when the build type is Debug
25+
CXXFLAGS="$CXXFLAGS -Werror"
26+
# enable address sanitizer to provide meaningful stack traces
27+
CXXFLAGS="$CXXFLAGS -fsanitize=address -fno-omit-frame-pointer"
28+
fi
29+
30+
# treat compiler warnings as errors when the build type is Debug
31+
CXXFLAGS="$CXXFLAGS -Werror"
32+
# enable address sanitizer to provide meaningful stack traces
33+
CXXFLAGS="$CXXFLAGS -fsanitize=address -fno-omit-frame-pointer"
34+
2235
# export flags variable to be used by CMake
2336
export CXXFLAGS
2437

@@ -30,11 +43,19 @@ fi
3043

3144
SOURCE_DIR=$(pwd)/examples
3245

46+
# print variables for debugging
47+
echo "BUILD_DIR = $BUILD_DIR"
48+
echo "BUILD_TYPE = BUILD_TYPE"
49+
echo "$SOURCE_DIR = $SOURCE_DIR"
50+
echo "BIT_VERSION = $BIT_VERSION"
51+
echo "CXXFLAGS = $CXXFLAGS"
52+
echo "CMake arguments = $@"
53+
3354
mkdir $BUILD_DIR
3455
cd $BUILD_DIR
3556

36-
echo "Configuring..."
37-
cmake $SOURCE_DIR "$@"
57+
echo "Configuring... with cmake parameters: cmake $SOURCE_DIR $@"
58+
cmake $SOURCE_DIR -DCMAKE_BUILD_TYPE=${BUILD_TYPE} "$@"
3859

3960
echo "Building..."
4061
VERBOSE=1 cmake --build .

0 commit comments

Comments
 (0)