aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorBrad Corso <bcorso@google.com>2021-02-17 16:49:21 -0800
committerDagger Team <dagger-dev+copybara@google.com>2021-02-17 16:50:46 -0800
commit1b5b0757a08d40b27595995a8f0830aa2c1802d3 (patch)
treecb76c2cc495763c9589c0306f77d7ec7fb7333d4 /.github
parentb4f485b81c9568c5a1111edf4864b34cb2db1bf0 (diff)
downloaddagger2-1b5b0757a08d40b27595995a8f0830aa2c1802d3.tar.gz
Fix Java and Bazel version when building with Bazel in GitHub Actions.
This CL fixes the version of Java to JDK8 and Bazel to 3.7.1 For Java, ubuntu-latest will soon be switching from Java 8 to Java 11 as the default (https://github.com/actions/virtual-environments/issues/1816), and our Bazel builds currently don't work with Java 11 since compile_testing depends on @local_jdk//:lib/tools.jar which doesn't exist in Java 11. https://github.com/google/bazel-common/blob/master/third_party/java/compile_testing/BUILD#L32 For Bazel, ubuntu-latest currently uses Bazel 4.0.0 by default, which fails with Robolectric tests @Config annotation: ``` error: missing required annotation argument: <clinit> @Config ``` RELNOTES=N/A PiperOrigin-RevId: 358062883
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 328d4b1df..958ca522d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -10,7 +10,17 @@ jobs:
bazel-test:
name: 'Bazel tests'
runs-on: ubuntu-latest
+ env:
+ # Our Bazel builds currently rely on JDK 8.
+ USE_JAVA_VERSION: '8'
+ # Our Bazel builds currently rely on 3.7.1. The version is set via
+ # baselisk by USE_BAZEL_VERSION: https://github.com/bazelbuild/bazelisk.
+ USE_BAZEL_VERSION: '3.7.1'
steps:
+ - name: 'Install Java ${{ env.USE_JAVA_VERSION }}'
+ uses: actions/setup-java@v1
+ with:
+ java-version: '${{ env.USE_JAVA_VERSION }}'
- name: 'Check out repository'
uses: actions/checkout@v2
- name: 'Cache local Maven repository'