summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/release-drafter-config.yml49
-rw-r--r--.github/workflows/build.yml208
-rw-r--r--.github/workflows/release-drafter.yml19
3 files changed, 276 insertions, 0 deletions
diff --git a/.github/release-drafter-config.yml b/.github/release-drafter-config.yml
new file mode 100644
index 0000000..de4fea7
--- /dev/null
+++ b/.github/release-drafter-config.yml
@@ -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 (#$NUMBER)'
+exclude-labels:
+ - 'skip-changelog'
+template: |
+ ## Changes
+
+ $CHANGES
+
+ ## Contributors
+ We'd like to thank all the contributors who worked on this release!
+
+ $CONTRIBUTORS
+
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..c1e4f55
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,208 @@
+name: Build and test
+on: [push, pull_request]
+
+jobs:
+ ubuntu:
+ name: Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ repository: ${{ env.GITHUB_REPOSITORY }}
+ ref: ${{ env.GITHUB_HEAD_REF }}
+
+ - 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-ubuntu && cd build-ubuntu && cmake ..
+
+ - 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
+
+ centos7:
+ name: CentOS 7
+ runs-on: ubuntu-latest
+ container: centos:7
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ repository: ${{ env.GITHUB_REPOSITORY }}
+ ref: ${{ env.GITHUB_HEAD_REF }}
+
+ - name: Install dependencies
+ run: |
+ yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
+ yum -y --enablerepo=remi install redis
+ yum -y install gcc gcc-c++ make openssl openssl-devel cmake3 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-centos7 && cd build-centos7 && cmake3 ..
+
+ - 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
+
+ centos8:
+ name: RockyLinux 8
+ runs-on: ubuntu-latest
+ container: rockylinux:8
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ repository: ${{ env.GITHUB_REPOSITORY }}
+ ref: ${{ env.GITHUB_HEAD_REF }}
+
+ - name: Install dependencies
+ run: |
+ 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-centos8 && cd build-centos8 && cmake ..
+
+ - 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: macos-12
+ name: FreeBSD
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ repository: ${{ env.GITHUB_REPOSITORY }}
+ ref: ${{ env.GITHUB_HEAD_REF }}
+
+ - name: Build in FreeBSD
+ uses: vmactions/freebsd-vm@v0
+ with:
+ prepare: pkg install -y gmake cmake
+ run: |
+ mkdir build && cd build && cmake .. && make && cd ..
+ gmake
+
+ macos:
+ name: macOS
+ runs-on: macos-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ repository: ${{ env.GITHUB_REPOSITORY }}
+ ref: ${{ env.GITHUB_HEAD_REF }}
+
+ - name: Install dependencies
+ run: |
+ brew install openssl redis@6.2
+ brew link redis@6.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:
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ repository: ${{ env.GITHUB_REPOSITORY }}
+ ref: ${{ env.GITHUB_HEAD_REF }}
+
+ - 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: Setup cygwin
+ uses: egor-tensin/setup-cygwin@v3
+ with:
+ platform: x64
+ packages: make git gcc-core
+
+ - name: Build in cygwin
+ env:
+ HIREDIS_PATH: ${{ github.workspace }}
+ run: |
+ build_hiredis() {
+ git config --global --add safe.directory "$(cygpath -u $HIREDIS_PATH)"
+ cd $(cygpath -u $HIREDIS_PATH)
+ git clean -xfd
+ make
+ }
+ build_hiredis
+ shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml
new file mode 100644
index 0000000..ec2d88b
--- /dev/null
+++ b/.github/workflows/release-drafter.yml
@@ -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 }}