Skip to content

Commit

Permalink
Refactor GitHub actions presubmit config
Browse files Browse the repository at this point in the history
Extract boilerplate to a helper, and also update Error Prone to
only test with JDK 15 on macos and windows to avoid a combinatorial
explosion of test configurations. Most platform-specific issues are
not specific to a particular JDK version.

PiperOrigin-RevId: 348547557
  • Loading branch information
cushon authored and Error Prone Team committed Dec 22, 2020
1 parent 7f4d76b commit aa649f2
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
java: [ 15, 11, 8 ]
os: [ ubuntu-latest ]
java: [ 16-ea, 15, 11, 8 ]
# Only test on macos and windows with a single recent JDK to avoid a
# combinatorial explosion of test configurations.
# Most OS-specific issues are not specific to a particular JDK version.
include:
- os: macos-latest
java: 15
- os: windows-latest
java: 15
runs-on: ${{ matrix.os }}
steps:
- name: 'Check out repository'
Expand All @@ -32,31 +40,6 @@ jobs:
shell: bash
run: mvn test -B

early_access:
name: 'JDK Early-Access'
continue-on-error: true
runs-on: ubuntu-latest
steps:
- name: 'Check out repository'
uses: actions/checkout@v2
- name: 'Cache local Maven repository'
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: 'Set up JDK ${{ matrix.java }}'
uses: actions/setup-java@v1
with:
java-version: 16-ea
- name: 'Install'
shell: bash
run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- name: 'Test'
shell: bash
run: mvn test -B

publish_snapshot:
name: 'Publish snapshot'
needs: test
Expand Down

0 comments on commit aa649f2

Please sign in to comment.