Skip to content

feat: add CI/CD workflows, clang-format, and clang-tidy#21

Merged
melogtm merged 6 commits into
mainfrom
feat/ci-cd-lint-gate
Jul 11, 2026
Merged

feat: add CI/CD workflows, clang-format, and clang-tidy#21
melogtm merged 6 commits into
mainfrom
feat/ci-cd-lint-gate

Conversation

@melogtm

@melogtm melogtm commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Adds CI gate on PRs and a CD release pipeline on tag push.

What's included

CI (.github/workflows/ci.yml)

  • Triggers on all PRs and pushes to main
  • Two jobs on ubuntu-latest:
  • build-and-test — runs ./run_tests.sh (configure + build + ctest)
  • lint — clang-format --dry-run --Werror + clang-tidy against all source
  • Any PR with build failure, test failure, or formatting violation is blocked

CD (.github/workflows/release.yml)

  • Triggers on v*.. tag push
  • Builds the shell in Release mode and attaches build/shell to a GitHub Release
    Tooling config
  • .clang-format — LLVM-based, 4-space indent, 100-column limit, tuned to match existing code style
  • .clang-tidy — scoped checks (bugprone, clang-analyzer, performance, portability, readability) with suppressions for noise irrelevant to a C11 codebase

Source changes

  • All source files formatted with clang-format for a clean baseline (no CI violation on merge)
  • pipeline.c: fixed math precedence parens and widening cast
  • execute.c: removed dead store of glob_eligible
  • README.md: added CI status badge

Verification

  • clang-format --dry-run --Werror passes clean
  • clang-tidy reports zero warnings
  • All 5 test suites pass (100%)

#20

- Add .clang-format (LLVM-based, 4-space indent, 100-col limit)
- Add .clang-tidy with scoped bugprone/clang-analyzer/performance/
  portability/readability checks, suppressing noise for C11 idioms
- Add CI workflow (ci.yml): build+test and lint on PRs and main pushes
- Add CD workflow (release.yml): GitHub Release on v*.*.* tag push
- Apply clang-format to all source files for a clean baseline
- Fix pipeline.c: math precedence parens and widening cast
- Fix execute.c: remove dead store of glob_eligible
- Add CI status badge to README.md
Copilot AI review requested due to automatic review settings July 11, 2026 14:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds CI/CD automation and C/C++ formatting/linting configuration to enforce consistent style and quality checks, along with repository-wide clang-format reformatting and a few small source/test cleanups.

Changes:

  • Added GitHub Actions CI workflow for build/test and lint (clang-format + clang-tidy).
  • Added GitHub Actions release workflow to publish a built shell artifact on semver tag pushes.
  • Introduced .clang-format / .clang-tidy and reformatted existing C sources/tests to match.

Reviewed changes

Copilot reviewed 21 out of 24 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/test_pipeline.c Formatting-only changes and include reordering in pipeline tests.
tests/test_input.c Formatting-only changes to input-splitting tests and include ordering.
tests/test_glob.c Formatting-only changes to glob expansion tests.
tests/test_framework.h Reflowed assertion macros to match clang-format output.
tests/test_execute.c Formatting-only changes and include reordering in execute tests.
tests/test_builtins.c Formatting-only changes and minor readability reflow in builtins tests.
src/utils/utils.h Formatting-only changes (spacing/wrapping).
src/utils/utils.c Formatting-only changes (indentation/wrapping).
src/pipeline.c Formatting and adjusted pipe FD allocation expression.
src/main.c Formatting-only changes and include ordering.
src/input.c Formatting-only changes and include ordering.
src/glob.c Formatting-only changes and include ordering.
src/execute.c Formatting and minor cleanup (removed unused local) in execute path.
src/builtins.c Formatting-only changes and wrapping long initializer lines.
README.md Added CI badge at top and reflowed content to match formatting baseline.
include/pipeline.h Formatting-only changes.
include/input.h Formatting-only changes.
include/glob_expand.h Formatting-only changes.
include/execute.h Formatting-only changes.
include/builtins.h Formatting-only changes.
.github/workflows/release.yml Added tag-triggered release workflow to build and attach build/shell.
.github/workflows/ci.yml Added PR/push CI workflow with build/test and lint jobs.
.clang-tidy Added clang-tidy checks configuration.
.clang-format Added clang-format style configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml
Comment thread src/pipeline.c
melogtm and others added 5 commits July 11, 2026 14:25
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@melogtm melogtm merged commit 25e59dd into main Jul 11, 2026
2 checks passed
@melogtm melogtm deleted the feat/ci-cd-lint-gate branch July 11, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants