-
Notifications
You must be signed in to change notification settings - Fork 159
118 lines (100 loc) · 3.8 KB
/
linux.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
name: Linux
on:
schedule:
- cron: '0 0 * * 1'
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
BUILD_TYPE: Release
CLICKHOUSE_SERVER_IMAGE: "clickhouse/clickhouse-server:22.3"
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
compiler: [clang-6, clang-10-libc++, gcc-7, gcc-8, gcc-9]
ssl: [ssl_ON, ssl_OFF]
dependencies: [dependencies_BUILT_IN]
include:
- compiler: clang-6
COMPILER_INSTALL: clang-6.0 libc++-dev
C_COMPILER: clang-6.0
CXX_COMPILER: clang++-6.0
- compiler: clang-10-libc++
COMPILER_INSTALL: clang-10 libc++-dev
C_COMPILER: clang-10
CXX_COMPILER: clang++-10
- compiler: gcc-7
COMPILER_INSTALL: gcc-7 g++-7
C_COMPILER: gcc-7
CXX_COMPILER: g++-7
- compiler: gcc-8
COMPILER_INSTALL: gcc-8 g++-8
C_COMPILER: gcc-8
CXX_COMPILER: g++-8
- compiler: gcc-9
COMPILER_INSTALL: gcc-9 g++-9
C_COMPILER: gcc-9
CXX_COMPILER: g++-9
- ssl: ssl_ON
SSL_CMAKE_OPTION: -D WITH_OPENSSL=ON
- dependencies: dependencies_SYSTEM
compiler: compiler_SYSTEM
os: ubuntu-22.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@v2
- name: Install dependencies
run: |
sudo apt-get update && \
sudo apt-get install -y \
docker \
cmake \
${{matrix.COMPILER_INSTALL}} \
${{matrix.DEPENDENCIES_INSTALL}}
- name: Install dependencies - Docker
run: |
sudo apt remove -y docker docker-engine docker.io containerd runc
sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update -q
sudo apt install docker-ce docker-ce-cli containerd.io
- 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 BUILD_TESTS=ON \
${{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: Test - Start ClickHouse server in background
run: |
docker pull ${CLICKHOUSE_SERVER_IMAGE}
docker run -d --name clickhouse -p 9000:9000 ${CLICKHOUSE_SERVER_IMAGE}
docker ps -a
docker stats -a --no-stream
## Check and wait until CH is ready to accept connections
docker exec clickhouse bash -c 'for i in {1..10}; do echo checking if clickhouse server is started attempt \#$i; if ( grep -q "<Information> Application: Ready for connections." /var/log/clickhouse-server/clickhouse-server.log ); then echo seems like clickhouse server is started; exit 0; fi; sleep 1; done; exit -1'
- name: Test
working-directory: ${{github.workspace}}/build/ut
run: ./clickhouse-cpp-ut