-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rely on conan to build the project on various OSes
Signed-off-by: David Keller <[email protected]>
- Loading branch information
1 parent
bceea9b
commit d34cd97
Showing
8 changed files
with
222 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,67 +9,101 @@ on: | |
env: | ||
BUILD_TYPE: Release | ||
CH_SERVER_VERSION: 21.3.17.2 | ||
CONAN_USER_HOME: "${{ github.workspace }}/conan/" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
compiler: [clang-6, gcc-7, gcc-8, gcc-9] | ||
compiler: [clang-6, clang-10-libc++, gcc-7, gcc-8, gcc-9] | ||
ssl: [ssl_ON, ssl_OFF] | ||
dependencies: [dependencies_SYSTEM, dependencies_BUILT_IN] | ||
include: | ||
- compiler: clang-6 | ||
INSTALL: clang-6.0 | ||
C_COMPILER: clang-6.0 | ||
CXX_COMPILER: clang++-6.0 | ||
COMPILER_CONAN_SETTING: >- | ||
-s compiler=clang | ||
-s compiler.version=6.0 | ||
-s compiler.libcxx=libstdc++11 | ||
-e CC=clang-6.0 -e CXX=clang++-6.0 | ||
- compiler: clang-10-libc++ | ||
INSTALL: clang-10 libc++-dev | ||
COMPILER_CONAN_SETTING: >- | ||
-s compiler=clang | ||
-s compiler.version=10 | ||
-s compiler.libcxx=libc++ | ||
-e CC=clang-10 -e CXX=clang++-10 | ||
- compiler: gcc-7 | ||
INSTALL: gcc-7 g++-7 | ||
C_COMPILER: gcc-7 | ||
CXX_COMPILER: g++-7 | ||
COMPILER_CONAN_SETTING: >- | ||
-s compiler=gcc | ||
-s compiler.version=7 | ||
-s compiler.libcxx=libstdc++11 | ||
- compiler: gcc-8 | ||
INSTALL: gcc-8 g++-8 | ||
C_COMPILER: gcc-8 | ||
CXX_COMPILER: g++-8 | ||
COMPILER_CONAN_SETTING: >- | ||
-s compiler=gcc | ||
-s compiler.version=8 | ||
-s compiler.libcxx=libstdc++11 | ||
- compiler: gcc-9 | ||
INSTALL: gcc-9 g++-9 | ||
C_COMPILER: gcc-9 | ||
CXX_COMPILER: g++-9 | ||
COMPILER_CONAN_SETTING: >- | ||
-s compiler=gcc | ||
-s compiler.version=9 | ||
-s compiler.libcxx=libstdc++11 | ||
- ssl: ssl_ON | ||
INSTALL_SSL: libssl-dev | ||
OPENSSL_CMAKE_OPTION: -DWITH_OPENSSL=ON | ||
SSL_CONAN_OPTION: -o with_openssl=True | ||
|
||
- ssl: ssl_OFF | ||
OPENSSL_CMAKE_OPTION: -DWITH_OPENSSL=OFF | ||
SSL_CONAN_OPTION: -o with_openssl=False | ||
|
||
- dependencies: dependencies_SYSTEM | ||
DEPENDENCIES_CMAKE_OPTIONS: -DWITH_SYSTEM_ABSEIL=ON -DWITH_SYSTEM_LZ4=ON -DWITH_SYSTEM_CITYHASH=ON | ||
INSTALL_DEPENDENCIES: libabsl-dev liblz4-dev libcityhash-dev | ||
DEPENDENCIES_CONAN_OPTIONS: >- | ||
-o with_system_lz4=True | ||
-o with_system_cityhash=True | ||
-o with_system_abseil=True | ||
- dependencies: dependencies_BUILT_IN | ||
DEPENDENCIES_CMAKE_OPTIONS: -DWITH_SYSTEM_ABSEIL=OFF -DWITH_SYSTEM_LZ4=OFF -DWITH_SYSTEM_CITYHASH=OFF | ||
DEPENDENCIES_CONAN_OPTIONS: >- | ||
-o with_system_lz4=False | ||
-o with_system_cityhash=False | ||
-o with_system_abseil=False | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: turtlebrowser/get-conan@main | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
key: ${{runner.os}}-${{matrix.ssl}}-${{matrix.dependencies}}-${{hashFiles('conanfile.py')}} | ||
path: ${{env.CONAN_USER_HOME}} | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get install -y cmake ${{ matrix.INSTALL }} ${{ matrix.INSTALL_SSL }} ${{ matrix.INSTALL_DEPENDENCIES }} | ||
run: | | ||
sudo apt-get install -y cmake ${{matrix.INSTALL}} | ||
- name: Configure CMake | ||
- name: Configure & Build project | ||
run: | | ||
cmake \ | ||
-DCMAKE_C_COMPILER=${{ matrix.C_COMPILER}} \ | ||
-DCMAKE_CXX_COMPILER=${{ matrix.CXX_COMPILER}} \ | ||
-B ${{github.workspace}}/build \ | ||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON \ | ||
${{ matrix.OPENSSL_CMAKE_OPTION}} \ | ||
${{ matrix.DEPENDENCIES_CMAKE_OPTIONS }} | ||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target all | ||
mkdir -p ${{github.workspace}}/build && cd ${{github.workspace}}/build | ||
conan install \ | ||
-o build_tests=True \ | ||
${{matrix.SSL_CONAN_OPTION}} \ | ||
${{matrix.DEPENDENCIES_CONAN_OPTIONS}} \ | ||
-s build_type=${{env.BUILD_TYPE}} \ | ||
${{matrix.COMPILER_CONAN_SETTING}} \ | ||
-b missing \ | ||
${{github.workspace}} | ||
conan build ${{github.workspace}} | ||
- name: Start ClickHouse server | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,48 +10,65 @@ env: | |
BUILD_TYPE: Release | ||
CLICKHOUSE_USER: clickhouse_cpp_cicd | ||
CLICKHOUSE_PASSWORD: clickhouse_cpp_cicd | ||
|
||
CONAN_USER_HOME: "${{ github.workspace }}/conan/" | ||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build: [nossl, ssl] | ||
ssl: [ssl_ON, ssl_OFF] | ||
dependencies: [dependencies_SYSTEM, dependencies_BUILT_IN] | ||
include: | ||
- build: nossl | ||
openssl_cmake_option: -DWITH_OPENSSL=OFF | ||
- ssl: ssl_ON | ||
# Install brew openssl to gain access to system certificates, but link with the | ||
# conan version | ||
SSL_BREW_INSTALL: openssl | ||
SSL_CONAN_OPTION: -o with_openssl=True -o openssl:openssldir=/usr/local/etc/openssl@3 | ||
|
||
- build: ssl | ||
openssl_cmake_option: -DWITH_OPENSSL=ON -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ | ||
openssl_install: openssl | ||
- ssl: ssl_OFF | ||
SSL_CONAN_OPTION: -o with_openssl=False | ||
|
||
- dependencies: dependencies_SYSTEM | ||
dependencies_cmake_options: -DWITH_SYSTEM_ABSEIL=ON -DWITH_SYSTEM_LZ4=ON -DWITH_SYSTEM_CITYHASH=ON | ||
dependencies_install: abseil lz4 cityhash | ||
DEPENDENCIES_CONAN_OPTIONS: >- | ||
-o with_system_lz4=True | ||
-o with_system_cityhash=True | ||
-o with_system_abseil=True | ||
- dependencies: dependencies_BUILT_IN | ||
dependencies_cmake_options: -DWITH_SYSTEM_ABSEIL=OFF -DWITH_SYSTEM_LZ4=OFF -DWITH_SYSTEM_CITYHASH=OFF | ||
|
||
DEPENDENCIES_CONAN_OPTIONS: >- | ||
-o with_system_lz4=False | ||
-o with_system_cityhash=False | ||
-o with_system_abseil=False | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: turtlebrowser/get-conan@main | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
key: ${{runner.os}}-${{matrix.ssl}}-${{matrix.dependencies}}-${{hashFiles('conanfile.py')}} | ||
path: ${{env.CONAN_USER_HOME}} | ||
|
||
- name: Install dependencies | ||
run: brew install cmake ${{matrix.openssl_install}} ${{matrix.dependencies_install}} | ||
run: | | ||
brew install cmake ${{matrix.SSL_BREW_INSTALL}} | ||
- name: Configure & Build project | ||
run: | | ||
mkdir -p ${{github.workspace}}/build && cd ${{github.workspace}}/build | ||
- name: Configure CMake | ||
run: cmake \ | ||
-B ${{github.workspace}}/build \ | ||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ | ||
-DBUILD_TESTS=ON \ | ||
${{matrix.openssl_cmake_option}} \ | ||
${{matrix.dependencies_cmake_options}} | ||
conan install \ | ||
-o build_tests=True \ | ||
${{matrix.SSL_CONAN_OPTION}} \ | ||
${{matrix.DEPENDENCIES_CONAN_OPTIONS}} \ | ||
-s build_type=${{env.BUILD_TYPE}} \ | ||
-b missing \ | ||
${{github.workspace}} | ||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target all | ||
conan build ${{github.workspace}} | ||
- name: Start tls offoader proxy | ||
# that mimics non-secure clickhouse running on localhost | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,9 @@ on: | |
branches: [ master ] | ||
|
||
env: | ||
CONAN_USE_ALWAYS_SHORT_PATHS: True | ||
CONAN_USER_HOME_SHORT: "${{ github.workspace }}/conan" | ||
|
||
BUILD_TYPE: Release | ||
GTEST_FILTER: --gtest_filter=-"*" | ||
CLICKHOUSE_USER: clickhouse_cpp_cicd | ||
|
@@ -38,11 +41,20 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- name: Configure CMake | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON | ||
- uses: turtlebrowser/get-conan@main | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
key: ${{runner.os}}-${{hashFiles('conanfile.py')}} | ||
path: ${{env.CONAN_USER_HOME_SHORT}} | ||
|
||
- name: Configure & Build project | ||
run: | | ||
mkdir -p ${{github.workspace}}/build && cd ${{github.workspace}}/build | ||
conan install -o build_tests=True -s build_type=${{env.BUILD_TYPE}} -b missing ${{github.workspace}} | ||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
conan build ${{github.workspace}} | ||
- name: Start tls offoader proxy | ||
shell: bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.