@@ -3,113 +3,190 @@ name: CI
3
3
on : [push, pull_request]
4
4
5
5
jobs :
6
+ smoketest-build-distros :
7
+ runs-on : ubuntu-latest
8
+ continue-on-error : true
9
+ env :
10
+ ARCH : amd64
11
+ # required by ubuntu:bionic
12
+ # https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
13
+ ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
14
+ DEBIAN_FRONTEND : noninteractive
15
+ strategy :
16
+ matrix :
17
+ image : ${{ fromJSON(vars.SMOKE_TEST_IMAGES) }}
18
+ container : ${{ matrix.image }}
19
+ name : Build ${{ matrix.image }}
20
+ steps :
21
+ - name : Checkout Code for ubuntu:bionic
22
+ if : matrix.image == 'ubuntu:bionic'
23
+ uses : actions/checkout@v3
24
+
25
+ - name : Checkout Code for other versions
26
+ if : matrix.image != 'ubuntu:bionic'
27
+ uses : actions/checkout@v4
28
+
29
+ - name : Install dependencies
30
+ run : |
31
+ apt-get -qq update -y
32
+ apt-get install -y \
33
+ build-essential autoconf automake libpcre3-dev libevent-dev \
34
+ pkg-config zlib1g-dev libssl-dev libboost-all-dev cmake flex
35
+
36
+ - name : Build
37
+ run : autoreconf -ivf && ./configure && make -j
38
+
39
+ build-notls :
40
+ runs-on : ubuntu-latest
41
+ steps :
42
+ - uses : actions/checkout@v4
43
+ - name : Install dependencies
44
+ run : |
45
+ sudo apt-get -qq update
46
+ sudo apt-get install lcov autoconf automake pkg-config libevent-dev libpcre3-dev
47
+
48
+ - name : Build
49
+ run : autoreconf -ivf && ./configure --disable-tls && make -j
50
+
51
+ build-ubuntu-latest :
52
+ runs-on : ubuntu-latest
53
+ steps :
54
+ - uses : actions/checkout@v4
55
+ - name : Install dependencies
56
+ run : |
57
+ sudo apt-get -qq update
58
+ sudo apt-get install lcov autoconf automake pkg-config libevent-dev libpcre3-dev
59
+
60
+ - name : Build
61
+ run : autoreconf -ivf && ./configure --disable-tls && make -j
62
+
6
63
build-ubuntu :
7
64
strategy :
8
65
matrix :
9
- platform : [ubuntu-latest, ubuntu-16 .04]
66
+ platform : [ubuntu-22.04, ubuntu-20 .04]
10
67
runs-on : ${{ matrix.platform }}
11
68
steps :
12
- - uses : actions/checkout@v2
69
+ - uses : actions/checkout@v4
13
70
- name : Install dependencies
14
71
run : |
15
72
sudo apt-get -qq update
16
- sudo apt-get install autoconf automake pkg-config libevent-dev libpcre3-dev libssl-dev
73
+ sudo apt-get install lcov autoconf automake pkg-config libevent-dev libpcre3-dev libssl-dev
74
+
17
75
- name : Build
18
- run : autoreconf -ivf && ./configure && make
76
+ # for coverage reports we need to use Ubuntu 22.04 or lower
77
+ # (given Ubuntu 24.04 uses lcov >= 2.0 which is not support on autoconf still)
78
+ run : autoreconf -ivf && ./configure --enable-code-coverage && make -j
19
79
- name : Setup Python
20
- uses : actions/setup-python@v1
80
+ uses : actions/setup-python@v2
21
81
with :
22
- python-version : ' 3.6'
82
+ python-version : ' 3.10'
83
+ architecture : x64
23
84
24
- - name : Cache pip
25
- uses : actions/cache@v1
26
- with :
27
- path : ~/.cache/pip # This path is specific to Ubuntu
28
- # Look to see if there is a cache hit for the corresponding requirements file
29
- key : ${{ runner.os }}-pip-${{ hashFiles('tests/test_requirements.txt') }}
30
- restore-keys : |
31
- ${{ runner.os }}-pip-
32
- ${{ runner.os }}-
33
85
- name : Install Python dependencies
34
- run : pip install -r tests/test_requirements.txt
86
+ run : pip install -r ./ tests/test_requirements.txt
35
87
36
- - name : Cache Redis
37
- id : cache-redis
38
- uses : actions/cache@v1
39
- with :
40
- path : /home/runner/work/memtier_benchmark/memtier_benchmark/redis
41
- key : ${{ runner.os }}-redis
88
+ - name : Install Redis
89
+ run : |
90
+ curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
91
+ 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
92
+ sudo apt-get -qq update
93
+ sudo apt-get install redis
94
+ sudo service redis-server stop
95
+
96
+ - name : Increase connection limit
97
+ run : |
98
+ sudo sysctl -w net.ipv4.tcp_fin_timeout=10
99
+ sudo sysctl -w net.ipv4.tcp_tw_reuse=1
100
+ ulimit -n 40960
42
101
43
- - name : Install Redis Server test dependencies
44
- if : steps.cache-redis.outputs.cache-hit != 'true '
102
+ - name : Generate TLS test certificates
103
+ if : matrix.platform == 'ubuntu-latest '
45
104
run : |
46
- git clone git://github.com/antirez/redis.git --branch unstable
47
- cd redis
48
- make BUILD_TLS=yes
49
- ./utils/gen-test-certs.sh
50
- ./src/redis-server --version
51
- cd ..
105
+ ./tests/gen-test-certs.sh
52
106
53
107
- name : Test OSS TCP
108
+ timeout-minutes : 10
54
109
run : |
55
- cd tests
56
- MEMTIER_BINARY=./../memtier_benchmark \
57
- python3 -m RLTest \
58
- --env oss -v --clear-logs \
59
- --oss-redis-path ../redis/src/redis-server
60
- cd ..
110
+ ./tests/run_tests.sh
61
111
62
112
- name : Test OSS TCP TLS
63
113
if : matrix.platform == 'ubuntu-latest'
114
+ timeout-minutes : 10
115
+ run : |
116
+ TLS=1 ./tests/run_tests.sh
117
+
118
+ - name : Test OSS TCP TLS v1.2
119
+ if : matrix.platform == 'ubuntu-latest'
120
+ timeout-minutes : 10
64
121
run : |
65
- cd tests
66
- TLS_CERT=../redis/tests/tls/redis.crt \
67
- TLS_KEY=../redis/tests/tls/redis.key \
68
- TLS_CACERT=../redis/tests/tls/ca.crt \
69
- MEMTIER_BINARY=../memtier_benchmark \
70
- python3 -m RLTest \
71
- --env oss -v --clear-logs \
72
- --oss-redis-path ../redis/src/redis-server \
73
- --tls-cert-file ../redis/tests/tls/redis.crt \
74
- --tls-key-file ../redis/tests/tls/redis.key \
75
- --tls-ca-cert-file ../redis/tests/tls/ca.crt \
76
- --tls
77
- cd ..
122
+ TLS_PROTOCOLS='TLSv1.2' VERBOSE=1 TLS=1 ./tests/run_tests.sh
123
+
124
+ - name : Test OSS TCP TLS v1.3
125
+ if : matrix.platform == 'ubuntu-latest'
126
+ timeout-minutes : 10
127
+ run : |
128
+ TLS_PROTOCOLS='TLSv1.3' VERBOSE=1 TLS=1 ./tests/run_tests.sh
78
129
79
130
- name : Test OSS-CLUSTER TCP
131
+ timeout-minutes : 10
80
132
run : |
81
- cd tests
82
- MEMTIER_BINARY=./../memtier_benchmark \
83
- python3 -m RLTest \
84
- --env oss-cluster -v --clear-logs --shards-count 3 \
85
- --oss-redis-path ../redis/src/redis-server
86
- cd ..
133
+ OSS_STANDALONE=0 OSS_CLUSTER=1 VERBOSE=1 \
134
+ ./tests/run_tests.sh
87
135
88
136
- name : Test OSS-CLUSTER TCP TLS
137
+ timeout-minutes : 10
89
138
if : matrix.platform == 'ubuntu-latest'
90
139
run : |
91
- cd tests
92
- TLS_CERT=../redis/tests/tls/redis.crt \
93
- TLS_KEY=../redis/tests/tls/redis.key \
94
- TLS_CACERT=../redis/tests/tls/ca.crt \
95
- MEMTIER_BINARY=../memtier_benchmark \
96
- python3 -m RLTest \
97
- --env oss-cluster --shards-count 3 -v --clear-logs \
98
- --oss-redis-path ../redis/src/redis-server \
99
- --tls-cert-file ../redis/tests/tls/redis.crt \
100
- --tls-key-file ../redis/tests/tls/redis.key \
101
- --tls-ca-cert-file ../redis/tests/tls/ca.crt \
102
- --tls
103
- cd ..
140
+ OSS_STANDALONE=0 OSS_CLUSTER=1 TLS=1 VERBOSE=1 \
141
+ ./tests/run_tests.sh
142
+
143
+ - name : Capture code coverage
144
+ timeout-minutes : 6
145
+ if : matrix.platform == 'ubuntu-latest'
146
+ run : |
147
+ make code-coverage-capture
148
+ bash <(curl -s https://codecov.io/bash) -f memtier_benchmark-*-coverage.info || echo "Codecov did not collect coverage reports"
104
149
105
150
build-macos :
106
151
strategy :
107
152
matrix :
108
- platform : [macos-latest]
153
+ openssl : ["3.0"]
154
+ runs-on : macos-latest
155
+ continue-on-error : true
156
+ steps :
157
+ - uses : actions/checkout@v4
158
+ - name : Install dependencies
159
+ run : brew install autoconf automake libtool libevent openssl@${{ matrix.openssl }}
160
+ - name : Build
161
+ run : autoreconf -ivf && PKG_CONFIG_PATH=`brew --prefix openssl@${{ matrix.openssl }}`/lib/pkgconfig ./configure && make
162
+
163
+ # According to https://github.com/actions/runner-images/blob/macos-14-arm64/20241119.509/images/macos/macos-14-arm64-Readme.md
164
+ # [macOS] OpenSSL 1.1 will be removed and OpenSSL 3 will be the default for all macOS images from November 4, 2024
165
+ # so use macos-13 which does not have the deprecation notice
166
+ # macos-13 details: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
167
+ build-macos-openssl-1-1 :
168
+ strategy :
169
+ matrix :
170
+ platform : [macos-13]
171
+ runs-on : ${{ matrix.platform }}
172
+ steps :
173
+ - uses : actions/checkout@v4
174
+ - name : Install dependencies
175
+ run : brew install autoconf automake libtool libevent openssl@1.1
176
+ - name : Build
177
+ run : autoreconf -ivf && PKG_CONFIG_PATH=`brew --prefix openssl@1.1`/lib/pkgconfig ./configure && make
178
+
179
+
180
+ build-macos-openssl-1-0-2 :
181
+ strategy :
182
+ matrix :
183
+ platform : [macos-13]
109
184
runs-on : ${{ matrix.platform }}
110
185
steps :
111
- - uses : actions/checkout@v1
186
+ - uses : actions/checkout@v4
112
187
- name : Install dependencies
113
- run : brew install autoconf automake libtool libevent pkg-config openssl@1.1
188
+ run : brew install autoconf automake libtool libevent pkg-config
189
+ - name : Install openssl v1.0.2
190
+ run : brew install rbenv/tap/openssl@1.0
114
191
- name : Build
115
- run : autoreconf -ivf && PKG_CONFIG_PATH=/usr/local/opt/ openssl@1.1 /lib/pkgconfig ./configure && make
192
+ run : autoreconf -ivf && PKG_CONFIG_PATH=`brew --prefix openssl@1.0` /lib/pkgconfig ./configure && make
0 commit comments