Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ewalshe/hiredis
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: redis/hiredis
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
Loading
Showing with 6,250 additions and 934 deletions.
  1. +49 −0 .github/release-drafter-config.yml
  2. +29 −0 .github/spellcheck-settings.yml
  3. +99 −0 .github/wordlist.txt
  4. +141 −0 .github/workflows/build.yml
  5. +19 −0 .github/workflows/release-drafter.yml
  6. +14 −0 .github/workflows/spellcheck.yml
  7. +100 −0 .github/workflows/test.yml
  8. +2 −0 .gitignore
  9. +23 −8 .travis.yml
  10. +396 −15 CHANGELOG.md
  11. +114 −31 CMakeLists.txt
  12. +131 −54 Makefile
  13. +408 −46 README.md
  14. +4 −1 adapters/ae.h
  15. +3 −0 adapters/glib.h
  16. +4 −1 adapters/ivykis.h
  17. +24 −12 adapters/libev.h
  18. +5 −2 adapters/libevent.h
  19. +123 −0 adapters/libhv.h
  20. +177 −0 adapters/libsdevent.h
  21. +113 −60 adapters/libuv.h
  22. +36 −7 adapters/macosx.h
  23. +197 −0 adapters/poll.h
  24. +144 −0 adapters/redismoduleapi.h
  25. +43 −18 alloc.c
  26. +49 −6 alloc.h
  27. +379 −117 async.c
  28. +11 −2 async.h
  29. +13 −10 async_private.h
  30. +18 −14 dict.c
  31. +1 −2 dict.h
  32. +16 −1 examples/CMakeLists.txt
  33. +2 −0 examples/example-ivykis.c
  34. +2 −0 examples/example-libev.c
  35. +18 −1 examples/example-libevent-ssl.c
  36. +4 −1 examples/example-libevent.c
  37. +70 −0 examples/example-libhv.c
  38. +86 −0 examples/example-libsdevent.c
  39. +34 −6 examples/example-libuv.c
  40. +32 −4 examples/example-macosx.c
  41. +62 −0 examples/example-poll.c
  42. +159 −0 examples/example-push.c
  43. +101 −0 examples/example-redismoduleapi.c
  44. +17 −2 examples/example-ssl.c
  45. +55 −1 examples/example.c
  46. +2 −0 fmacros.h
  47. +56 −0 fuzzing/format_command_fuzzer.c
  48. +2 −2 hiredis-config.cmake.in
  49. +246 −98 hiredis.c
  50. +95 −31 hiredis.h
  51. +1 −1 hiredis.pc.in
  52. +11 −0 hiredis.targets
  53. +3 −0 hiredis_ssl-config.cmake.in
  54. +107 −5 hiredis_ssl.h
  55. +2 −1 hiredis_ssl.pc.in
  56. +191 −64 net.c
  57. +5 −2 net.h
  58. +151 −77 read.c
  59. +8 −3 read.h
  60. +32 −31 sds.c
  61. +5 −1 sds.h
  62. +5 −3 sdsalloc.h
  63. +34 −2 sockcompat.c
  64. +5 −1 sockcompat.h
  65. +271 −118 ssl.c
  66. +1,448 −63 test.c
  67. +43 −9 test.sh
49 changes: 49 additions & 0 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name-template: '$NEXT_MAJOR_VERSION'
tag-template: 'v$NEXT_MAJOR_VERSION'
autolabeler:
- label: 'maintenance'
files:
- '*.md'
- '.github/*'
- label: 'bug'
branch:
- '/bug-.+'
- label: 'maintenance'
branch:
- '/maintenance-.+'
- label: 'feature'
branch:
- '/feature-.+'
categories:
- title: 'Breaking Changes'
labels:
- 'breakingchange'

