ci: workflow for testing CMake#99
Conversation
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (22)
💤 Files with no reviewable changes (22)
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
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}} |
There was a problem hiding this comment.
The ctest command should include --output-on-failure flag to display test output when tests fail, making debugging easier in CI environments.
| run: ctest -C ${{env.BUILD_TYPE}} | |
| run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure |
There was a problem hiding this comment.
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
Summary by CodeRabbit