Skip to content

Add CI/CD Pipeline (GitHub Actions + GitLab CI)#4

Merged
vladiant merged 4 commits intomainfrom
add_ci_cd_pipeline
Mar 28, 2026
Merged

Add CI/CD Pipeline (GitHub Actions + GitLab CI)#4
vladiant merged 4 commits intomainfrom
add_ci_cd_pipeline

Conversation

@vladiant
Copy link
Copy Markdown
Collaborator

@vladiant vladiant commented Mar 28, 2026

Summary

Adds continuous integration pipelines for both GitHub Actions and GitLab CI, covering Python lint/type-check/test and C++ build/lint. Also fixes a potential integer overflow bug in the C++ extension caught by clang-tidy.

Changes

Added

  • GitHub Actions (workflows)
    • python.yml — ruff lint + format check, mypy type checking, pytest with coverage (≥75%) on Python 3.11 and 3.12
    • cpp.yml — CMake build with GCC and Clang matrix, clang-tidy lint (triggered only on cpp changes)
  • GitLab CI (.gitlab-ci.yml) — mirrors the GitHub Actions setup with equivalent lint, test, and build stages
  • pytest-cov added to dev dependencies (requirements-dev.txt, pyproject.toml)

Fixed

  • Integer overflow in fast_resize.cpp: static_cast<size_t>(src_w * src_h * channels) cast after multiplication; fixed to static_cast<size_t>(src_w) * src_h * channels to prevent overflow before widening (caught by bugprone-misplaced-widening-cast)

Files Changed

File Change
python.yml New — Python CI workflow
cpp.yml New — C++ CI workflow
.gitlab-ci.yml New — GitLab CI pipeline
CHANGELOG.md Added entries for CI and bugfix
pyproject.toml Version bump 1.0.2 → 1.1.0, added pytest-cov
requirements-dev.txt Added pytest-cov
fast_resize.cpp Fixed widening cast bug

Testing

  • All 30 tests pass
  • ruff check/format, mypy — all clean
  • C++ builds with both GCC and Clang
  • clang-tidy passes with bugprone-* as errors

Version Bump

MINOR 1.0.21.1.0 — new CI features + bugfix

@vladiant vladiant changed the title Add ci cd pipeline Add CI/CD Pipeline (GitHub Actions + GitLab CI) Mar 28, 2026
@vladiant vladiant merged commit 644be60 into main Mar 28, 2026
7 checks passed
@vladiant vladiant deleted the add_ci_cd_pipeline branch March 28, 2026 10:21
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.

1 participant