-
-
Notifications
You must be signed in to change notification settings - Fork 6
Add experimental VCPKG packaging #58
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
Draft
oleg-nenashev
wants to merge
4
commits into
main
Choose a base branch
from
vcpkg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+143
−9
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b50b0d7
Add experimental VCPJG implementation
oleg-nenashev 2ea9494
Add missing Portfile
oleg-nenashev 9959dec
Merge branch 'main' of https://github.com/testcontainers/testcontaine…
oleg-nenashev a830abb
Save progress (dependency still fails)
oleg-nenashev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| testcontainers-bridge provides CMake targets: | ||
|
|
||
| find_package(testcontainers-bridge CONFIG REQUIRED) | ||
| target_link_libraries(main PRIVATE testcontainers-bridge::testcontainers-bridge) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "name": "testcontainers-bridge", | ||
| "version-string": "0.1.0", | ||
| "description": "Testcontainers Go bridge library for native languages", | ||
| "homepage": "https://github.com/testcontainers/testcontainers-native", | ||
| "license": "MIT", | ||
| "dependencies":[ | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake-config", | ||
| "host": true | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Build using the port directory as source. We expect this repository to be | ||
| # available to the vcpkg build as a submodule or local path. If building from | ||
| # a remote registry, replace this with vcpkg_from_github / vcpkg_from_git. | ||
|
|
||
| set(ROOT_SRC ${CURRENT_PORT_DIR}/../../testcontainers-c) | ||
|
|
||
|
|
||
| # Configure from repository root so that testcontainers-bridge is built first | ||
| vcpkg_cmake_configure( | ||
| SOURCE_PATH ${ROOT_SRC} | ||
| GENERATOR "Unix Makefiles" | ||
| OPTIONS | ||
| -DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
| ) | ||
|
|
||
| vcpkg_build_cmake() | ||
|
|
||
| # Install from CMake install rules | ||
| vcpkg_install_cmake() | ||
|
|
||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
|
|
||
| # Add a short README to the package to indicate local build origin | ||
| file(WRITE ${CURRENT_PACKAGES_DIR}/debug/share/${PORT}/README "This package was built from local repo source.\n") | ||
|
|
||
| file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
| vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| testcontainers-c provides CMake targets: | ||
|
|
||
| find_package(testcontainers-c CONFIG REQUIRED) | ||
| target_link_libraries(main PRIVATE testcontainers-c::testcontainers-c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "name": "testcontainers-c", | ||
| "version-string": "0.1.0", | ||
| "description": "Testcontainers library for C - C API and shared library", | ||
| "homepage": "https://github.com/testcontainers/testcontainers-native", | ||
| "license": "MIT", | ||
| "dependencies": [ | ||
| { | ||
| "name": "testcontainers-bridge", | ||
| "host": true | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake-config", | ||
| "host": true | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| prefix=@CMAKE_INSTALL_PREFIX@ | ||
| exec_prefix=@CMAKE_INSTALL_PREFIX@ | ||
| libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ | ||
| includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ | ||
|
|
||
| Name: @TARGET_NAME@ | ||
| Description: @TARGET_DESCRIPTION@ | ||
| Version: @TARGET_VERSION@ | ||
|
|
||
| Requires: | ||
| Libs: -L${libdir} | ||
| Cflags: -I${includedir} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @PACKAGE_INIT@ | ||
|
|
||
| include("${CMAKE_CURRENT_LIST_DIR}/testcontainers-bridge-targets.cmake") | ||
|
|
||
| check_required_components(testcontainers-bridge) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That part does not work in
vcpkgruns yet, even if local installation is fine.Likely, the port files are messed up somehow