mirror of https://github.com/apache/lucene.git
77 lines
1.8 KiB
YAML
77 lines
1.8 KiB
YAML
name: Gradle Precommit Checks
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
|
|
push:
|
|
branches:
|
|
- main
|
|
- branch_9x
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
# This runs all validation checks without tests.
|
|
checks:
|
|
name: gradle check -x test (JDK ${{ matrix.java }} on ${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
# Operating systems to run on.
|
|
os: [ubuntu-latest]
|
|
# Test JVMs.
|
|
java: [ '17' ]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: ${{ matrix.java }}
|
|
java-package: jdk
|
|
|
|
- name: Prepare caches
|
|
uses: ./.github/actions/gradle-caches
|
|
|
|
- name: Run gradle check (without tests)
|
|
run: ./gradlew check -x test -Ptask.times=true --max-workers 2
|
|
|
|
# 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.
|
|
java: [ '17' ]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: ${{ matrix.java }}
|
|
java-package: jdk
|
|
|
|
- name: Prepare caches
|
|
uses: ./.github/actions/gradle-caches
|
|
|
|
- name: Run gradle tests
|
|
run: ./gradlew test "-Ptask.times=true" --max-workers 2
|
|
|
|
- name: Echo settings
|
|
run: cat gradle.properties
|