diff --git a/.github/workflows/maven-build-caching-samples-verification.yml b/.github/workflows/maven-build-caching-samples-verification.yml new file mode 100644 index 000000000..a83f11a4b --- /dev/null +++ b/.github/workflows/maven-build-caching-samples-verification.yml @@ -0,0 +1,58 @@ +name: Verify Maven Build Caching Samples + +on: + push: + branches: [ main ] + paths: [ 'build-caching-maven-samples/**', '.github/workflows/**' ] + pull_request: + branches: [ main ] + paths: [ 'build-caching-maven-samples/**', '.github/workflows/**' ] + workflow_dispatch: + +env: + PROJECT_DIR: build-caching-maven-samples + GOALS: verify + ARGS: -B -Ddevelocity.cache.failOnUnhandledParameters=true + +jobs: + verification: + name: Verification + runs-on: ubuntu-latest + steps: + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + - name: Set up Maven + uses: gradle/develocity-actions/maven-setup@v1.1 + with: + develocity-access-key: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }} + - name: Setup Node.js and Npm + uses: actions/setup-node@v4 + with: + node-version: '14' + - name: Set up Yarn + run: npm install -g yarn + - name: Download latest version of the Develocity Build Validation Scripts + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/download@actions-stable + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Run experiment 1 + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/experiment-1@actions-stable + with: + gitRepo: ${{ github.server_url }}/${{ github.repository }} + gitCommitId: ${{ github.sha }} + projectDir: ${{ env.PROJECT_DIR }} + goals: ${{ env.GOALS }} + args: ${{ env.ARGS }} + failIfNotFullyCacheable: true + - name: Run experiment 2 + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/experiment-2@actions-stable + with: + gitRepo: ${{ github.server_url }}/${{ github.repository }} + gitCommitId: ${{ github.sha }} + projectDir: ${{ env.PROJECT_DIR }} + goals: ${{ env.GOALS }} + args: ${{ env.ARGS }} + failIfNotFullyCacheable: true diff --git a/.github/workflows/maven-build-caching-samples-verification.yml.disabled b/.github/workflows/maven-build-caching-samples-verification.yml.disabled deleted file mode 100644 index 0c4964414..000000000 --- a/.github/workflows/maven-build-caching-samples-verification.yml.disabled +++ /dev/null @@ -1,49 +0,0 @@ -name: Verify Maven Build Caching Samples - -on: - push: - branches: [ main ] - paths: [ 'build-caching-maven-samples/**', '.github/workflows/**' ] - pull_request: - branches: [ main ] - paths: [ 'build-caching-maven-samples/**', '.github/workflows/**' ] - workflow_dispatch: - -jobs: - verification: - name: Verification - runs-on: ubuntu-latest - steps: - - uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/download@actions-stable - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - name: Setup Node.js and Npm - uses: actions/setup-node@v4 - with: - node-version: '14' - - name: Set up Yarn - run: npm install -g yarn - - name: Verify cacheable goals are retrieved from the build cache - id: build - working-directory: gradle-enterprise-maven-build-validation - run: | - set -o pipefail - ./02-validate-local-build-caching-different-locations.sh \ - -r "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git" \ - -c "$GITHUB_SHA" \ - -p "build-caching-maven-samples" \ - -g "verify" \ - -a "-Dorg.slf4j.simpleLogger.log.gradle.goal.cache=debug -B" \ - -s "https://ge.solutions-team.gradle.com" \ - -f -e 2>&1 | tee -a /tmp/build.log - echo "hasUnknownParams=$(grep "Build caching was not enabled for this goal execution because the following parameters were not handled" /tmp/build.log | wc -l)" >> $GITHUB_OUTPUT - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }} - - name: Verify no unmapped mojo parameters - if: (success() || failure()) && steps.build.outputs.hasUnknownParams != '0' - run: exit 1 diff --git a/build-caching-maven-samples/.mvn/develocity.xml b/build-caching-maven-samples/.mvn/develocity.xml index bf9915160..101764cf8 100644 --- a/build-caching-maven-samples/.mvn/develocity.xml +++ b/build-caching-maven-samples/.mvn/develocity.xml @@ -1,8 +1,21 @@ - + + https://ge.solutions-team.gradle.com - true + + #{isFalse(env['GITHUB_ACTIONS'])} + + + + + + + #{{'0.0.0.0'}} + + true diff --git a/build-caching-maven-samples/avro-project/pom.xml b/build-caching-maven-samples/avro-project/pom.xml index d8ef0c298..745a87a5b 100644 --- a/build-caching-maven-samples/avro-project/pom.xml +++ b/build-caching-maven-samples/avro-project/pom.xml @@ -87,18 +87,19 @@ + createNullSafeAnnotations createOptionalGetters createSetters + customConversions + customLogicalTypeFactories enableDecimalLogicalType + errorSpecificClass + fieldVisibility gettersReturnOptional + imports optionalGettersForNullableFieldsOnly - + recordSpecificClass stringType - imports - fieldVisibility - - customConversions - customLogicalTypeFactories templateDirectory velocityToolsClassesNames diff --git a/build-caching-maven-samples/pmd-project/pom.xml b/build-caching-maven-samples/pmd-project/pom.xml index 9db0363e9..3ce54615b 100644 --- a/build-caching-maven-samples/pmd-project/pom.xml +++ b/build-caching-maven-samples/pmd-project/pom.xml @@ -68,30 +68,35 @@ excludeFromFailureFile NAME_ONLY + + siteDirectory + - - skip + aggregate + benchmark format - linkXRef includeTests - aggregate + includeXmlInReports inputEncoding - includeXmlInSite - skipEmptyReport jdkToolchain - targetJdk language + linkXRef + locale minimumPriority - rulesets - typeResolution - benchmark - suppressMarker - skipPmdError + outputFormat + outputTimestamp renderProcessingErrors renderRuleViolationPriority renderSuppressedViolations renderViolationsByPriority + rulesets + skip + skipEmptyReport + skipPmdError + suppressMarker + targetJdk + typeResolution @@ -124,26 +129,17 @@ analysisCache analysisCacheLocation + + + mojoExecution + + + repoSession - - - localRepository - - - - id - - - url - - - - - - remoteRepositories + remoteProjectRepositories @@ -197,24 +193,28 @@ excludeFromFailureFile NAME_ONLY + + siteDirectory + - skip + aggregate format - linkXRef + ignoreAnnotations + ignoreIdentifiers + ignoreLiterals includeTests - aggregate + includeXmlInReports inputEncoding - includeXmlInSite - skipEmptyReport - language jdkToolchain - - ignoreAnnotations - ignoreLiterals - ignoreIdentifiers + language + linkXRef + locale minimumTokens - + outputFormat + outputTimestamp + skip + skipEmptyReport @@ -240,26 +240,17 @@ targetDirectory + + + mojoExecution + + + repoSession - - - localRepository - - - - id - - - url - - - - - - remoteRepositories + remoteProjectRepositories