Skip to content

Commit

Permalink
Merge dependabot/github_actions/gradle/develocity-actions-1.2 into co…
Browse files Browse the repository at this point in the history
…mbined-prs-branch
  • Loading branch information
bot-githubaction authored Oct 9, 2024
2 parents 9d6e40b + a2e85a0 commit cda54ac
Show file tree
Hide file tree
Showing 14 changed files with 139 additions and 175 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: Build with Gradle - Gradle 2 through 4
working-directory: convention-develocity-gradle-plugin/plugins/gradle-2-through-4
run: ./gradlew build
- name: Configure Develocity Solutions instance
working-directory: convention-develocity-gradle-plugin/plugins/gradle-5-or-newer/src/main/java/com/myorg
run: sed -i 's/develocity-samples.gradle.com/ge.solutions-team.gradle.com/g' ConventionDevelocityGradlePlugin.java
- name: Build with Gradle - Gradle 5 or newer
working-directory: convention-develocity-gradle-plugin/plugins/gradle-5-or-newer
run: ./gradlew build publishToMavenLocal
Expand Down Expand Up @@ -56,7 +59,7 @@ jobs:
- sample: '6.9_and_later'
version: '8.0.2'
- sample: '6.9_and_later'
version: '(Current)'
version: 'wrapper'
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -67,22 +70,17 @@ jobs:
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: ${{ matrix.versions.version }}
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: convention-develocity-gradle-plugin
path: ~/.m2/repository/com/myorg
- name: Set Gradle version
if: ${{ matrix.versions.version != '(Current)' }}
working-directory: convention-develocity-gradle-plugin/examples/gradle_${{ matrix.versions.sample }}
run: |
sed -i '/distributionSha256Sum.*/d' gradle/wrapper/gradle-wrapper.properties
./gradlew wrapper --gradle-version=${{ matrix.versions.version }} --no-scan
./gradlew wrapper --gradle-version=${{ matrix.versions.version }} --no-scan
- name: Verify example build
id: build
working-directory: convention-develocity-gradle-plugin/examples/gradle_${{ matrix.versions.sample }}
run: ./gradlew build -Ddevelocity.url=https://ge.solutions-team.gradle.com
run: gradle build
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Verify Build Scan published
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Set up Maven
uses: gradle/develocity-actions/[email protected]
- name: Configure Develocity Solutions instance
working-directory: convention-develocity-maven-extension/extension/src/main/java/com/myorg
run: sed -i 's/develocity-samples.gradle.com/ge.solutions-team.gradle.com/g' ConventionDevelocityListener.java
- name: Build with Maven
working-directory: convention-develocity-maven-extension/extension
run: ./mvnw clean install
Expand Down Expand Up @@ -68,7 +73,7 @@ jobs:
- name: Verify example build
id: build
working-directory: convention-develocity-maven-extension/examples/maven_${{ matrix.versions.sample }}
run: ./mvnw clean verify -Ddevelocity.url=https://ge.solutions-team.gradle.com
run: ./mvnw clean verify
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Verify Build Scan published
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
strategy:
matrix:
include:
- name: 'Develocity Gradle plugin version'
sample-file: 'capture-develocity-plugin-version/gradle-develocity-plugin-version.gradle'
- name: 'Git diffs'
sample-file: 'capture-git-diffs/gradle-git-diffs.gradle'
- name: 'Max parallel forks'
Expand Down
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.

Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
strategy:
matrix:
include:
- name: 'Develocity Maven extension version'
sample-file: 'capture-develocity-extension-version/maven-develocity-extension-version.groovy'
- name: 'OS processes'
sample-file: 'capture-os-processes/maven-os-processes.groovy'
- name: 'Processor arch'
Expand Down
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
Loading

0 comments on commit cda54ac

Please sign in to comment.