Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
common: move ASAN and UBSAN build after code coverage check
Browse files Browse the repository at this point in the history
  • Loading branch information
ldorau committed Mar 14, 2023
1 parent 8d8f24c commit bef6b1b
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions utils/docker/run-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ LIB=$(find /lib* -name "*protobuf-c.so*" || true)

echo
echo "##################################################################"
echo "### Verify build with ASAN and UBSAN ($CC, DEBUG)"
echo "### Verify build and install (in dir: ${PREFIX}) ($CC, DEBUG)"
echo "##################################################################"

mkdir -p $WORKDIR/build
Expand All @@ -152,19 +152,30 @@ cd $WORKDIR/build
CC=$CC \
$CMAKE .. -DCMAKE_BUILD_TYPE=Debug \
-DTEST_DIR=$TEST_DIR \
-DBUILD_DEVELOPER_MODE=1 \
-DDEBUG_USE_ASAN=${CI_SANITS} \
-DDEBUG_USE_UBSAN=${CI_SANITS}
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DTESTS_COVERAGE=$TESTS_COVERAGE \
-DBUILD_DEVELOPER_MODE=1

make -j$(nproc)
ctest --output-on-failure
sudo_password make -j$(nproc) install

if [ "$TESTS_COVERAGE" == "1" ]; then
upload_codecov tests
fi

test_compile_all_examples_standalone

# Uninstall libraries
cd $WORKDIR/build
sudo_password make uninstall

cd $WORKDIR
rm -rf $WORKDIR/build

echo
echo "##################################################################"
echo "### Verify build and install (in dir: ${PREFIX}) ($CC, DEBUG)"
echo "### Verify build with ASAN and UBSAN ($CC, DEBUG)"
echo "##################################################################"

mkdir -p $WORKDIR/build
Expand All @@ -173,23 +184,12 @@ cd $WORKDIR/build
CC=$CC \
$CMAKE .. -DCMAKE_BUILD_TYPE=Debug \
-DTEST_DIR=$TEST_DIR \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DTESTS_COVERAGE=$TESTS_COVERAGE \
-DBUILD_DEVELOPER_MODE=1
-DBUILD_DEVELOPER_MODE=1 \
-DDEBUG_USE_ASAN=${CI_SANITS} \
-DDEBUG_USE_UBSAN=${CI_SANITS}

make -j$(nproc)
ctest --output-on-failure
sudo_password make -j$(nproc) install

if [ "$TESTS_COVERAGE" == "1" ]; then
upload_codecov tests
fi

test_compile_all_examples_standalone

# Uninstall libraries
cd $WORKDIR/build
sudo_password make uninstall

cd $WORKDIR
rm -rf $WORKDIR/build
Expand Down

0 comments on commit bef6b1b

Please sign in to comment.