Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven build caching samples are re-enabled #1399

Merged
merged 5 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/maven-build-caching-samples-verification.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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

This file was deleted.

17 changes: 15 additions & 2 deletions build-caching-maven-samples/.mvn/develocity.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
<develocity>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<develocity
xmlns="https://www.gradle.com/develocity-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.gradle.com/develocity-maven https://www.gradle.com/schema/develocity-maven.xsd">
<server>
<url>https://ge.solutions-team.gradle.com</url>
<allowUntrusted>true</allowUntrusted>
</server>
<buildScan>
<backgroundBuildScanUpload>#{isFalse(env['GITHUB_ACTIONS'])}</backgroundBuildScanUpload>
<publishing>
<onlyIf>
<![CDATA[authenticated]]>
</onlyIf>
</publishing>
<obfuscation>
<ipAddresses>#{{'0.0.0.0'}}</ipAddresses>
</obfuscation>
</buildScan>
<buildCache>
<local>
<enabled>true</enabled>
Expand Down
13 changes: 7 additions & 6 deletions build-caching-maven-samples/avro-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,19 @@
</fileSet>
</fileSets>
<properties>
<property><name>createNullSafeAnnotations</name></property>
<property><name>createOptionalGetters</name></property>
<property><name>createSetters</name></property>
<property><name>customConversions</name></property>
<property><name>customLogicalTypeFactories</name></property>
<property><name>enableDecimalLogicalType</name></property>
<property><name>errorSpecificClass</name></property>
<property><name>fieldVisibility</name></property>
<property><name>gettersReturnOptional</name></property>
<property><name>imports</name></property>
<property><name>optionalGettersForNullableFieldsOnly</name></property>

<property><name>recordSpecificClass</name></property>
<property><name>stringType</name></property>
<property><name>imports</name></property>
<property><name>fieldVisibility</name></property>

<property><name>customConversions</name></property>
<property><name>customLogicalTypeFactories</name></property>
<property><name>templateDirectory</name></property>
<property><name>velocityToolsClassesNames</name></property>
</properties>
Expand Down
101 changes: 46 additions & 55 deletions build-caching-maven-samples/pmd-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,30 +68,35 @@
<name>excludeFromFailureFile</name>
<normalization>NAME_ONLY</normalization>
</fileSet>
<fileSet>
<name>siteDirectory</name>
</fileSet>
</fileSets>

<properties>
<property><name>skip</name></property>
<property><name>aggregate</name></property>
<property><name>benchmark</name></property>
<property><name>format</name></property>
<property><name>linkXRef</name></property>
<property><name>includeTests</name></property>
<property><name>aggregate</name></property>
<property><name>includeXmlInReports</name></property>
<property><name>inputEncoding</name></property>
<property><name>includeXmlInSite</name></property>
<property><name>skipEmptyReport</name></property>
<property><name>jdkToolchain</name></property>
<property><name>targetJdk</name></property>
<property><name>language</name></property>
<property><name>linkXRef</name></property>
<property><name>locale</name></property>
<property><name>minimumPriority</name></property>
<property><name>rulesets</name></property>
<property><name>typeResolution</name></property>
<property><name>benchmark</name></property>
<property><name>suppressMarker</name></property>
<property><name>skipPmdError</name></property>
<property><name>outputFormat</name></property>
<property><name>outputTimestamp</name></property>
<property><name>renderProcessingErrors</name></property>
<property><name>renderRuleViolationPriority</name></property>
<property><name>renderSuppressedViolations</name></property>
<property><name>renderViolationsByPriority</name></property>
<property><name>rulesets</name></property>
<property><name>skip</name></property>
<property><name>skipEmptyReport</name></property>
<property><name>skipPmdError</name></property>
<property><name>suppressMarker</name></property>
<property><name>targetJdk</name></property>
<property><name>typeResolution</name></property>
</properties>
<ignoredProperties>
<!-- Ignore property that has no impact on plugin outputs -->
Expand Down Expand Up @@ -124,26 +129,17 @@
<!-- In general this is unimportant, since `clean` will remove the analysis cache. -->
<ignore>analysisCache</ignore>
<ignore>analysisCacheLocation</ignore>

<!-- Maven project state cannot be part of cache key. -->
<ignore>mojoExecution</ignore>

<!-- Maven project state cannot be part of cache key. -->
<ignore>repoSession</ignore>
</ignoredProperties>
</inputs>
<nestedProperties>
<property>
<name>localRepository</name>
<inputs>
<properties>
<property>
<name>id</name>
</property>
<property>
<name>url</name>
</property>
</properties>
</inputs>
</property>
</nestedProperties>
<iteratedProperties>
<property>
<name>remoteRepositories</name>
<name>remoteProjectRepositories</name>
<inputs>
<properties>
<property>
Expand Down Expand Up @@ -197,24 +193,28 @@
<name>excludeFromFailureFile</name>
<normalization>NAME_ONLY</normalization>
</fileSet>
<fileSet>
<name>siteDirectory</name>
</fileSet>
</fileSets>
<properties>
<property><name>skip</name></property>
<property><name>aggregate</name></property>
<property><name>format</name></property>
<property><name>linkXRef</name></property>
<property><name>ignoreAnnotations</name></property>
<property><name>ignoreIdentifiers</name></property>
<property><name>ignoreLiterals</name></property>
<property><name>includeTests</name></property>
<property><name>aggregate</name></property>
<property><name>includeXmlInReports</name></property>
<property><name>inputEncoding</name></property>
<property><name>includeXmlInSite</name></property>
<property><name>skipEmptyReport</name></property>
<property><name>language</name></property>
<property><name>jdkToolchain</name></property>

<property><name>ignoreAnnotations</name></property>
<property><name>ignoreLiterals</name></property>
<property><name>ignoreIdentifiers</name></property>
<property><name>language</name></property>
<property><name>linkXRef</name></property>
<property><name>locale</name></property>
<property><name>minimumTokens</name></property>

<property><name>outputFormat</name></property>
<property><name>outputTimestamp</name></property>
<property><name>skip</name></property>
<property><name>skipEmptyReport</name></property>
</properties>
<ignoredProperties>
<!-- Ignore property that has no impact on plugin outputs -->
Expand All @@ -240,26 +240,17 @@
<!-- Ignored because no single property represents each output reports. -->
<!-- There is no way to automatically combine this property value and the 'format' into a single output file name. -->
<ignore>targetDirectory</ignore>

<!-- Maven project state cannot be part of cache key. -->
<ignore>mojoExecution</ignore>

<!-- Maven project state cannot be part of cache key. -->
<ignore>repoSession</ignore>
</ignoredProperties>
</inputs>
<nestedProperties>
<property>
<name>localRepository</name>
<inputs>
<properties>
<property>
<name>id</name>
</property>
<property>
<name>url</name>
</property>
</properties>
</inputs>
</property>
</nestedProperties>
<iteratedProperties>
<property>
<name>remoteRepositories</name>
<name>remoteProjectRepositories</name>
<inputs>
<properties>
<property>
Expand Down