diff options
author | michael-grunder <michael.grunder@gmail.com> | 2021-10-13 12:15:54 -0700 |
---|---|---|
committer | Michael Grunder <michael.grunder@gmail.com> | 2021-10-14 11:40:00 -0700 |
commit | 4a126e8a9c52ac2fd0bb46cae57afa3f1cb44fd6 (patch) | |
tree | 989949f55829eebeba8f0522c8e5c620469594b8 /.github/workflows | |
parent | b73c2d410f4c7c2510cf63e98660bab2ca82fbc9 (diff) |
Add valgrind and CMake to tests
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build.yml | 61 |
1 files changed, 53 insertions, 8 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25d4fa3..a787700 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,18 +11,33 @@ jobs: repository: ${{ env.GITHUB_REPOSITORY }} ref: ${{ env.GITHUB_HEAD_REF }} - - name: Install redis-server + - name: Install dependencies run: | sudo add-apt-repository -y ppa:chris-lea/redis-server sudo apt-get update - sudo apt-get install -y redis-server - - - name: Build hiredis + sudo apt-get install -y redis-server valgrind + + - name: Build using cmake + env: + EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON + CFLAGS: -Werror + CXXFLAGS: -Werror + run: mkdir build-ubuntu && cd build-ubuntu && cmake .. + + - name: Build using makefile run: USE_SSL=1 make - name: Run tests + env: + SKIPS_AS_FAILS: 1 run: $GITHUB_WORKSPACE/test.sh + # - name: Run tests under valgrind + # env: + # SKIPS_AS_FAILS: 1 + # TEST_PREFIX: valgrind --track-origins=yes --leak-check=full + # run: $GITHUB_WORKSPACE/test.sh + centos7: runs-on: ubuntu-latest container: centos:7 @@ -37,12 +52,27 @@ jobs: run: | yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum -y --enablerepo=remi install redis - yum -y install gcc make openssl-devel + yum -y install gcc gcc-c++ make openssl-devel cmake3 valgrind - - name: Build hiredis + - name: Build using cmake + env: + EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON + CFLAGS: -Werror + CXXFLAGS: -Werror + run: mkdir build-centos7 && cd build-centos7 && cmake3 .. + + - name: Build using Makefile run: USE_SSL=1 make - name: Run tests + env: + SKIPS_AS_FAILS: 1 + run: $GITHUB_WORKSPACE/test.sh + + - name: Run tests under valgrind + env: + SKIPS_AS_FAILS: 1 + TEST_PREFIX: valgrind --track-origins=yes --leak-check=full run: $GITHUB_WORKSPACE/test.sh centos8: @@ -60,12 +90,27 @@ jobs: dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm dnf -y module install redis:remi-6.0 dnf -y group install "Development Tools" - dnf -y install openssl-devel + dnf -y install openssl-devel cmake valgrind - - name: Build hiredis + - name: Build using cmake + env: + EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON + CFLAGS: -Werror + CXXFLAGS: -Werror + run: mkdir build-centos8 && cd build-centos8 && cmake .. + + - name: Build using Makefile run: USE_SSL=1 make - name: Run tests + env: + SKIPS_AS_FAILS: 1 + run: $GITHUB_WORKSPACE/test.sh + + - name: Run tests under valgrind + env: + SKIPS_AS_FAILS: 1 + TEST_PREFIX: valgrind --track-origins=yes --leak-check=full run: $GITHUB_WORKSPACE/test.sh macos: |