Skip to content

Build and deploy MCP C++ SDK with conan#1

Merged
sparesparrow merged 1 commit intomasterfrom
cursor/build-and-deploy-mcp-c-sdk-with-conan-d5d3
Sep 29, 2025
Merged

Build and deploy MCP C++ SDK with conan#1
sparesparrow merged 1 commit intomasterfrom
cursor/build-and-deploy-mcp-c-sdk-with-conan-d5d3

Conversation

@sparesparrow
Copy link
Owner

Integrate Conan, a root CMake build, and GitHub Actions CI/CD with AWS S3 deployment to establish a professional C++ SDK build and release pipeline.


Open in Cursor Open in Web

Co-authored-by: dallheimal <dallheimal@gmail.com>
@cursor
Copy link

cursor bot commented Sep 29, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@sparesparrow sparesparrow marked this pull request as ready for review September 29, 2025 11:58
@sparesparrow
Copy link
Owner Author

@cursor fix failing workflows:

Run conan install . -of build -s build_type=Release --build=missing

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=15
os=Macos

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=15
os=Macos


======== Computing dependency graph ========
Graph root
    conanfile.py (tinymcp/0.1.0): /Users/runner/work/TinyMCP/TinyMCP/conanfile.py

======== Computing necessary packages ========

======== Installing packages ========

======== Finalizing install (deploy, generators) ========
conanfile.py (tinymcp/0.1.0): Calling generate()
conanfile.py (tinymcp/0.1.0): Generators folder: /Users/runner/work/TinyMCP/TinyMCP/build
conanfile.py (tinymcp/0.1.0): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (tinymcp/0.1.0): CMakeToolchain: Preset 'conan-release' added to CMakePresets.json.
    (cmake>=3.23) cmake --preset conan-release
    (cmake<3.23) cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake  -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release
conanfile.py (tinymcp/0.1.0): CMakeToolchain generated: /Users/runner/work/TinyMCP/TinyMCP/build/CMakePresets.json
conanfile.py (tinymcp/0.1.0): CMakeToolchain generated: /Users/runner/work/TinyMCP/TinyMCP/CMakeUserPresets.json
conanfile.py (tinymcp/0.1.0): Generating aggregated env files
conanfile.py (tinymcp/0.1.0): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
Install finished successfully
usage: conan build [-h] [-v [V]] [-cc CORE_CONF] [-f FORMAT]
                   [--out-file OUT_FILE] [--name NAME] [--version VERSION]
                   [--user USER] [--channel CHANNEL] [-g GENERATOR]
                   [-of OUTPUT_FOLDER] [-d DEPLOYER]
                   [--deployer-folder DEPLOYER_FOLDER] [--build-require]
                   [--envs-generation {false}] [-b BUILD] [-r REMOTE | -nr]
                   [-u [UPDATE]] [-pr PROFILE] [-pr:b PROFILE_BUILD]
                   [-pr:h PROFILE_HOST] [-pr:a PROFILE_ALL] [-o OPTIONS]
                   [-o:b OPTIONS_BUILD] [-o:h OPTIONS_HOST] [-o:a OPTIONS_ALL]
                   [-s SETTINGS] [-s:b SETTINGS_BUILD] [-s:h SETTINGS_HOST]
                   [-s:a SETTINGS_ALL] [-c CONF] [-c:b CONF_BUILD]
                   [-c:h CONF_HOST] [-c:a CONF_ALL] [-l LOCKFILE]
                   [--lockfile-partial] [--lockfile-out LOCKFILE_OUT]
                   [--lockfile-clean]
                   [--lockfile-overrides LOCKFILE_OVERRIDES]
                   path
conan build: error: unrecognized arguments: build
ERROR: Exiting with code: 2
Error: Process completed with exit code 2.
Run conan install . -of build -s build_type=Release --build=missing

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=194
os=Windows

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=194
os=Windows


======== Computing dependency graph ========
Graph root
    conanfile.py (tinymcp/0.1.0): D:\a\TinyMCP\TinyMCP\conanfile.py

======== Computing necessary packages ========

======== Installing packages ========

======== Finalizing install (deploy, generators) ========
conanfile.py (tinymcp/0.1.0): Calling generate()
conanfile.py (tinymcp/0.1.0): Generators folder: D:\a\TinyMCP\TinyMCP\build
conanfile.py (tinymcp/0.1.0): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (tinymcp/0.1.0): CMakeToolchain: Preset 'conan-default' added to CMakePresets.json.
    (cmake>=3.23) cmake --preset conan-default
    (cmake<3.23) cmake <path> -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake  -DCMAKE_POLICY_DEFAULT_CMP0091=NEW
