Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to conanfile.py and Enhance Build Configuration #12

Merged
merged 4 commits into from
Aug 3, 2024

Conversation

hankhsu1996
Copy link
Owner

@hankhsu1996 hankhsu1996 commented Aug 3, 2024

Overview

This PR introduces key improvements to the project's build configuration and CI pipeline.

Added

  • conanfile.py:

    • Migrated from conanfile.txt to conanfile.py for enhanced control over the build process.
    • Included ninja and ccache under tool_requires for optimized build performance.
    • Added Catch2 under test_requires to clearly distinguish test dependencies.
  • CMake Configuration:

    • Configured ccache as the compiler launcher by setting:
      • CMAKE_C_COMPILER_LAUNCHER = ccache
      • CMAKE_CXX_COMPILER_LAUNCHER = ccache
    • Set Ninja as the default build generator (tc.generator = "Ninja").
    • Updated the generate() method to create a ConanPresets.json, enabling extension with a custom CMakePresets.json.
  • CI Integration:

    • Implemented ccache caching in the GitHub Actions workflow to speed up subsequent builds.

Changed

  • CI Workflow (ci.yml):

    • Updated to use the new release and debug CMake presets instead of the previous default preset.
  • Documentation:

    • Updated the README to reflect the new build and test instructions, emphasizing the use of ccache and ninja for faster builds.

Benefits

  • Faster Builds: Leveraging ccache and ninja significantly reduces build times, especially in CI environments.
  • Improved Control: The migration to conanfile.py offers greater flexibility in managing dependencies and build configurations.
  • Streamlined CI: The updated presets simplify the CI process, making it more maintainable and efficient.

@hankhsu1996 hankhsu1996 changed the title Rework Conan and CMake flow Migrate to conanfile.py and Enhance Build Configuration Aug 3, 2024
@hankhsu1996 hankhsu1996 merged commit 63358f9 into main Aug 3, 2024
3 checks passed
@hankhsu1996 hankhsu1996 deleted the feature/ccache branch August 3, 2024 16:44
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