Skip to content

fix build

fix build #5529

Workflow file for this run

name: Code Analysis
env:
JAVA_OPTS: "-Xms512m -Xmx6048m -Xss128m -XX:ReservedCodeCacheSize=512m -server"
GRADLE_OPTS: "-Xms512m -Xmx6048m -Xss128m -XX:ReservedCodeCacheSize=512m -server"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GRADLE_BUILDCACHE_USER: ci
GRADLE_BUILDCACHE_PSW: ${{ secrets.GRADLE_BUILDCACHE_PSW }}
GH_PACKAGE_REGISTRY_USER: ${{ secrets.GH_PACKAGE_REGISTRY_USER }}
GH_PACKAGE_REGISTRY_TOKEN: ${{ secrets.GH_PACKAGE_REGISTRY_TOKEN }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
TERM: xterm-256color
JDK_CURRENT: 21
JDK_DISTRIBUTION: "corretto"
##########################################################################
on:
push:
branches: [ 7.0.x ]
pull_request:
types: [ labeled ]
branches: [ 7.0.x ]
##########################################################################
jobs:
cancel-previous-runs:
runs-on: ubuntu-latest
if: ${{ (github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'CI')) && !contains(github.event.pull_request.labels.*.name, 'Renovate') && !contains(github.event.head_commit.message, 'trigger dependency update') && !contains(github.event.head_commit.message, 'documentation update') }}
timeout-minutes: 1
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
initialize:
runs-on: ubuntu-latest
needs: [cancel-previous-runs]
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: ${{ env.JDK_CURRENT }}
distribution: ${{ env.JDK_DISTRIBUTION }}
- name: Setup Gradle Wrapper Cache
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-${{ github.sha }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Initialize
run: ls ./ci && find ./ci -type f -name "*.sh" -exec chmod +x "{}" \; && ./ci/init-build.sh
##########################################################################
static-analysis:
runs-on: ubuntu-latest
needs: [initialize]
continue-on-error: false
strategy:
matrix:
category:
- checkstyleMain
- checkstyleTest
name: ${{ matrix.category }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: ${{ env.JDK_CURRENT }}
distribution: ${{ env.JDK_DISTRIBUTION }}
- name: Setup Gradle Wrapper Cache
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-${{ github.sha }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Initialize
run: find ./ci -type f -name "*.sh" -exec chmod +x "{}" \; && ./ci/init-build.sh
- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Analysis
run: ./gradlew --build-cache --no-watch-fs --configure-on-demand --parallel --no-daemon ${{ matrix.category }} -x test -x javadoc -DskipNestedConfigMetadataGen=true -Dverbose=true --max-workers=8
##########################################################################
validate-codebase:
runs-on: ubuntu-latest
if: ${{ !contains(github.head_ref, 'renovate') }}
needs: [initialize]
continue-on-error: false
strategy:
fail-fast: false
matrix:
check:
- CheckAsyncAnnotationInInterface
- CheckDuplicateGradleConfiguration
- CheckFunctionalConditionUsage
- CheckDuplicateTestConfiguration
- CheckMissingUtilityClassAnnotation
- CheckRedundantTestConfigurationInheritance
- CheckSpringConfigurationBeanProxying
- CheckSpringConfigurationFactories
- CheckMissingTestTagAnnotation
- CheckEnforceLombokAnnotations
- CheckRequiredModuleAnnotationReferences
- CheckMixingSpringBeanWithDependencyInjection
- CheckMissingPuppeteerConfig
- CheckSpringConfigurationConditionals
- CheckMissingConditionalOnFeature
- CheckPuppeteerScenarioScriptConfiguration
- CheckMissingConditionalOnMissingBean
- CheckNativeRuntimeHints
name: ${{ matrix.check }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: ${{ env.JDK_CURRENT }}
distribution: ${{ env.JDK_DISTRIBUTION }}
- name: Setup Gradle Wrapper Cache
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-${{ github.sha }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Initialize
run: find ./ci -type f -name "*.sh" -exec chmod +x "{}" \; && ./ci/init-build.sh
- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Validate Codebase
run: java ./ci/checks/${{ matrix.check }}.java .
##########################################################################