summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml65
1 files changed, 65 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..e2d94c5
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,65 @@
+name: Build and test
+on: push
+
+jobs:
+ 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 redis-server
+ 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
+ run: USE_SSL=1 make
+
+ - name: Run tests
+ run: $GITHUB_WORKSPACE/test.sh
+
+ centos7:
+ 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 redis-server
+ 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
+
+ - name: Build hiredis
+ run: USE_SSL=1 make
+
+ - name: Run tests
+ run: $GITHUB_WORKSPACE/test.sh
+
+ 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
+
+ - name: Build hiredis
+ run: USE_SSL=1 make
+
+ - name: Run tests
+ run: $GITHUB_WORKSPACE/test.sh