Repository navigation
221 lines (187 loc) · 5.88 KB
/
Copy pathlinux.yml
File metadata and controls
221 lines (187 loc) · 5.88 KB
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
name: Linux
on:
schedule:
- cron: '0 0 * * 1'
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
release:
types:
- published
- prereleased
env:
BUILD_TYPE: Release
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
compiler: [clang-11, clang-14, clang-18, gcc-9, gcc-12, gcc-14]
ssl: [ssl_ON, ssl_OFF]
dependencies: [dependencies_BUILT_IN]
bignum: [use_abseil, use_custom_bignum]
include:
- compiler: clang-11
os: ubuntu-22.04
COMPILER_INSTALL: clang-11 libc++-11-dev
C_COMPILER: clang-11
CXX_COMPILER: clang++-11
- compiler: clang-14
os: ubuntu-24.04
COMPILER_INSTALL: clang-14 libc++-14-dev
C_COMPILER: clang-14
CXX_COMPILER: clang++-14
- compiler: clang-18
os: ubuntu-24.04
COMPILER_INSTALL: clang-18 libc++-18-dev
C_COMPILER: clang-18
CXX_COMPILER: clang++-18
- compiler: gcc-9
os: ubuntu-22.04
COMPILER_INSTALL: gcc-9 g++-9
C_COMPILER: gcc-9
CXX_COMPILER: g++-9
- compiler: gcc-12
os: ubuntu-24.04
COMPILER_INSTALL: gcc-12 g++-12
C_COMPILER: gcc-12
CXX_COMPILER: g++-12
- compiler: gcc-14
os: ubuntu-24.04
COMPILER_INSTALL: gcc-14 g++-14
C_COMPILER: gcc-14
CXX_COMPILER: g++-14
- ssl: ssl_ON
SSL_CMAKE_OPTION: -D WITH_OPENSSL=ON
- bignum: use_abseil
BIGNUM_CMAKE_OPTION: -D CH_USE_ABSEIL_FOR_BIGNUM=ON
- bignum: use_custom_bignum
BIGNUM_CMAKE_OPTION: -D CH_USE_ABSEIL_FOR_BIGNUM=OFF
- dependencies: dependencies_SYSTEM
compiler: compiler_SYSTEM
os: ubuntu-24.04
COMPILER_INSTALL: gcc g++
C_COMPILER: gcc
CXX_COMPILER: g++
DEPENDENCIES_INSTALL: libabsl-dev liblz4-dev
DEPENDENCIES_CMAKE_OPTIONS: >-
-D WITH_SYSTEM_LZ4=ON
-D WITH_SYSTEM_ABSEIL=ON
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 100
fetch-tags: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
${{matrix.COMPILER_INSTALL}} \
${{matrix.DEPENDENCIES_INSTALL}}
- name: Configure project
run: |
cmake \
-D CMAKE_C_COMPILER=${{matrix.C_COMPILER}} \
-D CMAKE_CXX_COMPILER=${{matrix.CXX_COMPILER}} \
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-D CH_MAP_BOOL_TO_UINT8=OFF \
-D BUILD_TESTS=ON \
${{matrix.BIGNUM_CMAKE_OPTION}} \
${{matrix.SSL_CMAKE_OPTION}} \
${{matrix.DEPENDENCIES_CMAKE_OPTIONS}} \
-S ${{github.workspace}} \
-B ${{github.workspace}}/build
- name: Build project
run: |
cmake \
--build ${{github.workspace}}/build \
--config ${{env.BUILD_TYPE}} \
--target all
- name: Start ClickHouse in Docker
uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: ci/docker-compose.yml
down-flags: --volumes
- name: Check if ClickHouse is available
run: |
for i in {1..60}; do
if curl -fsS http://localhost:8123/ > /dev/null; then
echo "ClickHouse is ready"
exit 0
fi
sleep 1
done
echo "ClickHouse failed to start"
exit 1
- name: Test
working-directory: ${{github.workspace}}/build/ut
run: ./clickhouse-cpp-ut
# Runs the same test suite against the supported ClickHouse server versions.
# The compiler axis is pinned to one canonical configuration here, so that
# the server-version axis does not multiply the build matrix above.
server-versions:
name: clickhouse-server ${{matrix.clickhouse-version}}
strategy:
fail-fast: false
matrix:
clickhouse-version:
- '26.3' # LTS
- '26.8' # LTS
- '26.9' # Stable
- '26.10' # Stable, latest stable
- 'head' # nightly build of ClickHouse master
runs-on: ubuntu-24.04
env:
CLICKHOUSE_VERSION: '${{matrix.clickhouse-version}}-alpine'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 100
fetch-tags: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
clang-18 libc++-18-dev
- name: Configure project
run: |
cmake \
-D CMAKE_C_COMPILER=clang-18 \
-D CMAKE_CXX_COMPILER=clang++-18 \
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-D CH_MAP_BOOL_TO_UINT8=OFF \
-D BUILD_TESTS=ON \
-D WITH_OPENSSL=ON \
-S ${{github.workspace}} \
-B ${{github.workspace}}/build
- name: Build project
run: |
cmake \
--build ${{github.workspace}}/build \
--config ${{env.BUILD_TYPE}} \
--target all
- name: Start ClickHouse in Docker
uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: ci/docker-compose.yml
down-flags: --volumes
- name: Check if ClickHouse is available
run: |
for i in {1..60}; do
if curl -fsS http://localhost:8123/ > /dev/null; then
echo "ClickHouse is ready"
exit 0
fi
sleep 1
done
echo "ClickHouse failed to start"
exit 1
- name: Test
working-directory: ${{github.workspace}}/build/ut
run: ./clickhouse-cpp-ut