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

[main] Rebuild for protobuf423 while accounting for change in versioning scheme #188

Merged
merged 9 commits into from
Jun 28, 2023
24 changes: 18 additions & 6 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions .azure-pipelines/azure-pipelines-osx.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions .ci_support/linux_64_libgrpc1.55libprotobuf4.23.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
c_compiler:
- gcc
c_compiler_version:
- '12'
cdt_name:
- cos6
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- gxx
cxx_compiler_version:
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
libabseil:
- '20230125'
libgrpc:
- '1.55'
libprotobuf:
- 4.23.2
target_platform:
- linux-64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- - libgrpc
- libprotobuf
33 changes: 33 additions & 0 deletions .ci_support/linux_aarch64_libgrpc1.55libprotobuf4.23.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
BUILD:
- aarch64-conda_cos7-linux-gnu
c_compiler:
- gcc
c_compiler_version:
- '12'
cdt_arch:
- aarch64
cdt_name:
- cos7
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- gxx
cxx_compiler_version:
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
libabseil:
- '20230125'
libgrpc:
- '1.55'
libprotobuf:
- 4.23.2
target_platform:
- linux-aarch64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- - libgrpc
- libprotobuf
29 changes: 29 additions & 0 deletions .ci_support/linux_ppc64le_libgrpc1.55libprotobuf4.23.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
c_compiler:
- gcc
c_compiler_version:
- '12'
cdt_name:
- cos7
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- gxx
cxx_compiler_version:
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
libabseil:
- '20230125'
libgrpc:
- '1.55'
libprotobuf:
- 4.23.2
target_platform:
- linux-ppc64le
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- - libgrpc
- libprotobuf
11 changes: 11 additions & 0 deletions .ci_support/migrations/protobuf423.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
__migrator:
build_number: 1
kind: version
migration_number: 2
libgrpc:
- '1.54'
- '1.55'
libprotobuf:
- '3.21'
- '4.23.2'
migrator_ts: 1684932016.2362208
29 changes: 29 additions & 0 deletions .ci_support/osx_64_libgrpc1.55libprotobuf4.23.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.12'
c_compiler:
- clang
c_compiler_version:
- '15'
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- clangxx
cxx_compiler_version:
- '15'
libabseil:
- '20230125'
libgrpc:
- '1.55'
libprotobuf:
- 4.23.2
macos_machine:
- x86_64-apple-darwin13.4.0
target_platform:
- osx-64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- - libgrpc
- libprotobuf
29 changes: 29 additions & 0 deletions .ci_support/osx_arm64_libgrpc1.55libprotobuf4.23.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
MACOSX_DEPLOYMENT_TARGET:
- '11.0'
c_compiler:
- clang
c_compiler_version:
- '15'
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- clangxx
cxx_compiler_version:
- '15'
libabseil:
- '20230125'
libgrpc:
- '1.55'
libprotobuf:
- 4.23.2
macos_machine:
- arm64-apple-darwin20.0.0
target_platform:
- osx-arm64
zip_keys:
- - c_compiler_version
- cxx_compiler_version
- - libgrpc
- libprotobuf
55 changes: 45 additions & 10 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ set ANT_HOME=
set AZURE_EXTENSION_DIR=
set AZURE_HTTP_USER_AGENT=

set "BAZEL_BUILD_OPTS=--cxxopt=/std:c++17"

bash -lx ./compile.sh
if errorlevel 1 exit 1

