-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): run static/dynamic analysis
- Loading branch information
Showing
4 changed files
with
109 additions
and
4 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
set -ve | ||
|
||
MACHINE=$(uname -m) | ||
uname -a | ||
gcc --version | ||
clang --version | ||
|
||
echo "::group::analyze" | ||
# Disable inline assembly for analyze | ||
if [ "${MACHINE}" == "x86_64" ]; then | ||
export SSSE3_CFLAGS="-mssse3 -DBASE64_SSSE3_USE_ASM=0" | ||
export SSE41_CFLAGS="-msse4.1 -DBASE64_SSE41_USE_ASM=0" | ||
export SSE42_CFLAGS="-msse4.2 -DBASE64_SSE42_USE_ASM=0" | ||
export AVX_CFLAGS="-mavx -DBASE64_AVX_USE_ASM=0" | ||
export AVX2_CFLAGS="-mavx2 -DBASE64_AVX2_USE_ASM=0" | ||
# Temporarily disable AVX512; it is not available in CI yet. | ||
# export AVX512_CFLAGS="-mavx512vl -mavx512vbmi" | ||
elif [ "${MACHINE}" == "aarch64" ]; then | ||
export NEON64_CFLAGS="-march=armv8-a" | ||
elif [ "${MACHINE}" == "armv7l" ]; then | ||
export NEON32_CFLAGS="-march=armv7-a -mfloat-abi=hard -mfpu=neon" | ||
fi | ||
make analyze | ||
echo "::endgroup::" | ||
|
||
echo "::group::valgrind (no assembly)" | ||
# Disable inline assembly for this run | ||
if [ "${MACHINE}" == "x86_64" ]; then | ||
export SSSE3_CFLAGS="-mssse3 -DBASE64_SSSE3_USE_ASM=0" | ||
export SSE41_CFLAGS="-msse4.1 -DBASE64_SSE41_USE_ASM=0" | ||
export SSE42_CFLAGS="-msse4.2 -DBASE64_SSE42_USE_ASM=0" | ||
export AVX_CFLAGS="-mavx -DBASE64_AVX_USE_ASM=0" | ||
export AVX2_CFLAGS="-mavx2 -DBASE64_AVX2_USE_ASM=0" | ||
# Temporarily disable AVX512; it is not available in CI yet. | ||
# export AVX512_CFLAGS="-mavx512vl -mavx512vbmi" | ||
elif [ "${MACHINE}" == "aarch64" ]; then | ||
export NEON64_CFLAGS="-march=armv8-a" | ||
elif [ "${MACHINE}" == "armv7l" ]; then | ||
export NEON32_CFLAGS="-march=armv7-a -mfloat-abi=hard -mfpu=neon" | ||
fi | ||
make clean | ||
make | ||
make -C test valgrind | ||
echo "::endgroup::" | ||
|
||
echo "::group::valgrind (assembly)" | ||
# Force inline assembly | ||
if [ "${MACHINE}" == "x86_64" ]; then | ||
export SSSE3_CFLAGS="-mssse3 -DBASE64_SSSE3_USE_ASM=1" | ||
export SSE41_CFLAGS="-msse4.1 -DBASE64_SSE41_USE_ASM=1" | ||
export SSE42_CFLAGS="-msse4.2 -DBASE64_SSE42_USE_ASM=1" | ||
export AVX_CFLAGS="-mavx -DBASE64_AVX_USE_ASM=1" | ||
export AVX2_CFLAGS="-mavx2 -DBASE64_AVX2_USE_ASM=1" | ||
# Temporarily disable AVX512; it is not available in CI yet. | ||
# export AVX512_CFLAGS="-mavx512vl -mavx512vbmi" | ||
elif [ "${MACHINE}" == "aarch64" ]; then | ||
export NEON64_CFLAGS="-march=armv8-a" | ||
elif [ "${MACHINE}" == "armv7l" ]; then | ||
export NEON32_CFLAGS="-march=armv7-a -mfloat-abi=hard -mfpu=neon" | ||
fi | ||
make clean | ||
make | ||
make -C test valgrind | ||
echo "::endgroup::" |
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