summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2021-11-29 16:30:35 +0800
committerGitHub <noreply@github.com>2021-11-29 10:30:35 +0200
commit980bb3ae19ecb3c3e112242e076bb8ceff521cf1 (patch)
treeb1e38736b2105f4b6005167f4c864b64b372d145 /.github
parentd56ded89c54943ed69a5811e6b6cc55b8ecdce6e (diff)
downloadredis-980bb3ae19ecb3c3e112242e076bb8ceff521cf1.tar.gz
Add REDIS_CFLAGS='-Werror' to CI tests (#9828)
Update CI so that warnings cause build failures. Also fix a warning in `test-sanitizer-address`: ``` In function ‘strncpy’, inlined from ‘clusterUpdateMyselfIp’ at cluster.c:545:13: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 46 equals destination size [-Werror=stringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors ```
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml2
-rw-r--r--.github/workflows/daily.yml20
2 files changed, 11 insertions, 11 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bd96ed0d9..073cbe2a2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: make
- run: make SANITIZER=address
+ run: make SANITIZER=address REDIS_CFLAGS='-Werror'
- name: testprep
run: sudo apt-get install tcl8.6 tclx -y
- name: test
diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml
index a3e31e01a..5cc7fbd22 100644
--- a/.github/workflows/daily.yml
+++ b/.github/workflows/daily.yml
@@ -84,7 +84,7 @@ jobs:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
- name: make
- run: make MALLOC=libc
+ run: make MALLOC=libc REDIS_CFLAGS='-Werror'
- name: testprep
run: sudo apt-get install tcl8.6 tclx
- name: test
@@ -117,7 +117,7 @@ jobs:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
- name: make
- run: make MALLOC=libc CFLAGS=-DNO_MALLOC_USABLE_SIZE
+ run: make MALLOC=libc CFLAGS=-DNO_MALLOC_USABLE_SIZE REDIS_CFLAGS='-Werror'
- name: testprep
run: sudo apt-get install tcl8.6 tclx
- name: test
@@ -190,7 +190,7 @@ jobs:
ref: ${{ env.GITHUB_HEAD_REF }}
- name: make
run: |
- make BUILD_TLS=yes
+ make BUILD_TLS=yes REDIS_CFLAGS='-Werror'
- name: testprep
run: |
sudo apt-get install tcl8.6 tclx tcl-tls
@@ -234,7 +234,7 @@ jobs:
ref: ${{ env.GITHUB_HEAD_REF }}
- name: make
run: |
- make
+ make REDIS_CFLAGS='-Werror'
- name: testprep
run: sudo apt-get install tcl8.6 tclx
- name: test
@@ -294,7 +294,7 @@ jobs:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
- name: make
- run: make valgrind CFLAGS="-DNO_MALLOC_USABLE_SIZE"
+ run: make valgrind CFLAGS="-DNO_MALLOC_USABLE_SIZE" REDIS_CFLAGS='-Werror'
- name: testprep
run: |
sudo apt-get update
@@ -328,7 +328,7 @@ jobs:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
- name: make
- run: make SANITIZER=address REDIS_CFLAGS='-DREDIS_TEST'
+ run: make SANITIZER=address REDIS_CFLAGS='-DREDIS_TEST -Werror'
- name: testprep
run: |
sudo apt-get update
@@ -370,7 +370,7 @@ jobs:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
- name: make
- run: make SANITIZER=undefined REDIS_CFLAGS='-DREDIS_TEST' LUA_DEBUG=yes # we (ab)use this flow to also check Lua C API violations
+ run: make SANITIZER=undefined REDIS_CFLAGS='-DREDIS_TEST -Werror' LUA_DEBUG=yes # we (ab)use this flow to also check Lua C API violations
- name: testprep
run: |
sudo apt-get update
@@ -410,7 +410,7 @@ jobs:
- name: make
run: |
yum -y install gcc make
- make
+ make REDIS_CFLAGS='-Werror'
- name: testprep
run: yum -y install which tcl tclx
- name: test
@@ -447,7 +447,7 @@ jobs:
run: |
yum -y install centos-release-scl epel-release
yum -y install devtoolset-7 openssl-devel openssl
- scl enable devtoolset-7 "make BUILD_TLS=yes"
+ scl enable devtoolset-7 "make BUILD_TLS=yes REDIS_CFLAGS='-Werror'"
- name: testprep
run: |
yum -y install tcl tcltls tclx
@@ -490,7 +490,7 @@ jobs:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
- name: make
- run: make
+ run: make REDIS_CFLAGS='-Werror'
- name: test
if: true && !contains(github.event.inputs.skiptests, 'redis')
run: ./runtest --accurate --verbose --no-latency --dump-logs ${{github.event.inputs.test_args}}