Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH: Actions - Add valgrind and CMake #1004

Merged
merged 1 commit into from
Oct 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 53 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand Down