summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: e2d94c51c248347bd9f3feb3e31104acf03e9449 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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