Skip to content

ci: workflow for testing CMake#99

Closed
hoony6134 wants to merge 2 commits into
mainfrom
hoony6134-ci-cmake-workflow
Closed

ci: workflow for testing CMake#99
hoony6134 wants to merge 2 commits into
mainfrom
hoony6134-ci-cmake-workflow

Conversation

@hoony6134

@hoony6134 hoony6134 commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • CMake 프로젝트를 단일 플랫폼에서 자동으로 빌드하고 테스트하는 GitHub Actions 워크플로우가 추가되었습니다.
    • NumCpp 라이브러리 관련 CMake 구성 및 설치 스크립트가 제거되었습니다.
    • 기존 CMake 빌드 시스템 관련 여러 자동 생성 파일과 메이크파일이 삭제되어 빌드 시스템이 정리되었습니다.

Copilot AI review requested due to automatic review settings July 25, 2025 04:50
@coderabbitai

coderabbitai Bot commented Jul 25, 2025

Copy link
Copy Markdown
Contributor
## Walkthrough

이 변경 사항은 GitHub Actions에 "CMake on a single platform"라는 새로운 워크플로우를 추가하여, main 브랜치에 대한 푸시 및 풀 리퀘스트 시 Ubuntu 환경에서 CMake 프로젝트의 빌드 및 테스트를 자동화하도록 설정합니다. 또한, CMake 관련 빌드 캐시, 설정, 메타데이터, 설치 스크립트, Makefile 등 빌드 시스템과 관련된 여러 자동 생성 파일 및 NumCpp 라이브러리의 CMake 구성 모듈과 설치 스크립트를 모두 삭제합니다.

## Changes

| 파일/경로                                         | 변경 요약                                   |
|---------------------------------------------------|---------------------------------------------|
| .github/workflows/cmake-single-platform.yml        | 단일 플랫폼에서 CMake 빌드 및 테스트 워크플로우 신규 추가 |
| build/CMakeCache.txt 및 build/CMakeFiles/***      | CMake 빌드 캐시, 컴파일러 설정, 빌드 메타데이터, 의존성, 진행 표시 등 빌드 관련 자동 생성 파일 전체 삭제 |
| build/Makefile 및 build/examples/Makefile          | CMake가 생성한 프로젝트 및 예제용 Makefile 삭제 |
| build/NumCppConfig.cmake 및 build/NumCppConfigVersion.cmake | NumCpp 라이브러리의 CMake 구성 모듈 및 버전 관리 파일 삭제 |
| build/cmake_install.cmake 및 build/examples/cmake_install.cmake | NumCpp 및 예제 설치 스크립트 삭제 |

## Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

## Poem

> 🐇  
> 깡총깡총 토끼가 빌드하러 왔어요,  
> 깃헙 액션 위에서 춤추는 CMake 쇼!  
> 우분투에서 테스트도 척척,  
> main 브랜치 지키는 든든한 토끼 럭,  
> 빌드 파일은 사라지고, 새길만 남았네,  
> 깔끔한 코드와 함께 오늘도 점프!  
>

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fb47800 and 5ecb54d.

⛔ Files ignored due to path filters (1)
  • build/CMakeFiles/4.0.3/CMakeDetermineCompilerABI_CXX.bin is excluded by !**/*.bin
