2021-10-12 15:19:34 +02:00
|
|
|
name: Gradle Precommit Checks
|
2020-02-07 15:10:09 -08:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
|
2021-10-12 15:19:34 +02:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-11-05 09:01:45 +01:00
|
|
|
- branch_9x
|
2021-10-12 15:19:34 +02:00
|
|
|
|
2020-02-07 15:10:09 -08:00
|
|
|
jobs:
|
2021-10-12 15:19:34 +02:00
|
|
|
# This runs all validation checks without tests.
|
|
|
|
checks:
|
|
|
|
name: gradle check -x test (JDK ${{ matrix.java }} on ${{ matrix.os }})
|
|
|
|
runs-on: ${{ matrix.os }}
|
2020-02-07 15:10:09 -08:00
|
|
|
|
2021-10-12 15:19:34 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# Operating systems to run on.
|
|
|
|
os: [ubuntu-latest]
|
|
|
|
# Test JVMs.
|
2022-01-10 15:42:15 +01:00
|
|
|
java: [ '17' ]
|
2020-02-07 15:10:09 -08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-09-22 13:08:24 -05:00
|
|
|
|
2021-10-12 15:19:34 +02:00
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v2
|
2020-02-07 15:10:09 -08:00
|
|
|
with:
|
2022-02-11 01:13:18 +09:00
|
|
|
distribution: 'temurin'
|
2021-10-12 15:19:34 +02:00
|
|
|
java-version: ${{ matrix.java }}
|
|
|
|
java-package: jdk
|
2020-09-22 13:08:24 -05:00
|
|
|
|
2022-05-18 09:26:06 +09:00
|
|
|
- name: Prepare caches
|
|
|
|
uses: ./.github/actions/gradle-caches
|
2020-09-22 13:08:24 -05:00
|
|
|
|
2021-01-08 18:12:19 -05:00
|
|
|
- name: Initialize gradle settings
|
2021-10-12 15:19:34 +02:00
|
|
|
run: ./gradlew localSettings --max-workers 2
|
2021-01-08 18:12:19 -05:00
|
|
|
|
2021-03-01 11:19:47 +01:00
|
|
|
- name: Run gradle check (without tests)
|
2021-10-12 15:19:34 +02:00
|
|
|
run: ./gradlew check -x test -Ptask.times=true --max-workers 2
|
|
|
|
|
2021-10-27 21:12:14 +02:00
|
|
|
# - uses: gradle/wrapper-validation-action@v1
|
2021-10-12 15:19:34 +02:00
|
|
|
|
|
|
|
# This runs all tests without any other validation checks.
|
|
|
|
tests:
|
|
|
|
name: gradle test (JDK ${{ matrix.java }} on ${{ matrix.os }})
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# Operating systems to run on.
|
|
|
|
# windows-latest: fairly slow to build and results in odd errors (see LUCENE-10167)
|
|
|
|
# macos-latest: a tad slower than ubuntu and pretty much the same (?) so leaving out.
|
|
|
|
os: [ubuntu-latest]
|
|
|
|
# Test JVMs.
|
2022-01-10 15:42:15 +01:00
|
|
|
java: [ '17' ]
|
2021-10-12 15:19:34 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v2
|
|
|
|
with:
|
2022-02-21 17:09:21 +09:00
|
|
|
distribution: 'temurin'
|
2021-10-12 15:19:34 +02:00
|
|
|
java-version: ${{ matrix.java }}
|
|
|
|
java-package: jdk
|
|
|
|
|
2022-05-18 09:26:06 +09:00
|
|
|
- name: Prepare caches
|
|
|
|
uses: ./.github/actions/gradle-caches
|
2021-10-12 15:19:34 +02:00
|
|
|
|
|
|
|
- name: Initialize gradle settings
|
|
|
|
run: ./gradlew localSettings --max-workers 2
|
|
|
|
|
|
|
|
- name: Echo settings
|
|
|
|
run: cat gradle.properties
|
|
|
|
|
|
|
|
- name: Run gradle tests
|
2022-05-09 23:03:55 -04:00
|
|
|
run: ./gradlew test "-Ptask.times=true" --max-workers 2
|