From 21abb24bd01c1c34ff17078a17b811edaf473a34 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 6 May 2022 08:49:26 +0800 Subject: [PATCH] ci: add a check with -funsigned-char --- .github/workflows/ci.yml | 4 ++++ .github/workflows/env.sh | 5 +++++ CMakeLists.txt | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea3185d2a1..1aa0906ffc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,6 +119,10 @@ jobs: cc: clang-13 runner: ubuntu-20.04 os: linux + - flavor: uchar + cc: gcc + runner: ubuntu-20.04 + os: linux - cc: clang runner: macos-10.15 os: osx diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index bd170f92fb..ca1194efa9 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -43,6 +43,11 @@ EOF cat <> "$GITHUB_ENV" TSAN_OPTIONS=log_path=$GITHUB_WORKSPACE/build/log/tsan CLANG_SANITIZER=TSAN +EOF + ;; + uchar) + cat <> "$GITHUB_ENV" +BUILD_UCHAR=1 EOF ;; lint) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82d9a42db2..01df172ed4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -370,7 +370,7 @@ option(CI_BUILD "CI, extra flags will be set" OFF) if(CI_BUILD) message(STATUS "CI build enabled") add_compile_options(-Werror) - if(DEFINED ENV{BUILD_32BIT}) + if(DEFINED ENV{BUILD_UCHAR}) # Get some test coverage for unsigned char add_compile_options(-funsigned-char) endif()