📒 Files selected for processing (22)
  • build/CMakeCache.txt (0 hunks)
  • build/CMakeFiles/4.0.3/CMakeCXXCompiler.cmake (0 hunks)
  • build/CMakeFiles/CMakeConfigureLog.yaml (0 hunks)
  • build/CMakeFiles/CMakeDirectoryInformation.cmake (0 hunks)
  • build/CMakeFiles/CMakeRuleHashes.txt (0 hunks)
  • build/CMakeFiles/InstallScripts.json (0 hunks)
  • build/CMakeFiles/Makefile.cmake (0 hunks)
  • build/CMakeFiles/Makefile2 (0 hunks)
  • build/CMakeFiles/TargetDirectories.txt (0 hunks)
  • build/CMakeFiles/cmake.check_cache (0 hunks)
  • build/CMakeFiles/progress.marks (0 hunks)
  • build/CMakeFiles/tidy.dir/DependInfo.cmake (0 hunks)
  • build/CMakeFiles/tidy.dir/build.make (0 hunks)
  • build/CMakeFiles/tidy.dir/cmake_clean.cmake (0 hunks)
  • build/Makefile (0 hunks)
  • build/NumCppConfig.cmake (0 hunks)
  • build/NumCppConfigVersion.cmake (0 hunks)
  • build/cmake_install.cmake (0 hunks)
  • build/examples/CMakeFiles/CMakeDirectoryInformation.cmake (0 hunks)
  • build/examples/CMakeFiles/progress.marks (0 hunks)
  • build/examples/Makefile (0 hunks)
  • build/examples/cmake_install.cmake (0 hunks)
💤 Files with no reviewable changes (22)
  • build/CMakeFiles/CMakeRuleHashes.txt
  • build/CMakeFiles/CMakeDirectoryInformation.cmake
  • build/CMakeFiles/InstallScripts.json
  • build/CMakeFiles/progress.marks
  • build/examples/cmake_install.cmake
  • build/examples/CMakeFiles/progress.marks
  • build/CMakeFiles/cmake.check_cache
  • build/examples/CMakeFiles/CMakeDirectoryInformation.cmake
  • build/CMakeFiles/CMakeConfigureLog.yaml
  • build/examples/Makefile
  • build/CMakeFiles/tidy.dir/cmake_clean.cmake
  • build/CMakeFiles/TargetDirectories.txt
  • build/CMakeCache.txt
  • build/CMakeFiles/Makefile.cmake
  • build/NumCppConfigVersion.cmake
  • build/CMakeFiles/tidy.dir/build.make
  • build/cmake_install.cmake
  • build/CMakeFiles/4.0.3/CMakeCXXCompiler.cmake
  • build/Makefile
  • build/CMakeFiles/Makefile2
  • build/NumCppConfig.cmake
  • build/CMakeFiles/tidy.dir/DependInfo.cmake
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hoony6134-ci-cmake-workflow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

This PR adds a GitHub Actions workflow for continuous integration testing of a CMake-based project. The workflow configures automated building and testing on Ubuntu for pushes and pull requests to the main branch.

  • Adds CI workflow that builds CMake projects in Release mode
  • Configures automated testing using CTest
  • Sets up triggers for main branch pushes and pull requests

working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}

Copilot AI Jul 25, 2025

Copy link

Choose a reason for hiding this comment

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

The ctest command should include --output-on-failure flag to display test output when tests fail, making debugging easier in CI environments.

Suggested change
run: ctest -C ${{env.BUILD_TYPE}}
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure

Copilot uses AI. Check for mistakes.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 0

🧹 Nitpick comments (3)
.github/workflows/cmake-single-platform.yml (3)

25-29: -S 옵션과 Ninja 제너레이터로 명시적·고속 설정 제안
소스·빌드 디렉터리를 모두 밝혀 두면 가독성이 좋아지고, -G Ninja로 전환하면 Ubuntu 러너에서 빌드 속도가 크게 향상됩니다.

-run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
+run: |
+  cmake -S ${{github.workspace}} \
+        -B ${{github.workspace}}/build \
+        -G Ninja \
+        -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

30-33: 병렬 빌드 플래그로 CI 시간을 단축하세요
cmake --build--parallel $(nproc)(또는 -j)를 넘기면 모든 코어를 활용하여 빌드 시간이 단축됩니다.

-run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
+run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)

34-38: 테스트 실패 로그를 즉시 출력하도록 --output-on-failure 추가
실패 원인을 한눈에 파악할 수 있어 디버깅 효율이 높아집니다.

-run: ctest -C ${{env.BUILD_TYPE}}
+run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3977fbd and fb47800.

📒 Files selected for processing (1)
  • .github/workflows/cmake-single-platform.yml (1 hunks)

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 25, 2025
@hoony6134 hoony6134 closed this Jul 25, 2025
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