ci: add a check with -funsigned-char

This commit is contained in:
zeertzjq 2022-05-06 08:49:26 +08:00
parent 55187de115
commit 21abb24bd0
3 changed files with 10 additions and 1 deletions

View File

@ -119,6 +119,10 @@ jobs:
cc: clang-13 cc: clang-13
runner: ubuntu-20.04 runner: ubuntu-20.04
os: linux os: linux
- flavor: uchar
cc: gcc
runner: ubuntu-20.04
os: linux
- cc: clang - cc: clang
runner: macos-10.15 runner: macos-10.15
os: osx os: osx

View File

@ -43,6 +43,11 @@ EOF
cat <<EOF >> "$GITHUB_ENV" cat <<EOF >> "$GITHUB_ENV"
TSAN_OPTIONS=log_path=$GITHUB_WORKSPACE/build/log/tsan TSAN_OPTIONS=log_path=$GITHUB_WORKSPACE/build/log/tsan
CLANG_SANITIZER=TSAN CLANG_SANITIZER=TSAN
EOF
;;
uchar)
cat <<EOF >> "$GITHUB_ENV"
BUILD_UCHAR=1
EOF EOF
;; ;;
lint) lint)

View File

@ -370,7 +370,7 @@ option(CI_BUILD "CI, extra flags will be set" OFF)
if(CI_BUILD) if(CI_BUILD)
message(STATUS "CI build enabled") message(STATUS "CI build enabled")
add_compile_options(-Werror) add_compile_options(-Werror)
if(DEFINED ENV{BUILD_32BIT}) if(DEFINED ENV{BUILD_UCHAR})
# Get some test coverage for unsigned char # Get some test coverage for unsigned char
add_compile_options(-funsigned-char) add_compile_options(-funsigned-char)
endif() endif()