Skip to content

Commit

Permalink
asan flags fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vityaman committed Nov 20, 2024
1 parent b668747 commit cb5e8e3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ jobs:
- name: Build
run: |
if [[ -z "${{ matrix.compiler }}" ]]; then
SAN=""
else
SAN="-fsanitize=${{ matrix.compiler }}"
fi
bear -- make compile \
COMPILER=${{ matrix.compiler }} \
OPTIMIZATION_LEVEL=${{ matrix.optimization_level }}\
SANITIZERS=-fsanitize=${{ matrix.sanitizers }}
SANITIZERS="$SAN"
- name: Test
run: ./build/bin/app
Expand Down
17 changes: 14 additions & 3 deletions ci/precommit.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,22 @@ SANITIZERS=("" "address,leak")
for compiler in "${COMPILERS[@]}"; do
for optimization_level in "${OPTIMIZATION_LEVELS[@]}"; do
for sanitizer in "${SANITIZERS[@]}"; do
echo "======= Running '$compiler', '$optimization_level', '$sanitizer' ======="
make \
if [[ -z "$sanitizers" ]]; then
SAN=""
else
SAN="-fsanitize=$sanitizers"
fi

echo "======= Building '$compiler', '$optimization_level', '$sanitizer' ======="
make clean
bear -- make compile \
COMPILER="$compiler" \
OPTIMIZATION_LEVEL="$optimization_level" \
SANITIZERS="-fsanitize=$sanitizer"
SANITIZERS="$SAN"
for i in {1..8}; do
echo "|- Running #$i..."
./build/bin/app 1>/dev/null
done
done
done
done

0 comments on commit cb5e8e3

Please sign in to comment.