Merge pull request #1014 from jsonschema2dataclass/renovate/gradle-8.x #575
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build Plugin CI | |
on: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- '*' | |
paths: | |
- plugin-gradle/** | |
- gradle/wrapper/** | |
- gradle/agp.dependencies.toml | |
- gradle/libs.dependencies.toml | |
- gradle/processors.toml | |
- gradle/plugins.dependencies.toml | |
- gradlew* | |
- internal/plugins/** | |
- internal/common/** | |
- internal/settings.gradle.kts | |
- settings.gradle.kts | |
- build.gradle.kts | |
- gradle.properties | |
- .github/workflows/plugin-build-ci.yml | |
pull_request: | |
types: [assigned, opened, synchronize, reopened] | |
paths: | |
- plugin-gradle/** | |
- gradle/wrapper/** | |
- gradle/agp.dependencies.toml | |
- gradle/libs.dependencies.toml | |
- gradle/processors.toml | |
- gradle/plugins.dependencies.toml | |
- gradlew* | |
- internal/plugins/** | |
- internal/common/** | |
- internal/settings.gradle.kts | |
- settings.gradle.kts | |
- build.gradle.kts | |
- gradle.properties | |
- .github/workflows/plugin-build-ci.yml | |
concurrency: | |
# Documentation suggests ${{ github.head_ref }}, but that's only available on pull_request/pull_request_target triggers, so using ${{ github.ref }}. | |
# On master, we want all builds to complete even if merging happens faster to make it easier to discover at which point something broke. | |
group: ${{ github.ref == 'refs/heads/main' && format('plugin-build-ci-main-{0}', github.sha) || format('plugin-build-ci-{0}', github.ref) }} | |
cancel-in-progress: true | |
env: | |
GRADLE_OPTS: -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false | |
jobs: | |
build-and-test: | |
name: Build Plugin | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 2 | |
matrix: | |
gradleTest: [current, 8, 7] | |
java: [21, 17] | |
distribution: [zulu] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.distribution }} ${{ matrix.java }} for gradle test ${{ matrix.gradleTest }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version: ${{ matrix.java }} | |
cache: gradle | |
- name: Run build and tests | |
run: | | |
if [[ "${{ matrix.gradleTest }}" == "current" ]]; then | |
export TEST_GRADLE_VER_EXACT=current | |
else | |
export TEST_GRADLE_VER_MIN=${{ matrix.gradleTest }} | |
export TEST_GRADLE_VER_MAX=$(( ${{ matrix.gradleTest }} + 1)) | |
fi | |
./gradlew build -S --scan --warning-mode all --no-daemon |