Expand Down
11 changes: 8 additions & 3 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ fi
# For debugging purposes, you can add
# --logging=6 --subcommands --verbose_failures
# This is though too much log output for Travis CI.
export LIBPROTOBUF_VERSION=$(conda list -p $PREFIX libprotobuf | grep -v '^#' | tr -s ' ' | cut -f 2 -d ' ')
export BAZEL_BUILD_OPTS="--crosstool_top=//bazel_toolchain:toolchain --define=PROTOBUF_INCLUDE_PATH=${PREFIX}/include --cpu=${TARGET_CPU}"
# Extract minor.patch from libprotobuf version, that is the protoc version
# The protobuf-java needs to be manually bumped if necessary
# See https://protobuf.dev/support/version-support/
export PROTOC_VERSION=$(conda list -p $PREFIX libprotobuf | grep -v '^#' | tr -s ' ' | cut -f 2 -d ' ' | sed -E 's/^[0-9]+\.([0-9]+\.[0-9]+)$/\1/')
export PROTOBUF_JAVA_MAJOR_VERSION="3"
export BAZEL_BUILD_OPTS="--crosstool_top=//bazel_toolchain:toolchain --define=PROTOBUF_INCLUDE_PATH=${PREFIX}/include --cpu=${TARGET_CPU} --cxxopt=-std=c++17"
export EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk"
sed -ie "s:LIBPROTOBUF_VERSION:${LIBPROTOBUF_VERSION}:" WORKSPACE
sed -ie "s:PROTOC_VERSION:${PROTOC_VERSION}:" WORKSPACE
sed -ie "s:PROTOBUF_JAVA_MAJOR_VERSION:${PROTOBUF_JAVA_MAJOR_VERSION}:" WORKSPACE
sed -ie "s:\${INSTALL_NAME_TOOL}:${INSTALL_NAME_TOOL:-install_name_tool}:" src/BUILD
sed -ie "s:\${PREFIX}:${PREFIX}:" src/BUILD
sed -ie "s:\${BUILD_PREFIX}:${BUILD_PREFIX}:" third_party/grpc/BUILD
Expand Down
28 changes: 14 additions & 14 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,22 @@ source:
patches:
- patches/0001-allow-args-to-be-passed-to-bazel_build.patch
- patches/0002-Build-with-native-dependencies.patch # [unix]
- patches/0003-Parametrize-LIBPROTOBUF_VERSION.patch # [unix]
# This patch ensures that the relevant version of protobuf-java matches libprotobuf.
# Note that "relevant" here means minor.patch, where minor is based on the last two
# digits of the calendar year. The major version may be different per language, see
# https://protobuf.dev/support/version-support/
# If the java major version changes, it needs to be bumped manually in build.sh.
- patches/0003-Match-version-of-protobuf-java-with-libprotobuf.patch # [unix]
- patches/0004-Use-conda-packages-for-build-tools.patch # [build_platform != target_platform]
- patches/0005-grpc-java-plugin-from-build.patch # [unix]
- patches/0006-bazel-bin-loader-path.patch # [osx]
- patches/0007-Adjust-cross-bazel-resultpath.patch # [build_platform != target_platform]
- patches/0008-win-Disable-VS-activation-and-make-build-verbose.patch
# backport https://github.com/bazelbuild/bazel/pull/18608 (squashed; as of 2023-06-24)
- patches/0009-Update-windows-VS-detection-code-to-account-for-new-.patch

build:
number: 0
number: 1
ignore_prefix_files: true
binary_relocation: false

Expand All @@ -28,13 +35,9 @@ requirements:
- {{ compiler('cxx') }}
- sed # [unix]
- openjdk >=8,<17 # [unix]
# 2022/05/14
# Keep libabseil here so that the pinning is maintained between
# build and host
- libabseil # [unix]
- libgrpc # [unix]
# we need $BUILD_PREFIX/bin/{grpc_cpp_plugin,grpc_java_plugin,protoc}
- grpc_java_plugin # [unix]
# - grpc_java_plugin {{ libgrpc }} # [unix]
- libgrpc # [unix]
- libprotobuf # [unix]
- ijar {{ version }} # [build_platform != target_platform]
- singlejar {{ version }} # [build_platform != target_platform]
Expand All @@ -43,12 +46,9 @@ requirements:
- unzip # [linux]
- python * # [win]
host:
# note: libabseil's ABI depends on C++ version used to compile it,
# and we must match that C++ version to compile bazel; the shared
# libabseil builds currently (20220623.0) use C++17
- libabseil # [unix]
- libgrpc # [unix]
- libprotobuf # [unix]
- libabseil # [unix]
- libgrpc # [unix]
- libprotobuf # [unix]
- openjdk >=8,<17 # [win]
- posix # [win]
run:
Expand Down
Loading