-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
feat: create google-cloud-cpp-core
feedstock
#24315
Merged
h-vetinari
merged 32 commits into
conda-forge:main
from
coryan:feat-shard-google-cloud-cpp-pr1
Dec 5, 2023
Merged
Changes from 31 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
39e782a
feat: create `google-cloud-cpp-core` feedstock
coryan 161c3ba
Fix lints
coryan 38f48c3
Fix Windows build
coryan b5f66f1
Fix test script for Windows
coryan 6c15afb
Also test for version.h on Windows
coryan b369852
Another round of fixes for Windows
coryan a55bd56
Fix for loop (again)
coryan c082f20
Fix for loop (again)
coryan c0d7646
Fix build step on Windows
coryan a7b0750
Fix install step on Windows
coryan bcff933
Fix variable expansion
coryan ba80882
Fix install for oauth2 on Windows
coryan 3111675
Don't mess with ZLIB just yet
coryan dfe25f2
Revert "Don't mess with ZLIB just yet"
coryan 41e27af
Include patches to simplify `find_package(CURL)`
coryan 664f62a
Address review comments
coryan 00bd6f5
Another attempt at fixing the macOS build
coryan 67e2b49
Hmm... the build says `libcxx` is needed
coryan f61f0a5
Another attempt at fixing macOS
coryan 841aa0a
Apparently libcxx is needed for each subpackage
coryan 09426e7
Remove stale comments
coryan f1d90b9
Rename install scripts
coryan 497ba1e
Remove devel -> devel run_exports
coryan 5594921
No foo -> libgoogle-cloud-comon in run_exports
coryan 1cabbae
Rename libgoogle-cloud-common to libgoogle-cloud
coryan 934689b
Reorder macro definitions
coryan e51d89e
Adjust build and install scripts too
coryan 612674a
Fix comments
coryan ceea4eb
Address review comments
coryan 75408ad
Fix library names under Windows
coryan 10e865d
I missed some details on Windows
coryan a7e1cef
Address review comments
coryan 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 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,74 @@ | ||
@echo on | ||
setlocal EnableDelayedExpansion | ||
|
||
:: CMake does not like paths with \ characters | ||
set LIBRARY_PREFIX="%LIBRARY_PREFIX:\=/%" | ||
set BUILD_PREFIX="%BUILD_PREFIX:\=/%" | ||
set SRC_DIR="%SRC_DIR:\=/%" | ||
|
||
:: Compile the common libraries. These are shared by other feedstocks | ||
:: and by the subpackages in this feedstock. | ||
cmake -G "Ninja" ^ | ||
-S . -B .build/common ^ | ||
-DGOOGLE_CLOUD_CPP_ENABLE=__common__ ^ | ||
-DBUILD_TESTING=OFF ^ | ||
-DBUILD_SHARED_LIBS=OFF ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DCMAKE_CXX_STANDARD=17 ^ | ||
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ | ||
-DCMAKE_MODULE_PATH="%LIBRARY_PREFIX%/lib/cmake" ^ | ||
-DCMAKE_INSTALL_LIBDIR=lib ^ | ||
-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF ^ | ||
-DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
|
||
cmake --build .build/common --config Release | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
|
||
cmake --install .build/common --prefix stage | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
|
||
set STAGE="%cd:\=/%" | ||
|
||
:: These subpackages are the most commonly used features of google-cloud-cpp. | ||
:: We want to compile them in the core feedstock. | ||
FOR %%G IN (oauth2 bigtable storage spanner) DO ( | ||
cmake -G "Ninja" ^ | ||
-S . -B .build/%%G ^ | ||
-DGOOGLE_CLOUD_CPP_ENABLE=%%G ^ | ||
-DGOOGLE_CLOUD_CPP_USE_INSTALLED_COMMON=ON ^ | ||
-DCMAKE_PREFIX_PATH="%STAGE%/stage" ^ | ||
-DBUILD_TESTING=OFF ^ | ||
-DBUILD_SHARED_LIBS=OFF ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DCMAKE_CXX_STANDARD=17 ^ | ||
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ | ||
-DCMAKE_MODULE_PATH="%LIBRARY_PREFIX%/lib/cmake" ^ | ||
-DCMAKE_INSTALL_LIBDIR=lib ^ | ||
-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF ^ | ||
-DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
|
||
cmake --build .build/%%G --config Release | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
) | ||
|
||
:: `pubsub` must to be compiled with `iam` and policytroubleshooter with `iam` | ||
cmake -G "Ninja" ^ | ||
-S . -B .build/pubsub ^ | ||
-DGOOGLE_CLOUD_CPP_ENABLE=pubsub,iam,policytroubleshooter ^ | ||
-DGOOGLE_CLOUD_CPP_USE_INSTALLED_COMMON=ON ^ | ||
-DCMAKE_PREFIX_PATH="%STAGE%/stage" ^ | ||
-DBUILD_TESTING=OFF ^ | ||
-DBUILD_SHARED_LIBS=OFF ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DCMAKE_CXX_STANDARD=17 ^ | ||
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ | ||
-DCMAKE_MODULE_PATH="%LIBRARY_PREFIX%/lib/cmake" ^ | ||
-DCMAKE_INSTALL_LIBDIR=lib ^ | ||
-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF ^ | ||
-DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
|
||
cmake --build .build/pubsub --config Release | ||
if %ERRORLEVEL% neq 0 exit 1 |
This file contains 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,69 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
export OPENSSL_ROOT_DIR=$PREFIX | ||
|
||
if [[ "${target_platform}" == osx-* ]]; then | ||
# See https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk | ||
CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" | ||
fi | ||
|
||
echo "$(date -u '+%Y-%m-%dT%H:%M:%SZ'): Building __common__ features..." | ||
cmake ${CMAKE_ARGS} \ | ||
-GNinja -S . -B .build/common \ | ||
-DGOOGLE_CLOUD_CPP_ENABLE=__common__ \ | ||
-DBUILD_TESTING=OFF \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DOPENSSL_ROOT_DIR=$PREFIX \ | ||
-DCMAKE_BUILD_TYPE=release \ | ||
-DCMAKE_CXX_STANDARD=17 \ | ||
-DCMAKE_INSTALL_PREFIX=$PREFIX \ | ||
-DCMAKE_INSTALL_LIBDIR=lib \ | ||
-DProtobuf_PROTOC_EXECUTABLE=$BUILD_PREFIX/bin/protoc \ | ||
-DGOOGLE_CLOUD_CPP_GRPC_PLUGIN_EXECUTABLE=$BUILD_PREFIX/bin/grpc_cpp_plugin \ | ||
-DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF | ||
|
||
cmake --build .build/common | ||
cmake --install .build/common --prefix .build/stage | ||
echo "$(date -u '+%Y-%m-%dT%H:%M:%SZ'): DONE - Building __common__ features" | ||
|
||
for feature in oauth2 bigtable spanner storage; do | ||
echo "$(date -u '+%Y-%m-%dT%H:%M:%SZ'): Building ${feature}" | ||
cmake ${CMAKE_ARGS} \ | ||
-GNinja -S . -B .build/${feature} \ | ||
-DGOOGLE_CLOUD_CPP_ENABLE=${feature} \ | ||
-DGOOGLE_CLOUD_CPP_USE_INSTALLED_COMMON=ON \ | ||
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${PWD}/.build/stage" \ | ||
-DBUILD_TESTING=OFF \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DOPENSSL_ROOT_DIR=$PREFIX \ | ||
-DCMAKE_BUILD_TYPE=release \ | ||
-DCMAKE_CXX_STANDARD=17 \ | ||
-DCMAKE_INSTALL_PREFIX=$PREFIX \ | ||
-DCMAKE_INSTALL_LIBDIR=lib \ | ||
-DProtobuf_PROTOC_EXECUTABLE=$BUILD_PREFIX/bin/protoc \ | ||
-DGOOGLE_CLOUD_CPP_GRPC_PLUGIN_EXECUTABLE=$BUILD_PREFIX/bin/grpc_cpp_plugin \ | ||
-DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF | ||
cmake --build .build/${feature} | ||
echo "$(date -u '+%Y-%m-%dT%H:%M:%SZ'): DONE - Building ${feature}" | ||
done | ||
|
||
echo "$(date -u '+%Y-%m-%dT%H:%M:%SZ'): Building pubsub" | ||
cmake ${CMAKE_ARGS} \ | ||
-GNinja -S . -B .build/pubsub \ | ||
-DGOOGLE_CLOUD_CPP_ENABLE=pubsub,iam,policytroubleshooter \ | ||
-DGOOGLE_CLOUD_CPP_USE_INSTALLED_COMMON=ON \ | ||
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${PWD}/.build/stage" \ | ||
-DBUILD_TESTING=OFF \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DOPENSSL_ROOT_DIR=$PREFIX \ | ||
-DCMAKE_BUILD_TYPE=release \ | ||
-DCMAKE_CXX_STANDARD=17 \ | ||
-DCMAKE_INSTALL_PREFIX=$PREFIX \ | ||
-DCMAKE_INSTALL_LIBDIR=lib \ | ||
-DProtobuf_PROTOC_EXECUTABLE=$BUILD_PREFIX/bin/protoc \ | ||
-DGOOGLE_CLOUD_CPP_GRPC_PLUGIN_EXECUTABLE=$BUILD_PREFIX/bin/grpc_cpp_plugin \ | ||
-DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF | ||
cmake --build .build/pubsub | ||
echo "$(date -u '+%Y-%m-%dT%H:%M:%SZ'): DONE - Building pubsub" |
This file contains 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 @@ | ||
# The default at [1] is 10.9 and abseil does not compile with that | ||
# [1]: https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml | ||
MACOSX_DEPLOYMENT_TARGET: | ||
- 10.13 # [osx and x86_64] | ||
This file contains 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,53 @@ | ||
@echo on | ||
setlocal EnableDelayedExpansion | ||
|
||
:: CMake does not like paths with \ characters | ||
set LIBRARY_PREFIX="%LIBRARY_PREFIX:\=/%" | ||
set BUILD_PREFIX="%BUILD_PREFIX:\=/%" | ||
set SRC_DIR="%SRC_DIR:\=/%" | ||
|
||
:: Once DLLs are working, we should install the non-devel packages using | ||
:: cmake --install .build/%FEATURE% --component google_cloud_cpp_runtime | ||
:: and the devel packages using | ||
:: cmake --install .build/%FEATURE% --component google_cloud_cpp_development | ||
|
||
if [%PKG_NAME%] == [libgoogle-cloud] ( | ||
REM TODO: fix when DLL support comes along | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-devel] ( | ||
REM cmake --install .build/common --component google_cloud_cpp_development | ||
cmake --install .build/common | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-bigtable] ( | ||
REM TODO: fix when DLL support comes along | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-bigtable-devel] ( | ||
cmake --install .build/bigtable | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-oauth2] ( | ||
REM TODO: fix when DLL support comes along | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-oauth2-devel] ( | ||
cmake --install .build/oauth2 | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-spanner] ( | ||
REM TODO: fix when DLL support comes along | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-spanner-devel] ( | ||
cmake --install .build/spanner | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-storage] ( | ||
REM TODO: fix when DLL support comes along | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-storage-devel] ( | ||
cmake --install .build/storage | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-pubsub] ( | ||
REM TODO: fix when DLL support comes along | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-pubsub-devel] ( | ||
cmake --install .build/pubsub | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-iam] ( | ||
REM Nothing to do, installed by pubsub | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-iam-devel] ( | ||
REM Nothing to do, installed by pubsub | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-policytroubleshooter] ( | ||
REM Nothing to do, installed by pubsub | ||
) else if [%PKG_NAME%] == [libgoogle-cloud-policytroubleshooter-devel] ( | ||
REM Nothing to do, installed by pubsub | ||
) |
This file contains 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,33 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
case "${PKG_NAME}" in | ||
libgoogle-cloud-devel) | ||
cmake --install .build/common --component google_cloud_cpp_development | ||
;; | ||
libgoogle-cloud) | ||
cmake --install .build/common --component google_cloud_cpp_runtime | ||
;; | ||
libgoogle-cloud-iam-devel) | ||
# Do nothing, this is installed by `libgoogle-cloud-pubsub-devel`. | ||
;; | ||
libgoogle-cloud-iam) | ||
# Do nothing, this is installed by `libgoogle-cloud-pubsub`. | ||
;; | ||
libgoogle-cloud-policytroubleshooter-devel) | ||
# Do nothing, this is installed by `libgoogle-cloud-pubsub-devel`. | ||
;; | ||
libgoogle-cloud-policytroubleshooter) | ||
# Do nothing, this is installed by `libgoogle-cloud-pubsub`. | ||
;; | ||
libgoogle-cloud-*-devel) | ||
feature=${PKG_NAME/#libgoogle-cloud-/} | ||
feature=${feature/%-devel/} | ||
cmake --install .build/${feature} --component google_cloud_cpp_development | ||
;; | ||
libgoogle-cloud-*) | ||
feature=${PKG_NAME/#libgoogle-cloud-/} | ||
cmake --install .build/${feature} --component google_cloud_cpp_runtime | ||
;; | ||
esac |
Oops, something went wrong.
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.
Seeing issues with feedstock creation for this recipe. Think it has to do with the fact that we are modifying
MACOSX_DEPLOYMENT_TARGET
, but not restricting that modification toosx and x86_64
, which has an adverse affect on other architectures (likeosx and arm64
). So think we want to add a selector toMACOSX_DEPLOYMENT_TARGET
(as shown below)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.
Thanks, done in d4fe07d
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.
Not sure what's happening here. The
create_feedstocks
job still failed, but an empty https://github.com/conda-forge/google-cloud-cpp-core-feedstock got created already.