-
Notifications
You must be signed in to change notification settings - Fork 698
91 lines (76 loc) · 3.07 KB
/
ci.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: CI
on:
push:
branches: [ v4 ]
pull_request:
branches: [ v4 ]
workflow_dispatch:
jobs:
black-box-test:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
redis-version: [ "2.8", "3.0", "4.0", "5.0", "6.0", "7.0" ]
fail-fast: false
container: ubuntu:latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v3
with:
go-version-file: go.mod
- name: clone and make redis
run: |
apt-get update
apt-get install -y --no-install-recommends git build-essential ca-certificates
git clone https://github.com/redis/redis
cd redis
git checkout ${{ matrix.redis-version }}
make -j
mkdir bin
cp src/redis-server bin/redis-server
echo "$GITHUB_WORKSPACE/redis/bin" >> $GITHUB_PATH
- name: clone and make TairString Module
if: contains( '5.0, 6.0, 7.0', matrix.redis-version)
run: |
cd $GITHUB_WORKSPACE
apt-get install -y cmake
git clone https://github.com/tair-opensource/TairString.git
cd TairString
mkdir build
cd build
cmake ../ && make -j
cp $GITHUB_WORKSPACE/TairString/lib/tairstring_module.so /lib
- name: clone and make TairHash Module
if: contains( '5.0, 6.0, 7.0', matrix.redis-version)
run: |
cd $GITHUB_WORKSPACE
git clone https://github.com/tair-opensource/TairHash.git
cd TairHash
mkdir build
cd build
cmake ../ && make -j
cp $GITHUB_WORKSPACE/TairHash/lib/tairhash_module.so /lib
- name: clone and make TairZset Module
if: contains( '5.0, 6.0, 7.0', matrix.redis-version)
run: |
cd $GITHUB_WORKSPACE
git clone https://github.com/tair-opensource/TairZset.git
cd TairZset
mkdir build
cd build
cmake ../ && make -j
cp $GITHUB_WORKSPACE/TairZset/lib/tairzset_module.so /lib
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: make redis-shake
run: |
sh build.sh
- name: test
run: |
python -m pip install -r tests/requirements.txt
sh test.sh