mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
Using the `setup-maven-action` GitHub action we can both simplify the build configuration and configure the version of Maven to use. See https://github.com/s4u/setup-maven-action
49 lines
1.8 KiB
YAML
49 lines
1.8 KiB
YAML
name: Build and verify
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [ master ]
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-22.04 ]
|
|
jdk: [ 11.0.20, 17.0.8, 21.0.0 ]
|
|
distribution: [ temurin ]
|
|
experimental: [ false ]
|
|
include:
|
|
- os: macos-12
|
|
jdk: 17.0.8
|
|
distribution: temurin
|
|
experimental: false
|
|
- os: windows-2022
|
|
jdk: 17.0.8
|
|
distribution: temurin
|
|
experimental: false
|
|
runs-on: ${{ matrix.os }}
|
|
continue-on-error: ${{ matrix.experimental }}
|
|
steps:
|
|
# We run the build twice for each supported JDK: once against the
|
|
# original Error Prone release, using only Error Prone checks available
|
|
# on Maven Central, and once against the Picnic Error Prone fork,
|
|
# additionally enabling all checks defined in this project and any Error
|
|
# Prone checks available only from other artifact repositories.
|
|
- name: Check out code and set up JDK and Maven
|
|
uses: s4u/setup-maven-action@fa2c7e4517ed008b1f73e7e0195a9eecf5582cd4 # v1.11.0
|
|
with:
|
|
java-version: ${{ matrix.jdk }}
|
|
java-distribution: ${{ matrix.distribution }}
|
|
maven-version: 3.9.6
|
|
- name: Display build environment details
|
|
run: mvn --version
|
|
- name: Build project against vanilla Error Prone, compile Javadoc
|
|
run: mvn -T1C install javadoc:jar
|
|
- name: Build project with self-check against Error Prone fork
|
|
run: mvn -T1C clean verify -Perror-prone-fork -Pnon-maven-central -Pself-check -s settings.xml
|
|
- name: Remove installed project artifacts
|
|
run: mvn build-helper:remove-project-artifact
|
|
|
|
# XXX: Enable Codecov once we "go public".
|