Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Linux

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CH_SERVER_VERSION: 21.3.17.2

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
strategy:
matrix:
build: [gcc-7, clang-6]
include:
- build: gcc-7
os: ubuntu-latest
INSTALL: gcc-7 g++-7
C_COMPILER: gcc-7
CXX_COMPILER: g++-7

- build: clang-6
os: ubuntu-latest
INSTALL: clang-6.0
C_COMPILER: clang-6.0
CXX_COMPILER: clang++-6.0

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get install -y ${{ matrix.INSTALL }}

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
cmake \
-D CMAKE_C_COMPILER=${{ matrix.C_COMPILER}} \
-D CMAKE_CXX_COMPILER=${{ matrix.CXX_COMPILER}} \
-B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON


- name: Build
# Build your program with the given configuration
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target all

- name: Start ClickHouse server
run: |
sudo apt-get install apt-transport-https ca-certificates dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E0C56BD4
echo "deb https://repo.clickhouse.com/deb/stable/ main/" | sudo tee /etc/apt/sources.list.d/clickhouse.list
sudo apt-get update
sudo apt-get install -y \
clickhouse-server=${{env.CH_SERVER_VERSION}} \
clickhouse-client=${{env.CH_SERVER_VERSION}} \
clickhouse-common-static=${{env.CH_SERVER_VERSION}}
sudo service clickhouse-server start

- name: Test
working-directory: ${{github.workspace}}/build/ut
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
#run: ctest -C ${{env.BUILD_TYPE}}
run: ./clickhouse-cpp-ut "${{env.GTEST_FILTER}}"

30 changes: 30 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: macOS

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
BUILD_TYPE: Release
# It is impossible to start CH server in docker on macos due to github actions limitations,
# so limit tests to ones that do no require server interaction.
GTEST_FILTER: --gtest_filter=-"Client/*:*Performance*"

jobs:
build:
runs-on: macos-11

steps:
- uses: actions/checkout@v2

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target all

- name: Test
working-directory: ${{github.workspace}}/build/ut
run: ./clickhouse-cpp-ut "${{env.GTEST_FILTER}}"
24 changes: 14 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,23 @@ matrix:

before_install: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export CH_SERVER_VERSION="21.3.17.2"
sudo apt-get install apt-transport-https ca-certificates dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E0C56BD4
echo "deb https://repo.clickhouse.tech/deb/stable/ main/" | sudo tee \
/etc/apt/sources.list.d/clickhouse.list
sudo apt-get update -q && sudo apt-get install -q -y --allow-unauthenticated clickhouse-server
echo "deb https://repo.clickhouse.com/deb/stable/ main/" | sudo tee /etc/apt/sources.list.d/clickhouse.list
sudo apt-get update
sudo apt-get install -y \
clickhouse-server=${CH_SERVER_VERSION} \
clickhouse-client=${CH_SERVER_VERSION} \
clickhouse-common-static=${CH_SERVER_VERSION}
sudo service clickhouse-server start
fi

# Build steps
script:
- eval "${MATRIX_EVAL}"
- mkdir build
- cd build
- cmake .. -DBUILD_TESTS=ON && make
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./ut/clickhouse-cpp-ut ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./ut/clickhouse-cpp-ut --gtest_filter=-"Client/*:*Performance*" ; fi
script: |
eval "${MATRIX_EVAL}"
mkdir build
cd build
cmake .. -DBUILD_TESTS=ON && make
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./ut/clickhouse-cpp-ut ; fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./ut/clickhouse-cpp-ut --gtest_filter=-"Client/*:*Performance*" ; fi
1 change: 1 addition & 0 deletions clickhouse/columns/column.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "../columns/itemview.h"

#include <memory>
#include <stdexcept>

namespace clickhouse {

Expand Down