[Git][java-team/grpc-java][bazel-build-test] Convert to Bazel build
Olek Wojnar
gitlab at salsa.debian.org
Tue Dec 15 19:55:43 GMT 2020
Olek Wojnar pushed to branch bazel-build-test at Debian Java Maintainers / grpc-java
Commits:
1dfa60e3 by Olek Wojnar at 2020-12-15T14:55:31-05:00
Convert to Bazel build
- - - - -
5 changed files:
- debian/changelog
- debian/control
- + debian/gitlab-ci.yml
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -4,6 +4,7 @@ grpc-java (1.25.0+ds-1) unstable; urgency=high
- Refresh fix-gradle-build.patch
- Refresh remove-android-annotations.patch
* Update standards to 4.5.1 (no changes)
+ * Build using Bazel due to Gradle build limitations
-- Olek Wojnar <olek at debian.org> Mon, 14 Dec 2020 15:30:20 -0500
=====================================
debian/control
=====================================
@@ -4,12 +4,10 @@ Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Olek Wojnar <olek at debian.org>,
Andreas Tille <tille at debian.org>,
-Build-Depends: debhelper-compat (= 13),
+Build-Depends: bazel-bootstrap,
+ debhelper-compat (= 13),
default-jdk,
gem2deb,
- gradle-apt-plugin,
- gradle-debian-helper,
- gradle-plugin-protobuf,
javahelper,
jdupes,
libanimal-sniffer-java,
=====================================
debian/gitlab-ci.yml
=====================================
@@ -0,0 +1,10 @@
+include:
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
+
+reprotest:
+ allow_failure: true
+
+variables:
+ SALSA_CI_DISABLE_VERSION_BUMP: 1
+ SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1
=====================================
debian/patches/series
=====================================
@@ -1,4 +1,3 @@
python3.patch
-fix-gradle-build.patch
build-plugin.patch
remove-android-annotations.patch
=====================================
debian/rules
=====================================
@@ -5,33 +5,63 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
-export ORG_GRADLE_PROJECT_skipAndroid=true
-export ORG_GRADLE_PROJECT_errorProne=false
+#export ORG_GRADLE_PROJECT_skipAndroid=true
+#export ORG_GRADLE_PROJECT_errorProne=false
export DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
export DEB_HOST_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
export DEB_TARGET_GNU_CPU ?= $(shell dpkg-architecture -qDEB_TARGET_GNU_CPU)
export DEB_TARGET_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_TARGET_GNU_SYSTEM)
-export ORG_GRADLE_PROJECT_protoc="/usr/bin/protoc"
+#export ORG_GRADLE_PROJECT_protoc="/usr/bin/protoc"
+
+# Bypass ccache
+export CCACHE_DISABLE = 1
+export CCACHE_TEMPDIR = ${CURDIR}/debian/ccachetmp
+
+# BAZEL_CXXOPTS and BAZEL_LINKOPTS take a list of flags seperated by colons
+export space = $() $()
+export BAZEL_CXXOPTS = $(subst $(space),:,-std=c++0x ${CPPFLAGS} ${CXXFLAGS})
+export BAZEL_LINKOPTS = $(subst $(space),:,-lstdc++ -lm ${LDFLAGS})
+
+export PROTOC = /usr/bin/protoc
+export TEST_TMPDIR = ${CURDIR}/debian/output-root
+
+export DEFAULT_BAZEL_ARGS = \
+ --spawn_strategy=standalone \
+ --nojava_header_compilation \
+ --strategy=Javac=worker --worker_quit_after_build --ignore_unsupported_sandboxing \
+ --java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain \
+ --host_java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain \
+ --action_env=PATH \
+ --host_platform=@local_config_platform//:host \
+ --platforms=@local_config_platform//:host
+
+export EXTRA_BAZEL_ARGS = \
+ --host_javabase=@local_jdk//:jdk \
+ --define=distribution=debian \
+ --noremote_accept_cached \
+ --verbose_failures \
+ --compilation_mode dbg \
+ --action_env=CCACHE_DISABLE \
+ --action_env=CCACHE_TEMPDIR \
+ --sandbox_debug \
+ --sandbox_writable_path=${CCACHE_TEMPDIR} \
+ --distinct_host_configuration=false
# Ensure packages build with no Internet access
export http_proxy=127.0.0.1:9
export https_proxy=127.0.0.1:9
%:
- dh $@ --buildsystem=gradle --with maven_repo_helper
+ dh $@ --with maven_repo_helper
override_dh_auto_configure:
- dh_auto_configure --buildsystem=autoconf
- dh_auto_configure
override_dh_auto_build:
- dh_auto_build --buildsystem=autoconf
- dh_auto_build
+ mkdir -p ${CCACHE_TEMPDIR}
+ bazel build ${DEFAULT_BAZEL_ARGS} ${EXTRA_BAZEL_ARGS} //:java_grpc_library__external_repo_test
-override_dh_auto_install:
- dh_auto_install --buildsystem=autoconf
- dh_auto_install
+#override_dh_auto_install:
override_dh_installexamples:
dh_installexamples
View it on GitLab: https://salsa.debian.org/java-team/grpc-java/-/commit/1dfa60e34cfa9fb8e5ad57c218507bbd9b2f2148
--
View it on GitLab: https://salsa.debian.org/java-team/grpc-java/-/commit/1dfa60e34cfa9fb8e5ad57c218507bbd9b2f2148
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20201215/7423a04d/attachment.html>
More information about the pkg-java-commits
mailing list