|
5 | 5 | branches: [ master ] |
6 | 6 | pull_request: |
7 | 7 | branches: [ master ] |
8 | | - workflow_call: |
9 | | - inputs: |
10 | | - extra_cmake_flags: |
11 | | - required: false |
12 | | - type: string |
13 | | - extra_install: |
14 | | - required: false |
15 | | - type: string |
16 | | - gtest_filter: |
17 | | - required: false |
18 | | - type: string |
19 | | - default: "*" |
20 | 8 |
|
21 | 9 | env: |
22 | 10 | BUILD_TYPE: Release |
| 11 | + CLICKHOUSE_USER: clickhouse_cpp_cicd |
| 12 | + CLICKHOUSE_PASSWORD: clickhouse_cpp_cicd |
23 | 13 |
|
24 | 14 | jobs: |
25 | 15 | build: |
26 | 16 | runs-on: macos-latest |
27 | 17 |
|
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + build: [nossl, ssl] |
| 22 | + include: |
| 23 | + - build: nossl |
| 24 | + extra_cmake_flags: -DWITH_OPENSSL=OFF |
| 25 | + extra_install: |
| 26 | + |
| 27 | + - build: ssl |
| 28 | + extra_cmake_flags: -DWITH_OPENSSL=ON -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ |
| 29 | + extra_install: openssl |
| 30 | + |
28 | 31 | steps: |
29 | 32 | - uses: actions/checkout@v2 |
30 | 33 |
|
31 | 34 | - name: Install dependencies |
32 | | - run: brew install cmake ${{inputs.extra_install}} |
| 35 | + run: brew install cmake ${{matrix.extra_install}} |
33 | 36 |
|
34 | 37 | - name: Configure CMake |
35 | | - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON ${{inputs.extra_cmake_flags}} |
| 38 | + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON ${{matrix.extra_cmake_flags}} |
36 | 39 |
|
37 | 40 | - name: Build |
38 | 41 | run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target all |
39 | 42 |
|
| 43 | + - name: Start tls offoader proxy |
| 44 | + # that mimics non-secure clickhouse running on localhost |
| 45 | + # by tunneling queries to remote tls server |
| 46 | + # (needed because we can't start real clickhouse instance on macOS) |
| 47 | + run: | |
| 48 | + wget https://github.com/filimonov/go-tlsoffloader/releases/download/v0.1.2/go-tlsoffloader_0.1.2_Darwin_x86_64.tar.gz |
| 49 | + tar -xvzf go-tlsoffloader_0.1.2_Darwin_x86_64.tar.gz |
| 50 | + ./go-tlsoffloader -l localhost:9000 -b github.demo.trial.altinity.cloud:9440 & |
| 51 | +
|
40 | 52 | - name: Test |
41 | 53 | working-directory: ${{github.workspace}}/build/ut |
42 | 54 | env: |
43 | 55 | # It is impossible to start CH server in docker on macOS due to github actions limitations, |
44 | 56 | # so limit tests to ones that do no require server interaction. |
45 | 57 | GTEST_FILTER_ONLY_LOCAL: "-Client/*" |
46 | | - run: ./clickhouse-cpp-ut --gtest_filter="${{inputs.gtest_filter}}:${{env.GTEST_FILTER_ONLY_LOCAL}}" |
| 58 | + run: ./clickhouse-cpp-ut |
0 commit comments