Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
65ba87f
Initial impl.
davidlion Feb 19, 2025
fde7739
Merge remote-tracking branch 'upstream/main' into ci-clang-tidy
davidlion Feb 20, 2025
08303af
Merge remote-tracking branch 'upstream/main' into ci-clang-tidy
davidlion Feb 26, 2025
a0f78d8
Add clang tidy tasks to cpp-static-check.
davidlion Feb 26, 2025
ef584f2
Merge remote-tracking branch 'upstream/main' into ci-clang-tidy
davidlion Feb 27, 2025
fe16bf7
Update clang tasks.
davidlion Feb 27, 2025
2403209
Fix ci dep and drop fix alias.
davidlion Feb 27, 2025
475930a
Update for ci.
davidlion Mar 4, 2025
69929a1
Merge branch 'main' into ci-clang-tidy
davidlion Mar 6, 2025
d7d9c14
Add linting to workflows.
davidlion Mar 6, 2025
8d66712
Try spaces.
davidlion Mar 6, 2025
9c593ab
Needs to be single quotes.
davidlion Mar 6, 2025
768cb78
Fix lint workflow name; Change task lint check suffix -full -> -all.
davidlion Mar 6, 2025
2375bb6
Fix name; Change create-venv to once.
davidlion Mar 6, 2025
2d515ee
Fix yamllint issues.
davidlion Mar 6, 2025
e91ca62
Try venv workaround for now.
davidlion Mar 6, 2025
01c3975
Add python3-venv to install package scripts.
davidlion Mar 6, 2025
8ab378d
Change centos venv to virtualenv.
davidlion Mar 6, 2025
c5afc31
Remove separate lint workflow.
davidlion Mar 6, 2025
7951416
Tweak macos push/pull filters.
davidlion Mar 6, 2025
82f39df
centos debug package search
davidlion Mar 6, 2025
7715622
centos debug pip
davidlion Mar 7, 2025
17204a9
Drop debugging from centos.
davidlion Mar 7, 2025
2e29373
Merge branch 'main' into ci-clang-tidy
davidlion Mar 7, 2025
98d025a
Split cpp and no-cpp workflows.
davidlion Mar 7, 2025
b6b2163
Add clp-lint.yaml workflow back.
davidlion Mar 7, 2025
43e2a39
DEBUG test.
davidlion Mar 7, 2025
02634e7
Remove debug.
davidlion Mar 8, 2025
1ee3509
more debugging
davidlion Mar 8, 2025
ff82837
more debugging
davidlion Mar 8, 2025
2d67717
more debugging
davidlion Mar 8, 2025
b8b439b
Try fetch-depth: 0
davidlion Mar 10, 2025
a9fec81
remove debug; fix missing fetch depth
davidlion Mar 10, 2025
c6576da
Fix bad submodule update.
davidlion Mar 10, 2025
5c365cd
Bump dev-utils to contain lint taskfile fixes.
davidlion Mar 10, 2025
9e95b56
Merge remote-tracking branch 'upstream/main' into ci-clang-tidy
davidlion Mar 10, 2025
0c87753
Split out CI changes.
davidlion Mar 10, 2025
52b24f7
Bump dev-utils.
davidlion Mar 10, 2025
8b9c3a3
Apply suggestions from code review.
davidlion Mar 10, 2025
81f6424
Add internal to core tasks; Fix fix tasks; remove task from deps stat…
davidlion Mar 10, 2025
b45b13e
Add .inc note to NOTE; Include IrUnitHandlerInterface.cpp.
davidlion Mar 10, 2025
eb79186
Change check and fix to use full rather than diff.
davidlion Mar 10, 2025
45fc584
Apply suggestions from code review.
davidlion Mar 10, 2025
95f8d2f
Revert "Split out CI changes."
davidlion Mar 10, 2025
cfdaf3b
Update lint contrib doc.
davidlion Mar 10, 2025
c5b5840
Switch to always run full rather than diff.
davidlion Mar 10, 2025
c8c0be3
Merge remote-tracking branch 'upstream/main' into task-clang-tidy
davidlion Mar 11, 2025
bddf03e
Apply suggestions from code review.
davidlion Mar 11, 2025
51f116f
Blacklist byteswap.hpp due to defining macros on macos.
davidlion Mar 11, 2025
7948c73
Add clp/streaming_compression/Compressor.hpp for macos.
davidlion Mar 11, 2025
c2fe3c5
Revert core-build-macos pull/push paths.
davidlion Mar 11, 2025
16b102c
Remove bonus space.
davidlion Mar 11, 2025
2c33afd
Merge remote-tracking branch 'upstream/main' into task-clang-tidy
davidlion Mar 12, 2025
fc77fd5
Bump dev-utils.
davidlion Mar 12, 2025
d2190bb
Merge remote-tracking branch 'upstream/main' into task-clang-tidy
davidlion Mar 12, 2025
f1b0e89
Drop extra 0 on tidy version.
davidlion Mar 12, 2025
653ad79
Add FileDescriptorReader.cpp to exclude list for macos.
davidlion Mar 12, 2025
c7df107
Fix exclude list alphabetization.
davidlion Mar 12, 2025
51de6b3
Fix exclude list to be lexicographic case-insensitive sorted.
davidlion Mar 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/clp-core-build-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- ".github/workflows/clp-core-build-macos.yaml"
- ".gitmodules"
- "components/core/cmake/**"
- "components/core/CMakeLists.txt"
- "components/core/src/**"
Expand All @@ -17,6 +18,7 @@ on:
push:
paths:
- ".github/workflows/clp-core-build-macos.yaml"
- ".gitmodules"
- "components/core/cmake/**"
- "components/core/CMakeLists.txt"
- "components/core/src/**"
Expand Down Expand Up @@ -47,6 +49,8 @@ jobs:
steps:
- uses: "actions/checkout@v4"
with:
# Fetch history so that the `clang-tidy-diff` task can compare against the main branch.
fetch-depth: 0
submodules: "recursive"

