Skip to content

Upgrade to gradle 9.4.0. (#15829) #9530

Upgrade to gradle 9.4.0. (#15829)

Upgrade to gradle 9.4.0. (#15829) #9530

name: "Run checks: all modules"
on:
workflow_dispatch:
pull_request:
branches:
- '*'
push:
branches:
- 'main'
- 'branch_10x'
schedule:
- cron: '44 1 * * *'
permissions: {}
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
# We split the workflow into two parallel jobs for efficiency:
# one is running all validation checks without tests,
# the other runs all tests without other validation checks.
jobs:
# Fast repository check
lint:
name: lint repository
runs-on: ubuntu-slim
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Configure problem matchers
run: |
echo "::add-matcher::.github/problem-matchers/actionlint-matcher.json"
echo "::add-matcher::.github/problem-matchers/ruff-check.json"
echo "::add-matcher::.github/problem-matchers/ruff-format.json"
echo "::add-matcher::.github/problem-matchers/shellcheck-gcc.json"
- name: Setup uv
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
version: "0.9.27"
enable-cache: true
prune-cache: false
save-cache: ${{ github.event_name != 'pull_request' }}
cache-dependency-glob: dev-tools/uv.lock
cache-suffix: dev-tools
- name: Run prek
run: uv run prek --all-files --show-diff-on-failure
env:
UV_PROJECT: dev-tools
UV_FROZEN: "1"
# This runs all validation checks without tests.
checks:
name: checks without tests (JDK ${{ matrix.java }} on ${{ matrix.os }})
timeout-minutes: 15
needs: lint
strategy:
matrix:
os: [ ubuntu-latest ]
java: [ '25' ]
runs-on: ${{ matrix.os }}
steps:
- name: Correct git autocrlf
run: git config --global core.autocrlf false
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Configure tools
uses: ./.github/actions/prepare-for-build
- name: Install eclint
if: ${{ ! startsWith(matrix.os, 'windows') }}
uses: ./.github/actions/eclint
- name: Run gradle check (without tests)
run: ./gradlew check -x test "-Ptask.times=true"
# This runs all tests without any other validation checks.
tests:
name: tests (JDK ${{ matrix.java }} on ${{ matrix.os }})
timeout-minutes: 30
needs: lint
strategy:
matrix:
# Operating systems to run on.
os: [ ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest ]
java: [ '25' ]
trigger:
- ${{ github.event_name }}
exclude:
- os: macos-latest
trigger: push
- os: macos-latest
trigger: pull_request
runs-on: ${{ matrix.os }}
steps:
- name: Correct git autocrlf on Windows
if: startsWith(matrix.os, 'windows')
run: git config --global core.autocrlf false
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Configure tools
uses: ./.github/actions/prepare-for-build
- name: Speedup MacOS runner
if: ${{ runner.os == 'macOS' }}
run: |
mkdir /tmp/tmpfs
sudo mount_tmpfs -o noowners -s 1g /tmp/tmpfs
sudo sysctl debug.lowpri_throttle_enabled=0
echo "tests.workDir=/tmp/tmpfs/lucene" >> build-options.local.properties
- name: Run gradle tests
run: ./gradlew displayGradleDiagnostics allOptions test "-Ptask.times=true" "-Pvalidation.errorprone=false"
env:
# Set to the defaults to override the "CI"-based logic that would enable C2
# we can't afford C2 on github runners.
TEST_JVM_ARGS: "-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1"
- name: List automatically-initialized gradle.properties
run: cat gradle.properties