3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-08-01 19:54:04 +00:00

Fix clang-tidy warning workflow build invocation (#10349)

The `Build Z3 with clang-tidy warnings` job was failing before
compilation due to an invalid `cmake --build` invocation. The workflow
passed a Ninja-only flag directly to CMake, so the job exited with
`Unknown argument -k` instead of producing the intended warning report.

- **Root cause**
  - The workflow invoked:
    ```bash
    cmake --build build --target shell test-z3 -k 0
    ```
- `-k 0` is a native Ninja argument and must be forwarded through CMake
after `--`.

- **Change**
- Update the clang-tidy warning workflow to pass native build-tool
arguments correctly:
    ```bash
    cmake --build build --target shell test-z3 -- -k 0
    ```

- **Effect**
- The job can now reach the actual Ninja build instead of failing in
CMake argument parsing.
- This restores the intended behavior of collecting clang-tidy/build
diagnostics in the workflow artifact.

- **Files**
  - `.github/workflows/clang-tidy-warning-report.yml`

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot 2026-08-01 12:03:27 -07:00 committed by GitHub
parent b902c020ce
commit 1972f4667b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,7 +46,7 @@ jobs:
2>&1 | tee /tmp/clang-tidy-warning-report/configure.log || configure_status=$?
if [ "$configure_status" -eq 0 ]; then
cmake --build build --target shell test-z3 -k 0 \
cmake --build build --target shell test-z3 -- -k 0 \
2>&1 | tee /tmp/clang-tidy-warning-report/build.log || build_status=$?
else
printf 'configure failed; build skipped\n' | tee /tmp/clang-tidy-warning-report/build.log