-
-
Notifications
You must be signed in to change notification settings - Fork 307
CI: Changes to running benchmark #1892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes involve updating the command used to register the Changes
Possibly related PRs
Suggested reviewers
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1892 +/- ##
============================================
+ Coverage 40.68% 82.09% +41.41%
============================================
Files 72 144 +72
Lines 7635 13013 +5378
Branches 1275 2896 +1621
============================================
+ Hits 3106 10683 +7577
+ Misses 4295 1409 -2886
- Partials 234 921 +687 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I'm all for speeding up CI tests but it would be good to catch when a change breaks the benchmarks, particularly for architectures the contribute doesn't have access to. Is there maybe a way we could instead reduce how many runs it does? We only really need one trial per benchmark to make sure things still work.
|
Sure, that solves the speed. But it still gives false test coverage all over the library. Would it be possible to run the benchmark after coverage has been uploaded perhaps? @nmoinvaz what do you think? Edit: When benchmarking, it would have been ideal to collect coverage for the benchmark code itself, but not for the library code. That way it does not show false test coverage, but does let us collect coverage for the benchmark code so we can also see that it has been run. |
|
Well it gives increases coverage for repository but not necessarily the library. I mean if you exclude test files and benchmarks in codecov then that is also I way to get more accurate library coverage. If this works, I'd be in favor of it: |
I think you misunderstand, running the benchmarks gives code coverage for library code as it hits some code that we don't touch using the tests themselves. |
|
I see. I think the value of crash coverage is still important. Even though it isn't tested for accuracy. It's just my opinion. I don't mind either way. |
Well, it makes it difficult to see what new tests we need to implement to have actual test coverage of that code, since codecov will tell us it is already covered. Thats why I am thinking about possibilities to run it for crash-testing purposes, but discard either all coverage or only the library coverage. |
|
Perhaps we should just not run it for coverage. So if the binaries are built for coverage, then don't add benchmark_zlib to ctest. In other configurations it would still run, for crash coverage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/cmake.yml (1)
773-776: New Benchmark Test Step Integration
This new step clearly delineates that the benchmark executable is run purely for crash testing without collecting coverage data. The use of the--benchmark_min_time=0flag ensures the benchmark runs quickly, aligning with the PR’s objective of speeding up CI runs.One suggestion to further improve robustness: consider adding an
if:condition to execute this step only when benchmarks are enabled (e.g. by checking ifmatrix.cmake-argscontains-DWITH_BENCHMARKS=ON). This will prevent the step from executing on configurations that do not build the benchmark executable, which could otherwise result in unexpected failures. For example:- - name: Test benchmarks (crashtest only, no coverage data collection) - run: test/benchmarks/benchmark_zlib --benchmark_min_time=0 - working-directory: ${{ matrix.build-dir || '.' }} + - name: Test benchmarks (crashtest only, no coverage data collection) + if: contains(matrix.cmake-args, "-DWITH_BENCHMARKS=ON") + run: test/benchmarks/benchmark_zlib --benchmark_min_time=0 + working-directory: ${{ matrix.build-dir || '.' }}This conditional ensures the benchmark runs only in the appropriate matrix jobs.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/cmake.yml(1 hunks)test/benchmarks/CMakeLists.txt(0 hunks)
💤 Files with no reviewable changes (1)
- test/benchmarks/CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: macOS Clang ASAN (ARM64)
- GitHub Check: macOS Clang ASAN (ARM64)
- GitHub Check: macOS Clang ASAN (ARM64)
- GitHub Check: macOS Clang ASAN (ARM64)
- GitHub Check: macOS Clang ASAN (ARM64)
- GitHub Check: macOS Clang ASAN (ARM64)
- GitHub Check: macOS Clang ASAN (ARM64)
- GitHub Check: macOS Clang ASAN (ARM64)
- GitHub Check: macOS Clang ASAN (ARM64)
- GitHub Check: macOS Clang ASAN (ARM64)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/cmake.yml(13 hunks)test/benchmarks/CMakeLists.txt(0 hunks)
💤 Files with no reviewable changes (1)
- test/benchmarks/CMakeLists.txt
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/cmake.yml
179-179: key "cmake-args" is duplicated in element in "include" section. previously defined at line:175,col:13. note that this key is case insensitive
(syntax-check)
211-211: key "cmake-args" is duplicated in element in "include" section. previously defined at line:207,col:13. note that this key is case insensitive
(syntax-check)
247-247: key "cmake-args" is duplicated in element in "include" section. previously defined at line:244,col:13. note that this key is case insensitive
(syntax-check)
270-270: key "cmake-args" is duplicated in element in "include" section. previously defined at line:266,col:13. note that this key is case insensitive
(syntax-check)
318-318: key "cmake-args" is duplicated in element in "include" section. previously defined at line:315,col:13. note that this key is case insensitive
(syntax-check)
333-333: key "cmake-args" is duplicated in element in "include" section. previously defined at line:329,col:13. note that this key is case insensitive
(syntax-check)
343-343: key "cmake-args" is duplicated in element in "include" section. previously defined at line:338,col:13. note that this key is case insensitive
(syntax-check)
412-412: key "cmake-args" is duplicated in element in "include" section. previously defined at line:408,col:13. note that this key is case insensitive
(syntax-check)
🪛 YAMLlint (1.35.1)
.github/workflows/cmake.yml
[error] 179-179: duplication of key "cmake-args" in mapping
(key-duplicates)
[error] 211-211: duplication of key "cmake-args" in mapping
(key-duplicates)
[error] 247-247: duplication of key "cmake-args" in mapping
(key-duplicates)
[error] 270-270: duplication of key "cmake-args" in mapping
(key-duplicates)
[error] 318-318: duplication of key "cmake-args" in mapping
(key-duplicates)
[error] 333-333: duplication of key "cmake-args" in mapping
(key-duplicates)
[error] 343-343: duplication of key "cmake-args" in mapping
(key-duplicates)
[error] 412-412: duplication of key "cmake-args" in mapping
(key-duplicates)
🪛 GitHub Check: CodeFactor
.github/workflows/cmake.yml
[warning] 179-179: .github/workflows/cmake.yml#L179
Duplication of key "cmake-args" in mapping. (key-duplicates)
[warning] 211-211: .github/workflows/cmake.yml#L211
Duplication of key "cmake-args" in mapping. (key-duplicates)
[warning] 247-247: .github/workflows/cmake.yml#L247
Duplication of key "cmake-args" in mapping. (key-duplicates)
[warning] 270-270: .github/workflows/cmake.yml#L270
Duplication of key "cmake-args" in mapping. (key-duplicates)
[warning] 318-318: .github/workflows/cmake.yml#L318
Duplication of key "cmake-args" in mapping. (key-duplicates)
[warning] 333-333: .github/workflows/cmake.yml#L333
Duplication of key "cmake-args" in mapping. (key-duplicates)
[warning] 343-343: .github/workflows/cmake.yml#L343
Duplication of key "cmake-args" in mapping. (key-duplicates)
[warning] 412-412: .github/workflows/cmake.yml#L412
Duplication of key "cmake-args" in mapping. (key-duplicates)
🔇 Additional comments (1)
.github/workflows/cmake.yml (1)
782-785: New Benchmark Crash Test Step Added
The addition of the step- name: Test benchmarks (crashtest only, no coverage data collection) run: test/benchmarks/benchmark_zlib --benchmark_min_time=0 working-directory: ${{ matrix.build-dir || '.' }}ensures that benchmarks are executed only as a crash test without collecting coverage data. This aligns well with the PR objective of removing the misleading CI benchmark coverage while still verifying (via crash testing) that the benchmark build does not exhibit runtime errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/workflows/cmake.yml (3)
21-21: Benchmark Flag Consistency Check.
The flag-DWITH_BENCHMARKS=ONhas been added to several job configurations (e.g. Ubuntu 20.04 GCC, Ubuntu GCC Benchmark, Ubuntu GCC ARM HF ASAN, Ubuntu GCC AARCH64 ASAN, Ubuntu GCC MIPS64, Ubuntu GCC RISC-V, and macOS Clang with a deployment target of 10.10). Please verify that this flag is intentionally enabled in all these entries and that it won’t trigger unintended benchmark executions in configurations where running benchmarks may not be desired.Also applies to: 35-35, 175-175, 206-206, 242-242, 311-311, 592-592
774-778: Validate New Benchmark Crash Test Step.
A new CI step named "Test benchmarks (crashtest only, no coverage data collection)" has been introduced (lines 774–778) to run the benchmark binary using the commandtest/benchmarks/benchmark_zlib --benchmark_min_time=0. Confirm that this step correctly isolates benchmarks for crash detection only and does not inadvertently interfere with your coverage reports or other test outcomes.🧰 Tools
🪛 actionlint (1.7.4)
775-775: got unexpected character '"' while lexing expression, expecting 'a'..'z', 'A'..'Z', '_', '0'..'9', ''', '}', '(', ')', '[', ']', '.', '!', '<', '>', '=', '&', '|', '*', ',', ' '. do you mean string literals? only single quotes are available for string delimiter
(expression)
775-775: Fix YAML String Literal in Condition.
Theifcondition on line 775 uses double quotes ("-DWITH_BENCHMARKS=ON"), which caused a lexing error according to actionlint. YAML in this context prefers single quotes for string literals. Please update the condition as shown below.- if: contains(matrix.cmake-args, "-DWITH_BENCHMARKS=ON") + if: contains(matrix.cmake-args, '-DWITH_BENCHMARKS=ON')🧰 Tools
🪛 actionlint (1.7.4)
775-775: got unexpected character '"' while lexing expression, expecting 'a'..'z', 'A'..'Z', '_', '0'..'9', ''', '}', '(', ')', '[', ']', '.', '!', '<', '>', '=', '&', '|', '*', ',', ' '. do you mean string literals? only single quotes are available for string delimiter
(expression)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/cmake.yml(12 hunks)test/benchmarks/CMakeLists.txt(0 hunks)
💤 Files with no reviewable changes (1)
- test/benchmarks/CMakeLists.txt
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/cmake.yml
775-775: got unexpected character '"' while lexing expression, expecting 'a'..'z', 'A'..'Z', '_', '0'..'9', ''', '}', '(', ')', '[', ']', '.', '!', '<', '>', '=', '&', '|', '*', ',', ' '. do you mean string literals? only single quotes are available for string delimiter
(expression)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/cmake.yml (1)
21-21: Consistent Addition of Benchmark FlagThe changes add the
-DWITH_BENCHMARKS=ONflag (and combinations thereof with sanitizer and toolchain options) across multiple matrix entries. This ensures that benchmark targets are built separately without being registered as part of the main gtest suite—aligning with the objective to eliminate misleading benchmark coverage in CI. Please verify that in all these contexts the flag does not interfere with other build options (such as sanitizer flags) and that it deliberately excludes benchmarks from standard test registration.Also applies to: 28-28, 168-168, 200-200, 236-236, 257-257, 304-304, 317-317, 325-325, 347-347, 395-395, 585-585
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/cmake.yml(12 hunks)test/benchmarks/CMakeLists.txt(0 hunks)
💤 Files with no reviewable changes (1)
- test/benchmarks/CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms (20)
- GitHub Check: Ubuntu GCC
- GitHub Check: Ubuntu GCC AARCH64
- GitHub Check: Ubuntu GCC
- GitHub Check: Ubuntu GCC AARCH64
- GitHub Check: Ubuntu GCC
- GitHub Check: Ubuntu GCC AARCH64
- GitHub Check: Ubuntu GCC
- GitHub Check: Ubuntu GCC AARCH64
- GitHub Check: Ubuntu GCC
- GitHub Check: Ubuntu GCC AARCH64
- GitHub Check: Ubuntu GCC
- GitHub Check: Ubuntu GCC AARCH64
- GitHub Check: Ubuntu GCC
- GitHub Check: Ubuntu GCC AARCH64
- GitHub Check: Ubuntu GCC
- GitHub Check: Ubuntu GCC AARCH64
- GitHub Check: Ubuntu GCC
- GitHub Check: Ubuntu GCC AARCH64
- GitHub Check: Ubuntu GCC
- GitHub Check: Ubuntu GCC AARCH64
🔇 Additional comments (1)
.github/workflows/cmake.yml (1)
767-771: Introduction of Dedicated Benchmark Crash Test StepThe newly added step, which runs
test/benchmarks/benchmark_zlib --benchmark_min_time=0in the configured build directory, clearly separates the execution of benchmarks (as a crash test only) from the main test suite. This should help avoid false coverage metrics while still ensuring that benchmark code paths are exercised for stability. Please confirm that using
--benchmark_min_time=0achieves the desired “crash-only” behavior and does not inadvertently run extended performance tests.
0a99fdc to
413b080
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/cmake.yml (1)
772-777: Review of sanitizer environment variable declarations in the benchmark step
Static analysis warnings indicate that properties such astsan-options,lsan-options, andubsan-optionsare not defined in the job’s matrix object. It is advisable to either define default values for these options in the matrix configuration or adjust their usage here to ensure safe fallback values.🧰 Tools
🪛 actionlint (1.7.4)
774-774: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
775-775: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
776-776: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/cmake.yml(13 hunks)test/benchmarks/CMakeLists.txt(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- test/benchmarks/CMakeLists.txt
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/cmake.yml
774-774: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
775-775: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
776-776: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
🔇 Additional comments (9)
.github/workflows/cmake.yml (9)
21-21: Benchmark flag added for Ubuntu 20.04 GCC configuration
The added flag-DWITH_BENCHMARKS=ONensures that benchmarks are enabled in this environment as intended. Please verify that all downstream scripts and configurations properly account for this flag.
28-28: Benchmark flag included in Ubuntu GCC ASAN job
Thecmake-argsnow include-DWITH_SANITIZER=Address -DWITH_BENCHMARKS=ON, which is consistent with the objective to conditionally enable benchmarks without affecting sanitizer behavior.
168-168: Enabling benchmarks for Ubuntu GCC ARM HF ASAN
By appending-DWITH_BENCHMARKS=ONto the ARM HF ASAN configuration, benchmarks will now be available in this job. Ensure that any benchmark-related side effects (especially regarding coverage) are handled downstream.
199-199: Benchmark flag set for Ubuntu GCC AARCH64 ASAN
The updatedcmake-argsnow combine the toolchain file, sanitizer settings, and the benchmark flag. It’s advisable to check that the AARCH64 environment fully supports the benchmark execution without impacting CI runs.
236-236: Updated Ubuntu GCC MIPS64 job with benchmark support
Adding-DWITH_BENCHMARKS=ONin the MIPS64 configuration follows the pattern established in other job definitions. Confirm that benchmarks run only in the intended contexts and do not inadvertently contribute to coverage data.
254-256: Enabling benchmarks in Ubuntu GCC PPC64 configuration
The revisedcmake-argsnow include-DWITH_BENCHMARKS=ONfor the PPC64 job. This change appears consistent with other platform configurations. Please ensure that the change does not interfere with any platform-specific settings.
392-394: Benchmark flag addition in Ubuntu MinGW x86_64 configuration
The inclusion of-DWITH_BENCHMARKS=ONhere aligns with the goal of enabling benchmarks across all relevant jobs. It is recommended to double-check that the MinGW build environment handles benchmarks separately from the coverage collection process as intended.
581-585: Benchmark flag added for macOS Clang (Target 10.10) build
Appending-DWITH_BENCHMARKS=ONto the macOS build configuration ensures benchmark tests are activated. Verify that the deployment target10.10remains compatible with both the application and the benchmark infrastructure.
767-777: New job step for benchmark crashtests without coverage data
A dedicated step now runs benchmark tests forbenchmark_zlibusing the command:ctest --verbose -C Release -R ^benchmark_zlib$ --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '3' }}This isolates benchmark execution from code coverage collection, fulfilling the PR’s objective of eliminating misleading coverage data while still performing crash testing.
🧰 Tools
🪛 actionlint (1.7.4)
774-774: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
775-775: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
776-776: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
|
We should test building benchmarks on at least one 32-bit architecture, as there has been at least one benchmark that failed to build on 32-bit architecture due to mismatched types. |
|
Added to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/cmake.yml (1)
770-780: New CI Step for Benchmark Crash-Testing
The addition of the "Test benchmarks (crashtest only, no coverage data collection)" step is well aligned with the PR objectives. The step uses actestcommand filtered with the regex^benchmark_zlib$, which should effectively crash-test the benchmark without affecting coverage data.However, take note of the environment variables provided in this step:
TSAN_OPTIONS: ${{ matrix.tsan-options || 'verbosity=0' }}:abort_on_error=1:halt_on_error=1LSAN_OPTIONS: ${{ matrix.lsan-options || 'verbosity=0' }}:abort_on_error=1:halt_on_error=1UBSAN_OPTIONS: ${{ matrix.ubsan-options || 'verbosity=0' }}:print_stacktrace=1:abort_on_error=1:halt_on_error=1Static analysis (actionlint) has flagged that these properties (
tsan-options,lsan-options, andubsan-options) are not defined in the matrix object, which might lead to warnings or unexpected behavior. To resolve this, consider one of the following:
Option A: Define these properties explicitly in each matrix entry where they are applicable (even if as empty strings) so that the fallback is triggered without static analysis issues.
For example, in each matrix entry add:
tsan-options: "" lsan-options: "" ubsan-options: ""Option B: Adjust the expressions in the environment block to remove reliance on these undefined properties if they are not needed. For instance, if crash-testing benchmarks do not require TSAN/LSAN/UBSAN options, you might remove them or provide static defaults.
🧰 Tools
🪛 actionlint (1.7.4)
777-777: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
778-778: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
779-779: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/cmake.yml(15 hunks)test/benchmarks/CMakeLists.txt(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- test/benchmarks/CMakeLists.txt
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/cmake.yml
777-777: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
778-778: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
779-779: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
🔇 Additional comments (9)
.github/workflows/cmake.yml (9)
21-21: Benchmark Flag for Ubuntu 20.04 GCC
The addition of the-DWITH_BENCHMARKS=ONflag in the Ubuntu 20.04 GCC matrix entry is clear and aligns with the PR’s aim to enable benchmark crash-testing.
28-29: Extended CMake Arguments for ASAN Job
The updatedcmake-argsin the "Ubuntu GCC ASAN" job now include both-DWITH_SANITIZER=Addressand-DWITH_BENCHMARKS=ON. This combination appears intentional; please verify that the sanitizer flags and benchmark flag do not have unintended interactions.
90-91: Benchmark Flag for 32-bit Build
Adding-DWITH_BENCHMARKS=ONto the 32-bit build configuration is consistent with enabling benchmark crash-tests. Make sure the combined linker and compiler flags (for 32-bit) are still validated.
168-169: ARMHF Configuration Update
The "Ubuntu GCC ARM HF ASAN" configuration now specifies-DWITH_SANITIZER=Address -DWITH_BENCHMARKS=ON. This looks appropriate; just double-check that the toolchain file and sanitizer integration work well together in this environment.
199-202: AARCH64 ASAN Job Update
For the "Ubuntu GCC AARCH64 ASAN" job, the cmake arguments include the benchmark flag along with the toolchain and sanitizer options. This update is coherent with the overall changes. Ensure that AArch64 builds have been sufficiently exercised with the benchmark crash-test.
236-237: MIPS64 Benchmark Activation
The "Ubuntu GCC MIPS64" job now activates benchmarks by including-DWITH_BENCHMARKS=ON. This is consistent with the goal of crash-testing the benchmarks; no issues found.
258-259: PowerPC64 Benchmark Flag Added
The addition of-DWITH_BENCHMARKS=ONin the "Ubuntu GCC PPC64" job is well placed. Please verify that combining the toolchain file with the benchmark flag does not have any side effects.
395-397: MinGW x86_64 Benchmark Enablement
The Windows MinGW x86_64 job now passes-DWITH_BENCHMARKS=ONamong its cmake arguments. This is in line with the modified CI behavior so that benchmarks are crash-tested even on Windows.
586-587: macOS Clang Deployment Target and Benchmark Flag
For the "macOS Clang (Target 10.10)" job, the cmake arguments now include-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 -DWITH_BENCHMARKS=ON. This looks appropriate for ensuring benchmarks are built on older macOS deployment targets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/cmake.yml (2)
21-29: Benchmark Flag Inclusion in Matrix ConfigurationsThe changes add the
-DWITH_BENCHMARKS=ONflag (often combined with other flags, e.g. sanitizer options) consistently across multiple job configurations (for example, in the "Ubuntu 20.04 GCC" job at line 21, "Ubuntu GCC ASAN" at line 29, "Ubuntu GCC 32-bit" at line 91, "Ubuntu GCC MIPS64" at line 237, and "macOS Clang (Target 10.10)" at line 589). This aligns well with the PR’s objective of selectively running benchmarks.Recommendation:
• Review that benchmarks are enabled only in configurations where they are intended, so that jobs aimed solely at library tests (or with coverage enabled) aren’t inadvertently running benchmarks.
• Optionally, consider centralizing or documenting the purpose of the added benchmark flag for easier long‐term maintenance.Also applies to: 91-91, 169-171, 237-237, 589-589
772-782: New Benchmark Crash-Test StepA new job step named "Test benchmarks (crashtest only, no coverage data collection)" has been introduced. This step conditionally runs the benchmark test (filtered via
-R ^benchmark_zlib$) only when the-DWITH_BENCHMARKS=ONflag is present. This approach fulfills the PR objective by decoupling benchmark execution (as a crash test) from the main test coverage run.Points to consider:
• The use of the conditioncontains(matrix.cmake-args, '-DWITH_BENCHMARKS=ON')appears appropriate to isolate benchmark runs.
• The environment settings for sanitizer options (TSAN_OPTIONS,LSAN_OPTIONS, andUBSAN_OPTIONS) fallback to a default ('verbosity=0') if not defined in the matrix; however, static analysis hints indicate these properties are not formally defined in the matrix object. To avoid potential warnings and to ensure clarity, consider explicitly defining these keys (with their optional default values) in the matrix configuration.
• Verify that filtering for^benchmark_zlib$accurately targets the desired benchmark without accidentally omitting or including unintended tests.🧰 Tools
🪛 actionlint (1.7.4)
779-779: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
780-780: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
781-781: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/cmake.yml(15 hunks)test/benchmarks/CMakeLists.txt(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- test/benchmarks/CMakeLists.txt
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/cmake.yml
779-779: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
780-780: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
781-781: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (5)
.github/workflows/cmake.yml (5)
28-29: Augment Ubuntu GCC ASAN ConfigurationThe updated lines in the Ubuntu GCC ASAN matrix entry now set:
cxxflags: -Wno-maybe-uninitializedcmake-args: -DWITH_SANITIZER=Address -DWITH_BENCHMARKS=ONThis ensures that both the sanitizer and benchmark flags are enabled together. Please verify that combining these flags does not introduce any unintended interactions between sanitizer settings and benchmark build/test behavior.
169-170: Update Ubuntu GCC ARM HF ASAN SettingsThe modification in the ARM HF ASAN block now adds
-DWITH_BENCHMARKS=ONalongside the sanitizer flag:
- Line 169:
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-armhf.cmake -DWITH_SANITIZER=Address -DWITH_BENCHMARKS=ON- Line 170:
cxxflags: -Wno-psabi -Wno-maybe-uninitializedThese changes are consistent with the approach in other configurations. Double-check that the toolchain and compiler-specific flags continue to work correctly with benchmark builds.
201-201: Enable Benchmarks for Ubuntu GCC AARCH64 ASANThe AARCH64 ASAN block now includes
-DWITH_BENCHMARKS=ONalong with the sanitizer flag:
- Line 201:
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-aarch64.cmake -DWITH_SANITIZER=Address -DWITH_BENCHMARKS=ONThis change is consistent with the other architectures. Please confirm that the additional flag does not adversely affect AARCH64 builds.
396-398: Configure Benchmarks for Ubuntu MinGW x86_64The changes in the MinGW x86_64 block introduce:
- Line 396:
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-mingw-x86_64.cmake -DWITH_BENCHMARKS=ON- Line 398:
cxxflags: -Wno-unused-parameterEnsure that the benchmark build is supported in the MinGW environment and that this additional flag does not conflict with any Windows-specific compiler behavior.
589-589: Set Benchmarks in macOS Clang (Target 10.10) ConfigurationThe macOS Clang configuration now appends
-DWITH_BENCHMARKS=ONto the deployment target flag:
- Line 589:
cmake-args: -DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 -DWITH_BENCHMARKS=ONVerify that the benchmarks are compatible with the targeted macOS deployment version and that they do not interfere with coverage collection in later CI steps.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/cmake.yml(15 hunks)test/benchmarks/CMakeLists.txt(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- test/benchmarks/CMakeLists.txt
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/cmake.yml
779-779: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
780-780: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
781-781: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
🔇 Additional comments (2)
.github/workflows/cmake.yml (2)
237-237: Activate Benchmarks for Ubuntu GCC MIPS64By updating the MIPS64 matrix entry with:
- Line 237:
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-mips64.cmake -DWITH_BENCHMARKS=ONthe configuration now enables benchmarks for this architecture. This is in line with the general strategy to include benchmarks selectively.
728-728: Pass Through Updated CXXFLAGS in Project GenerationThe explicit inclusion of
CXXFLAGS: ${{ matrix.cxxflags }}in the “Generate project files” step ensures that any custom compiler flags provided in the matrix (such as those added above) are correctly applied during the CMake configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/cmake.yml(14 hunks)test/benchmarks/CMakeLists.txt(1 hunks)test/benchmarks/benchmark_slidehash.cc(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- test/benchmarks/CMakeLists.txt
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/cmake.yml
779-779: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
780-780: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
781-781: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
🔇 Additional comments (4)
.github/workflows/cmake.yml (4)
21-21: Good enhancement to enable benchmarks across multiple configurationsThe addition of
-DWITH_BENCHMARKS=ONto these configurations enables benchmark testing in CI, which aligns with the PR objective to crash-test benchmarks while keeping them separate from coverage metrics.Also applies to: 29-30, 91-91, 169-170, 201-201, 237-237, 258-258, 306-306, 327-327, 349-349, 396-398, 588-588
727-727: Remember to update cxxflags for warningsThe changes to handle compiler-specific warnings like
-Wno-maybe-uninitialized,-Wno-psabi, and-Wno-unused-parameterare important for clean builds across different configurations.
737-737: Good approach to exclude benchmarks from regular test runsModifying the ctest command to exclude benchmark_zlib tests (
-E benchmark_zlib) from the regular test run is an effective way to prevent them from influencing code coverage metrics.
772-782:❓ Verification inconclusive
Effective separation of benchmark testing from coverage collection
The new step for crash-testing benchmarks without coverage collection effectively implements the PR objective of improving CI visibility while still verifying that benchmarks don't crash.
The static analysis tool identified that properties
tsan-options,lsan-options, andubsan-optionsare not defined for all matrix entries. While the fallback mechanism (|| 'verbosity=0') should work, consider explicitly defining these in your matrix configuration if they're consistently needed.
🏁 Script executed:
#!/bin/bash # Check which matrix entries have these sanitizer options defined grep -n "tsan-options\|lsan-options\|ubsan-options" .github/workflows/cmake.ymlLength of output: 741
Benchmark Crash Test Workflow Updated – Verify Explicit Sanitizer Definition
The new step for crash-testing benchmarks without coverage data cleanly separates these concerns and meets the PR objective. The grep output confirms that both occurrences of the sanitizer options (TSAN, LSAN, and UBSAN) use fallback values (i.e.,
${{ matrix.<option> || 'verbosity=0' }}on lines 742–744 and 779–781). While this fallback mechanism works, please verify whether you’d prefer to explicitly define these options in your matrix configuration if a non-default value is consistently required.🧰 Tools
🪛 actionlint (1.7.4)
779-779: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
780-780: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
781-781: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/workflows/cmake.yml (3)
727-727: Consistency in CXXFLAGS usage.
The updated assignment on line 727 (CXXFLAGS: ${{ matrix.cxxflags }}) appears consistent with the rest of the configuration. Just ensure that every matrix entry supplies the expected value so that no configuration is inadvertently omitted.
772-782: New crash-test step for benchmarks without coverage collection.
The newly added CI step titled “Test benchmarks (crashtest only, no coverage data collection)” (lines 772–782) effectively isolates the execution ofbenchmark_zlibusing a dedicated command:-run: ctest --verbose -C Release -E benchmark_zlib --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '3' }} +run: ctest --verbose -C Release -R ^benchmark_zlib$ --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '3' }}This change ensures that benchmarks are crash-tested without affecting coverage metrics. It directly addresses the PR objective of decoupling benchmark execution from coverage reporting.
If needed, additional inline documentation in the CI step could help clarify its purpose for future maintainers.
🧰 Tools
🪛 actionlint (1.7.4)
779-779: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
780-780: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
781-781: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
779-781: Review environment variable defaults for sanitizers.
Static analysis tools flag that properties liketsan-options,lsan-options, andubsan-optionsare not explicitly defined in the matrix (lines 779–781). Although the fallback defaults (using|| 'verbosity=0') mitigate potential issues at runtime, consider defining these keys explicitly in the matrix configuration for clarity and to avoid YAML validation warnings.🧰 Tools
🪛 actionlint (1.7.4)
779-779: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
780-780: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
781-781: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/cmake.yml(14 hunks)test/benchmarks/CMakeLists.txt(1 hunks)test/benchmarks/benchmark_slidehash.cc(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- test/benchmarks/benchmark_slidehash.cc
- test/benchmarks/CMakeLists.txt
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/cmake.yml
779-779: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
780-780: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
781-781: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
⏰ Context from checks skipped due to timeout of 90000ms (28)
- GitHub Check: Ubuntu GCC ASAN
- GitHub Check: macOS Clang ASAN
- GitHub Check: Ubuntu GCC ASAN
- GitHub Check: macOS Clang ASAN
- GitHub Check: macOS GCC UBSAN (ARM64)
- GitHub Check: Ubuntu GCC ASAN
- GitHub Check: macOS Clang ASAN
- GitHub Check: macOS GCC UBSAN (ARM64)
- GitHub Check: Ubuntu GCC ASAN
- GitHub Check: macOS Clang ASAN
- GitHub Check: macOS GCC UBSAN (ARM64)
- GitHub Check: Ubuntu GCC ASAN
- GitHub Check: macOS Clang ASAN
- GitHub Check: macOS GCC UBSAN (ARM64)
- GitHub Check: Ubuntu GCC ASAN
- GitHub Check: macOS Clang ASAN
- GitHub Check: macOS GCC UBSAN (ARM64)
- GitHub Check: Ubuntu GCC ASAN
- GitHub Check: macOS Clang ASAN
- GitHub Check: macOS GCC UBSAN (ARM64)
- GitHub Check: Ubuntu GCC ASAN
- GitHub Check: macOS Clang ASAN
- GitHub Check: macOS GCC UBSAN (ARM64)
- GitHub Check: Ubuntu GCC ASAN
- GitHub Check: macOS Clang ASAN
- GitHub Check: macOS GCC UBSAN (ARM64)
- GitHub Check: Ubuntu GCC ASAN
- GitHub Check: macOS Clang ASAN
🔇 Additional comments (7)
.github/workflows/cmake.yml (7)
21-21: Enable benchmarks flag in Ubuntu 20.04 GCC configuration.
The addition of-DWITH_BENCHMARKS=ONon line 21 ensures that benchmarks are built for this job configuration. This is aligned with the PR objective to separate benchmark crash-testing from coverage collection.
28-29: Combined sanitizer and benchmark configuration in Ubuntu GCC ASAN.
The inclusion of both-DWITH_SANITIZER=Addressand-DWITH_BENCHMARKS=ON(line 29) guarantees that, in addition to address sanitization, benchmark tests are enabled. This setup is consistent with overall CI improvements.
91-91: Enable benchmarks in 32-bit build configuration.
Appending-DWITH_BENCHMARKS=ONalongside the 32-bit compilation flags on line 91 ensures that benchmarks are included in the 32-bit build. This meets the requirement for comprehensive testing across architectures.
169-170: Enable benchmarks for ARM HF ASAN configuration.
In the ARM HF ASAN job, the modifiedcmake-args(line 169) adding-DWITH_SANITIZER=Address -DWITH_BENCHMARKS=ONalong with updatedcxxflagson line 170 (-Wno-psabi -Wno-maybe-uninitialized) are appropriate enhancements. They ensure that benchmarks get built while suppressing specific warnings that might otherwise clutter the build output.
201-201: Enable benchmarks for AARCH64 ASAN configuration.
The change on line 201, where-DWITH_BENCHMARKS=ONis appended to the toolchain flags for AARCH64, enforces consistency in benchmark enabling across multiple architectures as required by the PR objectives.
238-238: Enable benchmarks in the MIPS64 configuration.
Adding-DWITH_BENCHMARKS=ONin the MIPS64 job (line 238) is a good move to ensure that benchmark tests are not omitted on this platform, thus maintaining uniformity in CI testing.
589-589: Enable benchmarks for macOS Clang (Target 10.10).
The modification on line 589 by appending-DWITH_BENCHMARKS=ON(together with the deployment target setting) ensures benchmark tests are enabled on macOS, consistent with the overall intention of the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/cmake.yml (1)
762-772: Introduce Dedicated Benchmark Crash-Test StepA new CI step titled "Test benchmarks (crashtest only, no coverage data collection)" has been added. It conditionally runs only the
benchmark_zlibtarget (using-R ^benchmark_zlib$) when benchmarks are enabled. This approach ensures that benchmarks primarily serve as crash tests, thereby eliminating the misleading coverage data.Note: The step’s environment configuration references
tsan-options,lsan-options, andubsan-optionsvia fallback expressions. Static analysis tools flagged these properties as undefined in the matrix type. Although the fallback defaults (e.g.,'verbosity=0') mitigate runtime issues, consider defining explicit default values for these keys in the matrix configuration to avoid potential YAML validation warnings in the future.🧰 Tools
🪛 actionlint (1.7.4)
769-769: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
770-770: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
771-771: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/cmake.yml(13 hunks)test/benchmarks/CMakeLists.txt(1 hunks)test/benchmarks/benchmark_slidehash.cc(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- test/benchmarks/benchmark_slidehash.cc
- test/benchmarks/CMakeLists.txt
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/cmake.yml
769-769: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
770-770: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
771-771: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
🔇 Additional comments (8)
.github/workflows/cmake.yml (8)
22-23: Enable Benchmarking for ASAN BuildsIn the "Ubuntu GCC ASAN" matrix entry, the new
cxxflags: -Wno-maybe-uninitializedandcmake-args: -DWITH_SANITIZER=Address -DWITH_BENCHMARKS=ONensure that benchmarks are built in conjunction with AddressSanitizer. This change aligns with the PR objective to separate benchmark execution from regular coverage tests.
81-87: Include Benchmarks in 32-bit BuildsThe "Ubuntu GCC 32-bit" configuration now appends
-DWITH_BENCHMARKS=ONto its CMake arguments. This inclusion is consistent with the overall strategy to build benchmarks, though please verify that enabling benchmarks on 32-bit builds does not introduce excessive build time or resource issues.
161-165: Configure ARM HF Builds with BenchmarkingIn the "Ubuntu GCC ARM HF ASAN" entry, the changes add
-DWITH_BENCHMARKS=ONalongside the toolchain specification and update the compiler flags to suppress warnings (-Wno-psabi -Wno-maybe-uninitialized). These modifications help ensure that benchmarks are built on ARM HF while keeping warning noise low.
193-199: Enable Benchmarks for AARCH64 ASAN ConfigurationThe AARCH64 configuration now passes
-DWITH_BENCHMARKS=ONvia CMake arguments, ensuring benchmarks are compiled in this environment too. This is in line with the intent to crash-test benchmarks separately from coverage runs.
229-234: Activate Benchmark Flag for MIPS64 BuildsThe "Ubuntu GCC MIPS64" matrix entry has been updated to include
-DWITH_BENCHMARKS=ONin its CMake arguments. This change brings the MIPS64 configuration in line with other architectures regarding benchmark support.
250-256: Activate Benchmarking for PPC64 ConfigurationsFor the PPC64 configuration, the CMake arguments now include
-DWITH_BENCHMARKS=ON. This maintains consistency across architectures and supports the goal of isolating benchmark tests from code coverage.
574-579: Set Benchmark Flag for macOS Clang DeploymentIn the "macOS Clang (Target 10.10)" entry, the CMake arguments have been extended with
-DWITH_BENCHMARKS=ON. This ensures that even on macOS deployments, benchmarks are built; just verify that the specified deployment target (10.10) remains acceptable with the addition of benchmarking.
727-727: Separate Regular Tests from BenchmarksThe test-run step now excludes benchmark tests by using the flag
-E benchmark_zlib. This change effectively prevents benchmarks from affecting the code coverage metrics, aligning with the PR objective of isolating crash-tests.
| os: ubuntu-latest | ||
| cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-armhf.cmake -DWITH_SANITIZER=Address | ||
| cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-armhf.cmake -DWITH_SANITIZER=Address -DWITH_BENCHMARKS=ON | ||
| cxxflags: -Wno-psabi -Wno-maybe-uninitialized |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seem to be ignored due to cmake/detect-coverage.cmake, see #1902.
for correctness, making it only run each benchmark for 1 iteration, instead of thousands or hundreds of thousands. Add a separate CI step to crashtest benchmarks without collecting any coverage data. Activate benchmarks in more arches. Disable some warnings to avoid errors in compiling google benchmark. Remove separate benchmark CI job, now included in other jobs instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/cmake.yml (1)
762-772: Integrate a Dedicated Crash-Test for Benchmarks
The newly added CI step "Test benchmarks (crashtest only, no coverage data collection)" runs thebenchmark_zlibtarget separately. This approach prevents skewing the coverage reports while still verifying the stability of the benchmarks. Additionally, since this step relies on sanitizer environment variables (e.g.,tsan-options,lsan-options,ubsan-options) that are not explicitly defined in the matrix, consider adding default definitions for these keys to ensure YAML validation consistency.🧰 Tools
🪛 actionlint (1.7.4)
769-769: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
770-770: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
771-771: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/cmake.yml(13 hunks)test/benchmarks/CMakeLists.txt(1 hunks)test/benchmarks/benchmark_slidehash.cc(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- test/benchmarks/benchmark_slidehash.cc
- test/benchmarks/CMakeLists.txt
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/cmake.yml
769-769: property "tsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
770-770: property "lsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
771-771: property "ubsan-options" is not defined in object type {asan-options: string; build-config: string; build-dir: string; build-shared: string; build-src-dir: string; cflags: string; chost: string; cmake-args: string; codecov: string; compiler: string; cxx-compiler: string; cxxflags: string; gcov-exec: string; ldflags: string; msan-options: string; name: string; os: string; packages: string; parallels-jobs: number; readonly-project-dir: bool}
(expression)
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: Windows MSVC 2019 v141 Win64
- GitHub Check: Windows MSVC 2019 v141 Win64
- GitHub Check: Windows MSVC 2019 v141 Win64
- GitHub Check: Windows MSVC 2019 v141 Win64
- GitHub Check: Windows MSVC 2019 v141 Win64
- GitHub Check: Windows MSVC 2019 v141 Win64
- GitHub Check: Windows MSVC 2019 v141 Win64
- GitHub Check: Windows MSVC 2019 v141 Win64
- GitHub Check: Windows MSVC 2019 v141 Win64
- GitHub Check: Windows MSVC 2019 v141 Win64
🔇 Additional comments (8)
.github/workflows/cmake.yml (8)
22-23: Ensure Consistency in Sanitizer and Benchmark Flags for Ubuntu GCC ASAN
The addition of-Wno-maybe-uninitializedincxxflagsalong with adding-DWITH_BENCHMARKS=ONtocmake-argsensures that the Address Sanitizer job also builds the benchmarks. Please verify that these flags do not conflict with other matrix settings and that they align with overall CI configuration.
85-85: Enable Benchmarks in 32-bit Build Configuration
The updatedcmake-argsfor the Ubuntu GCC 32-bit job now includes the necessary architecture-specific flags and the benchmark flag. Confirm that these flags work together correctly in a 32-bit environment.
163-164: Augment ARM HF ASAN Job with Benchmark Support and Updated Compiler Flags
For the Ubuntu GCC ARM HF ASAN job, adding-DWITH_BENCHMARKS=ONalong with supplementing thecxxflagswith-Wno-psabi -Wno-maybe-uninitializedimproves consistency with other builds. Please verify that these changes function as expected on ARM HF targets.
195-195: Activate Benchmarks in AARCH64 ASAN Configuration
Enabling benchmarks by appending-DWITH_BENCHMARKS=ONalongside the toolchain and Address Sanitizer settings for the AARCH64 job meets the PR objectives. Double-check that the AARCH64 toolchain fully supports the benchmark execution without unexpected side effects.
251-257: Introduce Benchmark Flag for PPC64 Builds
For the Ubuntu GCC PPC64 job, the diff adds-DWITH_BENCHMARKS=ONto the CMake arguments. This ensures that benchmarks are built for PPC64 targets. Verify that the benchmark integration does not interfere with the static linking (-static) or other PPC64-specific optimizations.
301-307: Enable Benchmarking for RISC-V Builds
The inclusion of-DWITH_BENCHMARKS=ONtogether with the RISC-V toolchain file supports the intended crash-testing on RISC-V. Please check that the required packages and toolchain settings are sufficient for running the benchmarks.
574-580: Leverage Benchmarking in macOS Clang Configuration
In the macOS Clang (Target 10.10) job, the deployment target remains set to 10.10 and the benchmark flag is added via-DWITH_BENCHMARKS=ON. Ensure that this configuration is compatible with the desired macOS version and that benchmarks execute properly on that OS.
727-728: Refine Test Suite to Exclude Benchmark Targets
Updating the test command to include-E benchmark_zlibeffectively excludes benchmark tests from the regular CI run. This change supports a clearer test coverage report. Confirm that no non‑benchmark tests are inadvertently skipped as a result of this exclusion.
Running the benchmarks takes a long time, and when run through gtest it will not print the bench results.
Running it during CI increases coverage, but since the benchmarks do not actually verify that results are correct, the coverage it provides is worthless and misleading.
Removing it lets us see where we have actual CI test coverage, and speeds up CI runs as well.
Add a CI step to quickly crashtest the benchmarks, without collecting coverage data.
Summary by CodeRabbit
Summary by CodeRabbit
benchmark_zlibtest to include a minimum benchmark time.slide_hashbenchmark to prevent memory leaks.