Skip to content

Commit 2df65ff

Browse files
authored
Merge pull request #120 from traceon/traceon-patch-1
Add TLS workflow for macOS
2 parents b72232f + 0c713e5 commit 2df65ff

File tree

4 files changed

+45
-16
lines changed

4 files changed

+45
-16
lines changed

.github/workflows/linux.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ on:
1313
extra_install:
1414
required: false
1515
type: string
16-
gtest_args:
16+
gtest_filter:
1717
required: false
1818
type: string
19+
default: "*"
1920

2021
env:
2122
BUILD_TYPE: Release
@@ -44,8 +45,7 @@ jobs:
4445
- uses: actions/checkout@v2
4546

4647
- name: Install dependencies
47-
run: |
48-
sudo apt-get install -y ${{ matrix.INSTALL }} ${{ inputs.extra_install }}
48+
run: sudo apt-get install -y cmake ${{ matrix.INSTALL }} ${{ inputs.extra_install }}
4949

5050
- name: Configure CMake
5151
run: |
@@ -56,11 +56,8 @@ jobs:
5656
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON \
5757
${{ inputs.extra_cmake_flags }}
5858
59-
6059
- name: Build
61-
# Build your program with the given configuration
62-
run: |
63-
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target all
60+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target all
6461

6562
- name: Start ClickHouse server
6663
run: |
@@ -76,4 +73,4 @@ jobs:
7673
7774
- name: Test
7875
working-directory: ${{github.workspace}}/build/ut
79-
run: ./clickhouse-cpp-ut "${{ inputs.gtest_args }}"
76+
run: ./clickhouse-cpp-ut --gtest_filter="${{inputs.gtest_filter}}"

.github/workflows/linux_ssl.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99

1010
jobs:
1111
build-and-test:
12-
uses: Enmk/clickhouse-cpp/.github/workflows/linux.yml@master
12+
uses: ClickHouse/clickhouse-cpp/.github/workflows/linux.yml@master
1313
with:
1414
extra_cmake_flags: -DWITH_OPENSSL=ON
1515
extra_install: libssl-dev
16-
# gtest_args: --gtest_filter="-*LocalhostTLS*"
16+
# gtest_filter: "-*LocalhostTLS*"

.github/workflows/macos.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,42 @@ on:
55
branches: [ master ]
66
pull_request:
77
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: "*"
820

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

1524
jobs:
1625
build:
17-
runs-on: macos-11
26+
runs-on: macos-latest
1827

1928
steps:
2029
- uses: actions/checkout@v2
2130

31+
- name: Install dependencies
32+
run: brew install cmake ${{inputs.extra_install}}
33+
2234
- name: Configure CMake
23-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON
35+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON ${{inputs.extra_cmake_flags}}
2436

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

2840
- name: Test
2941
working-directory: ${{github.workspace}}/build/ut
30-
run: ./clickhouse-cpp-ut "${{env.GTEST_FILTER}}"
42+
env:
43+
# It is impossible to start CH server in docker on macOS due to github actions limitations,
44+
# so limit tests to ones that do no require server interaction.
45+
GTEST_FILTER_ONLY_LOCAL: "-Client/*"
46+
run: ./clickhouse-cpp-ut --gtest_filter="${{inputs.gtest_filter}}:${{env.GTEST_FILTER_ONLY_LOCAL}}"

.github/workflows/macos_ssl.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: macOS-ssl
2+
# Almost the same as regular macOS builds, BUT with enabled SSL support, requires OpenSSL installed via Homebrew ([email protected])
3+
4+
on:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
9+
10+
jobs:
11+
build-and-test:
12+
uses: ClickHouse/clickhouse-cpp/.github/workflows/macos.yml@master
13+
with:
14+
extra_cmake_flags: -DWITH_OPENSSL=ON
15+
extra_install: openssl
16+
# gtest_filter: "-*LocalhostTLS*"

0 commit comments

Comments
 (0)