Skip to content

Commit 69f45a1

Browse files
committed
Speed up CI
1 parent 325d05c commit 69f45a1

File tree

2 files changed

+35
-23
lines changed

2 files changed

+35
-23
lines changed

.clang-tidy

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,5 @@ Checks: >
2828
performance-*,
2929
-performance-inefficient-string-concatenation
3030
WarningsAsErrors: '*'
31-
HeaderFileExtensions:
32-
- ''
33-
- h
34-
ImplementationFileExtensions:
35-
- cc
3631
HeaderFilterRegex: '^(?!.*PulsarApi\.pb\.h$).*$'
3732
FormatStyle: none
38-
SystemHeaders: false

.github/workflows/ci-pr-validation.yaml

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,33 @@ jobs:
7777
cmake -S wireshark -B build-wireshark
7878
cmake --build build-wireshark
7979
80+
lint:
81+
name: Lint
82+
needs: formatting-check
83+
runs-on: ubuntu-22.04
84+
timeout-minutes: 120
85+
86+
steps:
87+
- name: checkout
88+
uses: actions/checkout@v3
89+
with:
90+
fetch-depth: 0
91+
submodules: recursive
92+
93+
- name: Build the project
94+
run: |
95+
cmake -B build -DINTEGRATE_VCPKG=ON -DVCPKG_TRIPLET=x64-linux-release -DBUILD_TESTS=ON
96+
cmake --build build -j8
97+
98+
- name: Tidy check
99+
run: |
100+
sudo apt-get install -y clang-tidy
101+
./build-support/run_clang_tidy.sh
102+
if [[ $? -ne 0 ]]; then
103+
echo "clang-tidy failed"
104+
exit 1
105+
fi
106+
80107
unit-tests:
81108
name: Run unit tests
82109
needs: formatting-check
@@ -92,7 +119,7 @@ jobs:
92119

93120
- name: Build core libraries
94121
run: |
95-
cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=OFF
122+
cmake -B build -DINTEGRATE_VCPKG=ON -DVCPKG_TRIPLET=x64-linux-release -DBUILD_TESTS=OFF
96123
cmake --build build -j8
97124
98125
- name: Check formatting
@@ -105,38 +132,29 @@ jobs:
105132
106133
- name: Build tests
107134
run: |
108-
cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
135+
cmake -B build -DINTEGRATE_VCPKG=ON -DVCPKG_TRIPLET=x64-linux-release -DBUILD_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
109136
cmake --build build -j8
110137
111138
- name: Install gtest-parallel
112139
run: |
113140
sudo curl -o /gtest-parallel https://raw.githubusercontent.com/google/gtest-parallel/master/gtest_parallel.py
114141
115-
- name: Tidy check
116-
run: |
117-
sudo apt-get install -y clang-tidy
118-
./build-support/run_clang_tidy.sh
119-
if [[ $? -ne 0 ]]; then
120-
echo "clang-tidy failed"
121-
exit 1
122-
fi
123-
124142
- name: Run unit tests
125143
run: RETRY_FAILED=3 CMAKE_BUILD_DIRECTORY=./build ./run-unit-tests.sh
126144

127145
- name: Build perf tools
128146
run: |
129-
cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON -DBUILD_PERF_TOOLS=ON
147+
cmake -B build -DINTEGRATE_VCPKG=ON -DVCPKG_TRIPLET=x64-linux-release -DBUILD_TESTS=ON -DBUILD_PERF_TOOLS=ON
130148
cmake --build build -j8
131149
132150
- name: Verify custom vcpkg installation
133151
run: |
134152
mv vcpkg /tmp/
135-
cmake -B build-2 -DINTEGRATE_VCPKG=ON -DCMAKE_TOOLCHAIN_FILE="/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake"
153+
cmake -B build-2 -DINTEGRATE_VCPKG=ON -DVCPKG_TRIPLET=x64-linux-release -DCMAKE_TOOLCHAIN_FILE="/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake"
136154
137155
cpp20-build:
138156
name: Build with the C++20 standard
139-
needs: formatting-check
157+
needs: lint
140158
runs-on: ubuntu-22.04
141159
timeout-minutes: 60
142160

@@ -279,7 +297,7 @@ jobs:
279297
package:
280298
name: Build ${{matrix.pkg.name}} ${{matrix.cpu.platform}}
281299
runs-on: ubuntu-22.04
282-
needs: unit-tests
300+
needs: [lint, unit-tests]
283301
timeout-minutes: 500
284302

285303
strategy:
@@ -323,7 +341,7 @@ jobs:
323341
timeout-minutes: 120
324342
name: Build CPP Client on macOS with static dependencies
325343
runs-on: macos-14
326-
needs: formatting-check
344+
needs: lint
327345
steps:
328346
- name: checkout
329347
uses: actions/checkout@v3
@@ -338,7 +356,7 @@ jobs:
338356
check-completion:
339357
name: Check Completion
340358
runs-on: ubuntu-latest
341-
needs: [formatting-check, wireshark-dissector-build, unit-tests, cpp20-build, cpp-build-windows, package, cpp-build-macos]
359+
needs: [formatting-check, wireshark-dissector-build, lint, unit-tests, cpp20-build, cpp-build-windows, package, cpp-build-macos]
342360

343361
steps:
344362
- run: true

0 commit comments

Comments
 (0)