- title: '🧪 Experimental Features'
labels:
- 'experimental'
- title: '🚀 New Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- 'BUG'
- title: '🧰 Maintenance'
label: 'maintenance'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
exclude-labels:
- 'skip-changelog'
template: |
## Changes
$CHANGES
## Contributors
We'd like to thank all the contributors who worked on this release!
$CONTRIBUTORS
29 changes: 29 additions & 0 deletions .github/spellcheck-settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
matrix:
- name: Markdown
expect_match: false
apsell:
lang: en
d: en_US
ignore-case: true
dictionary:
wordlists:
- .github/wordlist.txt
output: wordlist.dic
pipeline:
- pyspelling.filters.markdown:
markdown_extensions:
- markdown.extensions.extra:
- pyspelling.filters.html:
comments: false
attributes:
- alt
ignores:
- ':matches(code, pre)'
- code
- pre
- blockquote
- img
sources:
- 'README.md'
- 'FAQ.md'
- 'docs/**'
99 changes: 99 additions & 0 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
ABI
ACLs
alloc
Allocator
allocators
antirez
api
APIs
ASYNC
asyncRedisContext
asyncronous
AUTOFREE
autoload
autoloader
autoloading
Autoloading
backend
backends
behaviour
boolean
CAS
Changelog
customizable
Customizable
CVE
dataset
de
deallocation
ElastiCache
extensibility
FPM
getaddrinfo
gmail
grunder
Grunder
hiredis
Hiredis
HIREDIS
hostname
IANA
IPv
IPV
keepalive
keyspace
keyspaces
KiB
libc
libev
libevent
localhost
Lua
michael
minimalistic
namespace
NOAUTOFREE
NOAUTOFREEREPLIES
NONBLOCK
Noordhuis
OpenSSL
Packagist
pcnoordhuis
PhpRedis
Pieter
pipelined
pipelining
pluggable
Predis
PRERELEASE
printf
PSR
PSUBSCRIBE
rb
Readme
README
rebalanced
rebalancing
redis
Redis
redisAsyncContext
redisContext
redisOptions
redisReader
reusability
REUSEADDR
runtime
Sanfilippo
SHA
sharding
SONAME
SSL
struct
stunnel
subelements
TCP
TLS
unparsed
UNSPEC
URI
variadic
141 changes: 141 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Build and test
on: [push, pull_request]

jobs:
ubuntu:
name: Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install -y redis-server valgrind libevent-dev
- name: Build using cmake
env:
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON
CFLAGS: -Werror
CXXFLAGS: -Werror
run: mkdir build && cd build && cmake .. && make

- name: Build using makefile
run: USE_SSL=1 TEST_ASYNC=1 make

- name: Run tests
env:
SKIPS_AS_FAILS: 1
TEST_SSL: 1
run: $GITHUB_WORKSPACE/test.sh

# - name: Run tests under valgrind
# env:
# SKIPS_AS_FAILS: 1
# TEST_PREFIX: valgrind --error-exitcode=99 --track-origins=yes --leak-check=full
# run: $GITHUB_WORKSPACE/test.sh

centos8:
name: RockyLinux 8
runs-on: ubuntu-latest
container: rockylinux:8
steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
dnf -y upgrade --refresh
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 cmake valgrind libevent-devel
- name: Build using cmake
env:
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON
CFLAGS: -Werror
CXXFLAGS: -Werror
run: mkdir build && cd build && cmake .. && make

- name: Build using Makefile
run: USE_SSL=1 TEST_ASYNC=1 make

- name: Run tests
env:
SKIPS_AS_FAILS: 1
TEST_SSL: 1
run: $GITHUB_WORKSPACE/test.sh

- name: Run tests under valgrind
env:
SKIPS_AS_FAILS: 1
TEST_SSL: 1
TEST_PREFIX: valgrind --error-exitcode=99 --track-origins=yes --leak-check=full
run: $GITHUB_WORKSPACE/test.sh

freebsd:
runs-on: ubuntu-latest
name: FreeBSD
steps:
- uses: actions/checkout@v3

- name: Build in FreeBSD
uses: vmactions/freebsd-vm@v1.0.5
with:
prepare: pkg install -y gmake cmake
run: |
mkdir build && cd build && cmake .. && make && cd ..
gmake
macos:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
brew install openssl redis@7.2
brew link redis@7.2 --force
- name: Build hiredis
run: USE_SSL=1 make

- name: Run tests
env:
TEST_SSL: 1
run: $GITHUB_WORKSPACE/test.sh

windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
choco install -y ninja memurai-developer
- uses: ilammy/msvc-dev-cmd@v1
- name: Build hiredis
run: |
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_EXAMPLES=ON
ninja -v
- name: Run tests
run: |
./build/hiredis-test.exe
- name: Install Cygwin Action
uses: cygwin/cygwin-install-action@v2
with:
packages: make git gcc-core

- name: Build in cygwin
env:
HIREDIS_PATH: ${{ github.workspace }}
run: |
make clean && make
19 changes: 19 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
config-name: release-drafter-config.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: spellcheck
on:
pull_request:
jobs:
check-spelling:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check Spelling
uses: rojopolis/spellcheck-github-actions@0.33.1
with:
config_path: .github/spellcheck-settings.yml
task_name: Markdown
Loading