From 7e36bb0744a71f7604df57b70ab8c86f13ecb5ed Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Thu, 28 Sep 2023 11:27:42 -0700 Subject: [PATCH] Fix which JDKs are installed on CI (#835) We need some version of JDK 21 installed now (after #834) for the snapshot job to succeed, even though it's not used. Take the opportunity to simplify other usage of `setup-java`. --- .github/workflows/continuous-integration.yml | 22 +++++++------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index acf0d55842..7e3bd7c911 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -36,21 +36,13 @@ jobs: steps: - name: Check out NullAway sources uses: actions/checkout@v3 - - name: 'Set up JDK 21 so it is available' + - name: 'Set up JDKs' uses: actions/setup-java@v3 with: - java-version: '21-ea' - distribution: 'temurin' - - name: 'Set up JDK 17 on Windows' - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - if: matrix.os == 'windows-latest' - - name: 'Set up JDK ${{ matrix.java }}' - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java }} + java-version: | + 21-ea + 17 + ${{ matrix.java }} distribution: 'temurin' - name: Build and test using Java ${{ matrix.java }} and Error Prone ${{ matrix.epVersion }} env: @@ -99,7 +91,9 @@ jobs: - name: 'Set up JDK 11' uses: actions/setup-java@v3 with: - java-version: 11 + java-version: | + 21-ea + 11 distribution: 'temurin' - name: 'Publish' uses: gradle/gradle-build-action@v2