Skip to content

Commit 3f6d5de

Browse files
committed
ORC-1835: [C++] Fix cpp-linter-action to build first
### What changes were proposed in this pull request? Insert a build step before cpp-linter-action to do its job. This is the backport of #2113 ### Why are the changes needed? We need to build C++ code to export command json file. ### How was this patch tested? Pass CI. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #2120 from wgtmac/backport_linter. Authored-by: Gang Wu <[email protected]> Signed-off-by: Gang Wu <[email protected]>
1 parent f96d345 commit 3f6d5de

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/build_and_test.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@ jobs:
179179
runs-on: ubuntu-24.04
180180
steps:
181181
- uses: actions/checkout@v4
182+
- name: Run build
183+
run: |
184+
mkdir build && cd build
185+
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_JAVA=OFF
186+
cmake --build .
182187
- uses: cpp-linter/[email protected]
183188
id: linter
184189
continue-on-error: true
@@ -191,8 +196,7 @@ jobs:
191196
lines-changed-only: true
192197
thread-comments: true
193198
ignore: 'build|cmake_modules|conan|dev|docker|examples|java|site'
194-
database: build/compile_commands.json
195-
extra-args: #-Wno-unused-parameter
199+
database: build
196200
- name: Fail fast?!
197201
if: steps.linter.outputs.checks-failed != 0
198202
run: |

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ option(ORC_PACKAGE_KIND
8787

8888
option(ORC_ENABLE_CLANG_TOOLS
8989
"Enable Clang tools"
90-
ON)
90+
OFF)
9191

9292
# Make sure that a build type is selected
9393
if (NOT CMAKE_BUILD_TYPE)

0 commit comments

Comments
 (0)