Update to Error Prone 2.21.1 #1618
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous integration | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
EP_LATEST_SUPPORTED: 2.21.0 | |
EP_OLDEST_SUPPORTED: 2.4.0 | |
jobs: | |
build: | |
name: "JDK ${{ matrix.java }} on ${{ matrix.os }} with Error Prone ${{ matrix.epVersion }}" | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
java: 11 | |
epVersion: "$EP_OLDEST_SUPPORTED" | |
- os: ubuntu-latest | |
java: 17 | |
epVersion: "$EP_OLDEST_SUPPORTED" | |
- os: macos-latest | |
java: 11 | |
epVersion: "$EP_LATEST_SUPPORTED" | |
- os: ubuntu-latest | |
java: 11 | |
epVersion: "$EP_LATEST_SUPPORTED" | |
- os: windows-latest | |
java: 11 | |
epVersion: "$EP_LATEST_SUPPORTED" | |
- os: ubuntu-latest | |
java: 17 | |
epVersion: "$EP_LATEST_SUPPORTED" | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out NullAway sources | |
uses: actions/checkout@v3 | |
- 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 }} | |
distribution: 'temurin' | |
- name: Build and test using Java ${{ matrix.java }} and Error Prone ${{ matrix.epVersion }} | |
env: | |
ORG_GRADLE_PROJECT_epApiVersion: ${{ matrix.epVersion }} | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: build | |
- name: Report jacoco coverage | |
uses: gradle/gradle-build-action@v2 | |
env: | |
ORG_GRADLE_PROJECT_epApiVersion: ${{ matrix.epVersion }} | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
with: | |
arguments: coveralls | |
continue-on-error: true | |
if: runner.os == 'Linux' && matrix.java == '11' && matrix.epVersion == env.EP_LATEST_SUPPORTED && github.repository == 'uber/NullAway' | |
- name: Test publishToMavenLocal flow | |
env: | |
ORG_GRADLE_PROJECT_epApiVersion: ${{ matrix.epVersion }} | |
ORG_GRADLE_PROJECT_VERSION_NAME: '0.0.0.1-LOCAL' | |
ORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED: 'false' | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: publishToMavenLocal | |
if: matrix.java == '11' | |
- name: Check that Git tree is clean after build and test | |
run: ./.buildscript/check_git_clean.sh | |
publish_snapshot: | |
name: 'Publish snapshot' | |
needs: [build] | |
if: github.event_name == 'push' && github.repository == 'uber/NullAway' && github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out repository' | |
uses: actions/checkout@v3 | |
- name: 'Set up JDK 11' | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: 'temurin' | |
- name: 'Publish' | |
uses: gradle/gradle-build-action@v2 | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
with: | |
arguments: clean publish --no-daemon --no-parallel |