conanfile.py (tinymcp/0.1.0): CMakeToolchain generated: D:\a\TinyMCP\TinyMCP\build\CMakePresets.json
conanfile.py (tinymcp/0.1.0): CMakeToolchain generated: D:\a\TinyMCP\TinyMCP\CMakeUserPresets.json
conanfile.py (tinymcp/0.1.0): Generating aggregated env files
conanfile.py (tinymcp/0.1.0): Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
Install finished successfully
usage: conan build [-h] [-v [V]] [-cc CORE_CONF] [-f FORMAT]
                   [--out-file OUT_FILE] [--name NAME] [--version VERSION]
                   [--user USER] [--channel CHANNEL] [-g GENERATOR]
                   [-of OUTPUT_FOLDER] [-d DEPLOYER]
                   [--deployer-folder DEPLOYER_FOLDER] [--build-require]
                   [--envs-generation {false}] [-b BUILD] [-r REMOTE | -nr]
                   [-u [UPDATE]] [-pr PROFILE] [-pr:b PROFILE_BUILD]
                   [-pr:h PROFILE_HOST] [-pr:a PROFILE_ALL] [-o OPTIONS]
                   [-o:b OPTIONS_BUILD] [-o:h OPTIONS_HOST] [-o:a OPTIONS_ALL]
                   [-s SETTINGS] [-s:b SETTINGS_BUILD] [-s:h SETTINGS_HOST]
                   [-s:a SETTINGS_ALL] [-c CONF] [-c:b CONF_BUILD]
                   [-c:h CONF_HOST] [-c:a CONF_ALL] [-l LOCKFILE]
                   [--lockfile-partial] [--lockfile-out LOCKFILE_OUT]
                   [--lockfile-clean]
                   [--lockfile-overrides LOCKFILE_OVERRIDES]
                   path
conan build: error: unrecognized arguments: build
ERROR: Exiting with code: 2
Error: Process completed with exit code 1.
Run conan install . -of build -s build_type=Release --build=missing

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux


======== Computing dependency graph ========
Graph root
    conanfile.py (tinymcp/0.1.0): /home/runner/work/TinyMCP/TinyMCP/conanfile.py

======== Computing necessary packages ========

======== Installing packages ========

======== Finalizing install (deploy, generators) ========
conanfile.py (tinymcp/0.1.0): Calling generate()
conanfile.py (tinymcp/0.1.0): Generators folder: /home/runner/work/TinyMCP/TinyMCP/build
conanfile.py (tinymcp/0.1.0): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (tinymcp/0.1.0): CMakeToolchain: Preset 'conan-release' added to CMakePresets.json.
    (cmake>=3.23) cmake --preset conan-release
    (cmake<3.23) cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake  -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release
conanfile.py (tinymcp/0.1.0): CMakeToolchain generated: /home/runner/work/TinyMCP/TinyMCP/build/CMakePresets.json
conanfile.py (tinymcp/0.1.0): CMakeToolchain generated: /home/runner/work/TinyMCP/TinyMCP/CMakeUserPresets.json
conanfile.py (tinymcp/0.1.0): Generating aggregated env files
conanfile.py (tinymcp/0.1.0): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
Install finished successfully
usage: conan build [-h] [-v [V]] [-cc CORE_CONF] [-f FORMAT]
                   [--out-file OUT_FILE] [--name NAME] [--version VERSION]
                   [--user USER] [--channel CHANNEL] [-g GENERATOR]
                   [-of OUTPUT_FOLDER] [-d DEPLOYER]
                   [--deployer-folder DEPLOYER_FOLDER] [--build-require]
                   [--envs-generation {false}] [-b BUILD] [-r REMOTE | -nr]
                   [-u [UPDATE]] [-pr PROFILE] [-pr:b PROFILE_BUILD]
                   [-pr:h PROFILE_HOST] [-pr:a PROFILE_ALL] [-o OPTIONS]
                   [-o:b OPTIONS_BUILD] [-o:h OPTIONS_HOST] [-o:a OPTIONS_ALL]
                   [-s SETTINGS] [-s:b SETTINGS_BUILD] [-s:h SETTINGS_HOST]
                   [-s:a SETTINGS_ALL] [-c CONF] [-c:b CONF_BUILD]
                   [-c:h CONF_HOST] [-c:a CONF_ALL] [-l LOCKFILE]
                   [--lockfile-partial] [--lockfile-out LOCKFILE_OUT]
                   [--lockfile-clean]
                   [--lockfile-overrides LOCKFILE_OVERRIDES]
                   path
conan build: error: unrecognized arguments: build
ERROR: Exiting with code: 2
Error: Process completed with exit code 2.

@cursor
Copy link

cursor bot commented Sep 29, 2025

I updated the CI workflow in .github/workflows/ci.yml to correctly execute Conan builds and integrate automated CTest execution.

  • I changed conan build . -bf build to conan build . -of build in the Configure & Build step for build-linux, build-macos, and build-windows jobs, for correct output folder usage.
  • I added ctest --test-dir build --output-on-failure after conan build in these steps, integrating automated test execution and displaying failures.

Open in Cursor Open in Web

Learn more about Cursor Agents

@sparesparrow
Copy link
Owner Author

@cursor checks still failing

@cursor
Copy link

cursor bot commented Sep 29, 2025

I've updated the CI workflow to ensure a consistent build environment by explicitly setting the CMake version and improved test reliability by specifying the Release configuration for ctest across all platforms.

  • I added a "Setup CMake" step to the build-ubuntu, build-macos, and build-windows jobs in .github/workflows/ci.yml. This step uses jwlawson/actions-setup-cmake@v2 to install CMake version 3.27.x, ensuring a consistent build toolchain.
  • I modified the ctest command in the Run tests step for all build- jobs in .github/workflows/ci.yml. I appended -C Release to the command, explicitly instructing ctest to run tests against the Release build configuration.

Open in Cursor Open in Web

Learn more about Cursor Agents

@sparesparrow sparesparrow merged commit 2bd0fab into master Sep 29, 2025
0 of 3 checks passed
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