# See https://github.com/actions/setup-python/issues/577
Expand Down Expand Up @@ -78,3 +82,9 @@ jobs:
--build-dir build
--num-jobs $(getconf _NPROCESSORS_ONLN)
--test-spec "~[Stopwatch]"

# TODO: When enough files are passing clang-tidy, switch to a full pass on schedule only.
# - run: >-
# task lint:check-cpp-${{(github.event_name == 'schedule') && 'full' || 'diff'}}
- run: "task lint:check-cpp-full"
shell: "bash"
33 changes: 33 additions & 0 deletions .github/workflows/clp-core-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,36 @@ jobs:
push: true
tags: "${{steps.core_image_meta.outputs.tags}}"
labels: "${{steps.core_image_meta.outputs.labels}}"

ubuntu-jammy-lint:
# Run if the ancestor jobs succeeded OR they were skipped and clp was changed.
if: >-
success()
|| (!cancelled() && !failure() && needs.filter-relevant-changes.outputs.clp_changed == 'true')
needs:
- "filter-relevant-changes"
- "ubuntu-jammy-deps-image"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
with:
# Fetch history so that the `clang-tidy-diff` task can compare against the main branch.
fetch-depth: 0
submodules: "recursive"

- name: "Work around actions/runner-images/issues/6775"
run: "chown $(id -u):$(id -g) -R ."
shell: "bash"

- uses: "./.github/actions/run-on-image"
env:
OS_NAME: "ubuntu-jammy"
with:
image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}"
use_published_image: >-
${{needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'false'
|| (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')}}
# TODO: When enough files are passing clang-tidy, switch to a full pass on schedule only.
# run_command: >-
# task lint:check-cpp-${{(github.event_name == 'schedule') && 'full' || 'diff'}}
run_command: "task lint:check-cpp-full"
2 changes: 1 addition & 1 deletion .github/workflows/clp-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:

- name: "Run lint task"
shell: "bash"
run: "task lint:check"
run: "task lint:check-no-cpp"
31 changes: 20 additions & 11 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,28 +185,37 @@ tasks:
INCLUDE_PATTERNS: ["{{.OUTPUT_DIR}}"]

core:
vars:
SRC_DIR: "{{.ROOT_DIR}}/components/core"
sources:
cmds:
- task: "core-generate"
- task: "core-build"

core-generate:
internal: true
sources: &core_source_files
- "{{.G_DEPS_CORE_CHECKSUM_FILE}}"
- "{{.SRC_DIR}}/cmake/**/*"
- "{{.SRC_DIR}}/CMakeLists.txt"
- "{{.SRC_DIR}}/src/**/*"
- "{{.G_CORE_COMPONENT_DIR}}/cmake/**/*"
- "{{.G_CORE_COMPONENT_DIR}}/CMakeLists.txt"
- "{{.G_CORE_COMPONENT_DIR}}/src/**/*"
- "{{.TASKFILE}}"
- "/etc/os-release"
deps: ["deps:core"]
cmds:
- task: "utils:cmake:generate"
vars:
BUILD_DIR: "{{.G_CORE_COMPONENT_BUILD_DIR}}"
SOURCE_DIR: "{{.G_CORE_COMPONENT_DIR}}"

core-build:
internal: true
sources: *core_source_files
generates:
- "{{.G_CORE_COMPONENT_BUILD_DIR}}/clg"
- "{{.G_CORE_COMPONENT_BUILD_DIR}}/clo"
- "{{.G_CORE_COMPONENT_BUILD_DIR}}/clp"
- "{{.G_CORE_COMPONENT_BUILD_DIR}}/clp-s"
- "{{.G_CORE_COMPONENT_BUILD_DIR}}/indexer"
- "{{.G_CORE_COMPONENT_BUILD_DIR}}/reducer-server"
deps: ["deps:core", "init"]
cmds:
- task: "utils:cmake:generate"
vars:
BUILD_DIR: "{{.G_CORE_COMPONENT_BUILD_DIR}}"
SOURCE_DIR: "{{.SRC_DIR}}"
- task: "utils:cmake:build"
vars:
BUILD_DIR: "{{.G_CORE_COMPONENT_BUILD_DIR}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ dnf install -y \
make \
mariadb-connector-c-devel \
openssl-devel \
python3-pip \
xz-devel
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
pkg-config \
python3 \
python3-pip \
python3-venv \
software-properties-common
3 changes: 2 additions & 1 deletion docs/src/dev-guide/contributing-linting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Before submitting a PR, ensure you've run our linting tools and either fixed any violations or
suppressed the warning. If you can't run the linting workflows locally, you can enable and run the
[clp-lint] workflow in your fork.
[clp-lint] and [clp-core-build] workflows in your fork.

## Requirements

Expand Down Expand Up @@ -32,5 +32,6 @@ task lint:fix
```

[clp-lint]: https://github.com/y-scope/clp/blob/main/.github/workflows/clp-lint.yaml
[clp-core-build]: https://github.com/y-scope/clp/blob/main/.github/workflows/clp-core-build.yaml
[feature-req]: https://github.com/y-scope/clp/issues/new?assignees=&labels=enhancement&projects=&template=feature-request.yml
[Task]: https://taskfile.dev/
1 change: 1 addition & 0 deletions lint-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
black>=24.4.2
clang-format>=20.1
clang-tidy>=19.1
ruff>=0.4.4
yamllint>=1.35.1
Loading
Loading