Skip to content

Fix recv() 120s Timeout on EAGAIN by Retrying Indefinitely #367

Fix recv() 120s Timeout on EAGAIN by Retrying Indefinitely

Fix recv() 120s Timeout on EAGAIN by Retrying Indefinitely #367

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0' # Run every Sunday at midnight UTC
jobs:
build:
strategy:
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
version:
- "5.0"
- "6.0"
- "6.2"
- "7.0"
- "7.2"
- "7.4"
- "unstable"
compiler:
- "gcc"
- "clang"
exclude:
- os: macos-latest
compiler: gcc
- os: macos-latest
version: "5.0"
- os: macos-latest
version: "6.0"
- os: macos-latest
version: "7.0"
runs-on: ${{ matrix.os }}
env:
DEBIAN_FRONTEND: noninteractive
CC: ${{ matrix.compiler }}
# TODO: would be nice to connect to a redis server instead of building from source
# services:
# redis:
# image: redis:${{ matrix.version }}
# options: >-
# --health-cmd "redis-cli ping"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
steps:
- name: Checkout librdb
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Clone Redis (${{ matrix.version }})
uses: actions/checkout@v4
with:
repository: redis/redis
ref: ${{ matrix.version }}
path: redis
- name: Install prerequisites
run: |
if [ "${RUNNER_OS}" = "Linux" ]; then
sudo apt-get update
sudo apt-get install -y cmake clang libssl-dev valgrind git bc
# Build and install cmocka
git clone https://git.cryptomilk.org/projects/cmocka.git
cd cmocka
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
make
sudo make install
elif [ "${RUNNER_OS}" = "macOS" ]; then
brew install cmocka bc llvm grep
echo "PATH=$(brew --prefix)/opt/grep/libexec/gnubin:${PATH}" >> "${GITHUB_ENV}"
fi
- name: Build Redis ${{ matrix.version }}
run: |
make -j -C redis
if [ $(bc -l <<< "${{ matrix.version }} >= 6.2") -eq 1 ] || [ "${{ matrix.version }}" = "unstable" ]; then
make -j -C redis/tests/modules
fi
- name: Run tests with shared lib
run: |
LIBRDB_REDIS_FOLDER="$(pwd)/redis/src" make clean debug test
- name: Run tests with static lib and valgrind
if: runner.os == 'Linux'
run: |
LIBRDB_REDIS_FOLDER="$(pwd)/redis/src" make clean all valgrind