Skip to content

Commit

Permalink
ORC-1835: [C++] Fix cpp-linter-action to build first
Browse files Browse the repository at this point in the history
### 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]>
  • Loading branch information
wgtmac committed Jan 21, 2025
1 parent f96d345 commit 3f6d5de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Run build
run: |
mkdir build && cd build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_JAVA=OFF
cmake --build .
- uses: cpp-linter/[email protected]
id: linter
continue-on-error: true
Expand All @@ -191,8 +196,7 @@ jobs:
lines-changed-only: true
thread-comments: true
ignore: 'build|cmake_modules|conan|dev|docker|examples|java|site'
database: build/compile_commands.json
extra-args: #-Wno-unused-parameter
database: build
- name: Fail fast?!
if: steps.linter.outputs.checks-failed != 0
run: |
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ option(ORC_PACKAGE_KIND

option(ORC_ENABLE_CLANG_TOOLS
"Enable Clang tools"
ON)
OFF)

# Make sure that a build type is selected
if (NOT CMAKE_BUILD_TYPE)
Expand Down

0 comments on commit 3f6d5de

Please sign in to comment.