-
Notifications
You must be signed in to change notification settings - Fork 11
73 lines (65 loc) · 1.89 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
name: CI
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0' # Run every Sunday at midnight UTC
jobs:
build:
strategy:
matrix:
os:
# - "macos-latest"
- "ubuntu-20.04"
- "ubuntu-22.04"
- "ubuntu-24.04"
version:
- "5.0"
- "6.0"
- "6.2"
- "7.2"
- "7.4"
- "unstable"
runs-on: ${{ matrix.os }}
env:
CC: clang
# TODO: would be nice to connect to a redis server instead of building from source
# services:
# redis:
# image: redis:${{ matrix.version }}
# options: >-
# --health-cmd "redis-cli ping"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Prerequisites and clone Redis ${{ matrix.version }}
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y cmake libssl-dev git clang bc
git clone https://git.cryptomilk.org/projects/cmocka.git
cd cmocka
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
make
sudo make install
git clone https://github.com/redis/redis.git ~/redis
- name: Test on redis-${{ matrix.version }}
shell: bash
run: |
# clang is more strict to shared-obj versioning. Satisfy its needs.
pushd ~/redis
git checkout ${{ matrix.version }}
make -j 4 -C ~/redis
if [ $(bc -l <<< "${{ matrix.version }} >= 6.2") -eq 1 ] || [ "${{ matrix.version }}" = "unstable" ]; then
make -C ~/redis/tests/modules
fi
popd
make clean debug test example
working-directory: ${{github.workspace}}