-
Notifications
You must be signed in to change notification settings - Fork 217
166 lines (144 loc) · 5.36 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: CI
on: [push, pull_request]
jobs:
smoketest-build-distros:
runs-on: ubuntu-latest
env:
ARCH: amd64
# required by ubuntu:bionic
# https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
strategy:
matrix:
image: ${{ fromJSON(vars.SMOKE_TEST_IMAGES) }}
container: ${{ matrix.image }}
name: Build ${{ matrix.image }}
steps:
- uses: ${{ matrix.image == 'ubuntu:18.04' && 'actions/checkout@v3' || 'actions/checkout@v4' }}
- name: Install dependencies
run: |
apt-get -qq update -y
apt-get install lcov autoconf automake pkg-config libevent-dev libpcre3-dev libssl-dev -y
- name: Build
run: autoreconf -ivf && ./configure && make -j
build-notls:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get install lcov autoconf automake pkg-config libevent-dev libpcre3-dev
- name: Build
run: autoreconf -ivf && ./configure --disable-tls && make -j
build-ubuntu:
strategy:
matrix:
platform: [ubuntu-latest, ubuntu-20.04]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get install lcov autoconf automake pkg-config libevent-dev libpcre3-dev libssl-dev
- name: Build
run: autoreconf -ivf && ./configure --enable-code-coverage && make -j
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
architecture: x64
- name: Install Python dependencies
run: pip install -r ./tests/test_requirements.txt
- name: Install Redis
run: |
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
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
sudo apt-get -qq update
sudo apt-get install redis
sudo service redis-server stop
- name: Increase connection limit
run: |
sudo sysctl -w net.ipv4.tcp_fin_timeout=10
sudo sysctl -w net.ipv4.tcp_tw_reuse=1
ulimit -n 40960
- name: Generate TLS test certificates
if: matrix.platform == 'ubuntu-latest'
run: |
./tests/gen-test-certs.sh
- name: Test OSS TCP
timeout-minutes: 10
run: |
./tests/run_tests.sh
- name: Test OSS TCP TLS
if: matrix.platform == 'ubuntu-latest'
timeout-minutes: 10
run: |
TLS=1 ./tests/run_tests.sh
- name: Test OSS TCP TLS v1.2
if: matrix.platform == 'ubuntu-latest'
timeout-minutes: 10
run: |
TLS_PROTOCOLS='TLSv1.2' VERBOSE=1 TLS=1 ./tests/run_tests.sh
- name: Test OSS TCP TLS v1.3
if: matrix.platform == 'ubuntu-latest'
timeout-minutes: 10
run: |
TLS_PROTOCOLS='TLSv1.3' VERBOSE=1 TLS=1 ./tests/run_tests.sh
- name: Test OSS-CLUSTER TCP
timeout-minutes: 10
run: |
OSS_STANDALONE=0 OSS_CLUSTER=1 VERBOSE=1 \
./tests/run_tests.sh
- name: Test OSS-CLUSTER TCP TLS
timeout-minutes: 10
if: matrix.platform == 'ubuntu-latest'
run: |
OSS_STANDALONE=0 OSS_CLUSTER=1 TLS=1 VERBOSE=1 \
./tests/run_tests.sh
- name: Capture code coverage
timeout-minutes: 6
if: matrix.platform == 'ubuntu-latest'
run: |
make code-coverage-capture
bash <(curl -s https://codecov.io/bash) -f memtier_benchmark-*-coverage.info || echo "Codecov did not collect coverage reports"
build-macos:
strategy:
matrix:
openssl: ["3.0"]
runs-on: macos-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install autoconf automake libtool libevent openssl@${{ matrix.openssl }}
- name: Build
run: autoreconf -ivf && PKG_CONFIG_PATH=`brew --prefix openssl@${{ matrix.openssl }}`/lib/pkgconfig ./configure && make
# According to https://github.com/actions/runner-images/blob/macos-14-arm64/20241119.509/images/macos/macos-14-arm64-Readme.md
# [macOS] OpenSSL 1.1 will be removed and OpenSSL 3 will be the default for all macOS images from November 4, 2024
# so use macos-12 which does not have the deprecation notice
build-macos-openssl-1-1:
strategy:
matrix:
platform: [macos-12]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install autoconf automake libtool libevent [email protected]
- name: Build
run: autoreconf -ivf && PKG_CONFIG_PATH=`brew --prefix [email protected]`/lib/pkgconfig ./configure && make
build-macos-openssl-1-0-2:
strategy:
matrix:
platform: [macos-12]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install autoconf automake libtool libevent pkg-config
- name: Install openssl v1.0.2
run: brew install rbenv/tap/[email protected]
- name: Build
run: autoreconf -ivf && PKG_CONFIG_PATH=`brew --prefix [email protected]`/lib/pkgconfig ./configure && make