aboutsummaryrefslogtreecommitdiffstats
path: root/.bazelrc
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge branch 'next'"Matthias Sohn2024-06-301-18/+4
|\
| * Update minimum Java version to 17Matthias Sohn2024-05-021-18/+4
| | | | | | | | | | Bug: jgit-52 Change-Id: I27e85b3ab4c2e21c86d69d8707eeb9547d788287
* | Migrate to python 3Daniele Sassoli2024-06-281-1/+1
|/ | | | | | | | | | | | | | Given that on most systems Python is still linked to the Python 2.7, switch explicitly to using Python 3. Python 2.7 was discontinued on January 1, 2020: [1]. Moreover, there is PEP recommending to use python3 in the shebang: [2]. [1] https://www.python.org/doc/sunset-python-2 [2] https://www.python.org/dev/peps/pep-0394 Change-Id: Idd3ed567b0384c6ff0a6121ad736f8af4c0f85e0
* Bazel: Add support for JDK 21David Ostrovsky2024-05-021-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two failing tests when switching to JDK 21. One failure is related to the changed behaviour related to the locale providers. Adapt `GitDateFormatterTest` to changes in unicode [1]. Second failure related to changed behaviour in URL.openConnection(), see: [2] for more details. Before JDK 20, some of the parsing/validation performed by the JDK built-in URLStreamHander implementations were delayed until URL::openConnection or URLConnection::connect was called. Starting JDK 20, some of these parsing/validations are now performed early, i.e. within URL constructors. IOW, the assumption made in HttpSupport.TesttestMalformedUri() isn't met any more: providing mailformed URI to the URL ctor now throws an exception starting with JDK 20. To rectify the problem, remove the offending test. Test plan: To build with JDK 21 and run the tests locally: $> bazel test --config=java21 //... To build with JDK 21 and run the tests on RBE: $> bazel test --config=remote21 --remote_instance_name=$PROJECT //... [1] https://bugs.openjdk.org/browse/JDK-8304925 [2] https://bugs.openjdk.org/browse/JDK-8293590 Change-Id: I796de67f7945d5f1fa5e8146f4ec8cbe9ac7bd3e
* Bazel: Replace deprecated --experimental_strict_action_env optionDavid Ostrovsky2024-04-301-1/+1
| | | | | | | | | | | | In recent Bazel release the option was deprecated and replaced with: --incompatible_strict_action_env option. Hence this change is fixing this warning: WARNING: Option 'experimental_strict_action_env' is deprecated: Use --incompatible_strict_action_env instead Change-Id: I49645b084c338d9c2bfff8ad20831bcf18de6b53
* Bump Bazel version to 7.1.1David Ostrovsky2024-04-281-0/+4
| | | | | | | | | | | | | In Bazel 7.x release line, the bzlmod feature is activated per default, so that we need to disable it. See this issue for more details: [1]. Test plan: $> bazel test //... [1] https://github.com/bazelbuild/bazel/issues/18958 Change-Id: I2526d93020c5d82314a09206907ebeed6f1a1700
* Bazel: Fix remote build execution for Java 17David Ostrovsky2023-05-311-4/+6
| | | | | | | | | | | | | | | | | | | | Bazel build and test with remote17 configuration was actually executed locally, and not remotely. Rename remote configuration setting for Java 11 from remote to remote11 and derive the common remote configuration settings for remote11 and remote17 configurations. Also remove deprecated --host_javabase and --javabase options. Test Plan: Verify that the remote build for Java 17 is actually executed remotely: $ bazel test --config=remote17 --remote_instance_name=$PROJECT_NAME \ org.eclipse.jgit.test/... Change-Id: I10ad8c1d28c92fed9e465c2d36770ed4fb2940c3
* Rerun flaky tests 3 timesMatthias Sohn2023-03-071-0/+1
| | | | | | This can help to reduce time spent on rebuilds caused by flaky tests. Change-Id: I8f7831e470fd8aa065f0b8728f62f39734d05016
* Bazel: Include bazel resource configuration file for RBE buildDavid Ostrovsky2022-01-221-0/+2
| | | | | | | In I988f61e34 tools/remote-bazelrc was added, but this resource file wasn't imported from main resource file workspace/.bazelrc. Change-Id: Ie0c2f128fbccaa6f9e99ad29a3a76ac294f3cd29
* Bazel: Add RBE supportDavid Ostrovsky2022-01-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Bazel build can be used with Google's Remote Build Execution. This needs the following setup steps: $ gcloud auth application-default login $ gcloud services enable remotebuildexecution.googleapis.com --project=${PROJECT} Create a worker pool. The instances should have at least 4 CPUs each for adequate performance. $ gcloud alpha remote-build-execution worker-pools create default \ --project=${PROJECT} \ --instance=default_instance \ --worker-count=50 \ --machine-type=e2-standard-4 \ --disk-size=200 To use RBE, execute $ bazel test --config=remote \ --remote_instance_name=projects/${PROJECT}/instances/default_instance \ //... Change-Id: I988f61e342dab2136d8752ace945a4ed91a4189a
* Bazel: Switch to using toolchain resolution for java rulesDavid Ostrovsky2022-01-201-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump Bazel version to release 5.0.0. In this new Bazel release, --incompatible_use_toolchain_resolution_for_java_rules is flipped, that means that the build must be adapted to toolchain resolution. Specification toolchain resolution for java rules is here: [1]. Main tracking Bazel issue is here: [2]. Given that new Bazel release also added support for remote JDK 17, add experimental support for building with remote JDK 17 to produce major byte code version 61. Test Plan: To build with remote JDK 11 run: $ bazel build :all To build with remote JDK 17 run: $ bazel build --config java17 :all [1] https://docs.google.com/document/d/1MVbBxbKVKRJJY7DnkptHpvz7ROhyAYy4a-TZ-n7Q0r4/edit?usp=sharing [2] https://github.com/bazelbuild/bazel/issues/7849 Change-Id: I8d26dff722c6677ea7642913b61e416b23ea9041
* Bazel: Add workspace status command to stamp final artifactDavid Ostrovsky2020-07-171-0/+1
| | | | | | | | | | | | | | | | | | | Include implementation version in jgit library. This version is used by other products that depend on JGit, and built using Bazel and not consume officially released artifact from Central or Eclipse own Maven repository. Most notably, in Gerrit Code Review JGit agent that was previously reported as "unknown", is now reported as: JGit/v5.8.0.202006091008-r-16-g14c43828d using this change [1]. [1] https://gerrit-review.googlesource.com/c/gerrit/+/272505 Change-Id: Ia50de9ac35b8dbe9e92d8ad7d0d14cd00f057863 Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* Enable error-prone checks by defaultDavid Pursehouse2019-05-261-0/+1
| | | | | | | | | | | | | | Based on recent work by Dave Borowitz on the Gerrit project [1, 2]. The warnings/error configuration is unchanged, but now the checks are enabled by default during the build rather than having to be manually invoked. [1] https://gerrit-review.googlesource.com/c/gerrit/+/225653 [2] https://gerrit-review.googlesource.com/c/gerrit/+/225714 Change-Id: I7f4849896af72de38880b13d64519cc93bb3d2a3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Add bazel options to align with gerrit'sDavid Ostrovsky2019-05-261-0/+8
Change-Id: I6addd5fcaecb8c2508e1d5776ecfed8ae676b6ed Signed-off-by: David Ostrovsky <david@ostrovsky.org>