Skip to content

Commit cc938b5

Browse files
authored
Merge pull request #1 from Enmk/Enmk-patch-travis
Updated CH server installation instructions and set fixed version
2 parents 36fa6ba + 642fd7b commit cc938b5

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

.travis.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,25 @@ matrix:
3838
osx_image: xcode9.4
3939
compiler: clang
4040

41-
before_install:
42-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo 'deb http://repo.yandex.ru/clickhouse/deb/stable main/' | sudo tee /etc/apt/sources.list.d/clickhouse.list ; fi
43-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4 ; fi
44-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -q && sudo apt-get install -q -y --allow-unauthenticated clickhouse-server-common ; fi
45-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo service clickhouse-server start ; fi
41+
before_install: |
42+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
43+
export CH_SERVER_VERSION="21.3.17.2"
44+
sudo apt-get install apt-transport-https ca-certificates dirmngr
45+
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E0C56BD4
46+
echo "deb https://repo.clickhouse.com/deb/stable/ main/" | sudo tee /etc/apt/sources.list.d/clickhouse.list
47+
sudo apt-get update
48+
sudo apt-get install -y \
49+
clickhouse-server=${CH_SERVER_VERSION} \
50+
clickhouse-client=${CH_SERVER_VERSION} \
51+
clickhouse-common-static=${CH_SERVER_VERSION}
52+
sudo service clickhouse-server start
53+
fi
4654
4755
# Build steps
48-
script:
49-
- eval "${MATRIX_EVAL}"
50-
- mkdir build
51-
- cd build
52-
- cmake .. -DBUILD_TESTS=ON && make
53-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./ut/clickhouse-cpp-ut ; fi
54-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./ut/clickhouse-cpp-ut --gtest_filter=-"Client/*:*Performance*" ; fi
56+
script: |
57+
eval "${MATRIX_EVAL}"
58+
mkdir build
59+
cd build
60+
cmake .. -DBUILD_TESTS=ON && make
61+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./ut/clickhouse-cpp-ut ; fi
62+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./ut/clickhouse-cpp-ut --gtest_filter=-"Client/*:*Performance*" ; fi

0 commit comments

Comments
 (0)