Skip to content

Commit

Permalink
ci: add warning flags in CI configuration
Browse files Browse the repository at this point in the history
These flags were removed from the CMakeLists.txt earlier, so adding them
back here.

Signed-off-by: GitHub <[email protected]>
  • Loading branch information
alanxz authored Apr 2, 2021
1 parent 9be09a3 commit 79b06a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ jobs:
shell: bash
run: |
cmake -E make_directory build/
cmake -S . -B build/
cmake -DCMAKE_C_FLAGS="/W4" -S . -B build/
cmake --build build/ --config Debug --target INSTALL
ctest -V ./build/
12 changes: 6 additions & 6 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

build_cmake() {
mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../_install -DCMAKE_C_FLAGS="-Werror -Wno-implicit-fallthrough"
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../_install -DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Werror"
cmake --build . --target install
ctest -V .
}

build_macos() {
mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../_install -DCMAKE_C_FLAGS="-Werror" \
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../_install -DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Werror" \
-DOPENSSL_ROOT_DIR="/usr/local/opt/[email protected]"
cmake --build . --target install
ctest -V .
Expand All @@ -25,7 +25,7 @@ build_format() {
build_coverage() {
mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_BUILD_TYPE=Coverage -DCMAKE_INSTALL_PREFIX=$PWD/../_install \
-DCMAKE_C_FLAGS="-Werror -fprofile-arcs -ftest-coverage"
-DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Werror -fprofile-arcs -ftest-coverage"
cmake --build . --target install
ctest -V .

Expand All @@ -36,15 +36,15 @@ build_coverage() {
build_asan() {
mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/../_install \
-DCMAKE_C_FLAGS="-Werror -fsanitize=address,undefined -O1"
-DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Werror -fsanitize=address,undefined -O1"
cmake --build . --target install
ctest -V .
}

build_tsan() {
mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/../_install \
-DCMAKE_C_FLAGS="-Werror -fsanitize=thread,undefined -O1"
-DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Werror -fsanitize=thread,undefined -O1"
cmake --build . --target install
ctest -V .
}
Expand All @@ -55,7 +55,7 @@ build_scan-build() {
scan-build cmake .. -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_INSTALL_PREFIX=$PWD/../_install \
-DCMAKE_C_FLAGS="-Werror"
-DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Werror"
scan-build make install
}

Expand Down

0 comments on commit 79b06a9

Please sign in to comment.