Skip to content
Merged
Changes from 2 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
191 changes: 191 additions & 0 deletions .github/workflows/gradle-rc-verifications.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call it convention-develocity-gradle-plugin-verification-nightly.yml

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you are verifying everything in this one workflow. I would create separate workflows for each. It creates more files, but it isolates the workflows, making them easier to identify.

Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
name: Gradle Future Versions Verifications
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify Convention Develocity Gradle Plugin (Nightly)

permissions:
contents: read
on:
schedule:
- cron: '0 4 * * *'
push:
paths:
- ".github/workflows/gradle-rc-verifications.yml"
workflow_dispatch:

jobs:
build_gradle_convention:
name: Build Convention Develocity Gradle Plugin
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 'release-candidate'
- 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: gradle build publishToMavenLocal
- name: Upload plugin
uses: actions/upload-artifact@v4
with:
name: convention-develocity-gradle-plugin
path: ~/.m2/repository/com/myorg

verification_gradle_convention:
name: Verify Example Build with Convention DV plugin on Gradle ${{ matrix.gradle-version }}
needs: [ build_gradle_convention ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
gradle-version: ['release-candidate', 'nightly']
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: ${{ matrix.gradle-version }}
- name: Download plugin
uses: actions/download-artifact@v5
with:
name: convention-develocity-gradle-plugin
path: ~/.m2/repository/com/myorg
- name: Verify example build
id: build
working-directory: convention-develocity-gradle-plugin/examples/gradle_6.9_and_later
run: gradle build
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Verify Build Scan published
if: ${{ !steps.build.outputs.build-scan-url }}
run: echo "::error ::No Build Scan published"; exit 1

build_shared_convention:
name: Build Shared Convention Develocity Gradle Plugin
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 'release-candidate'
- name: Configure Develocity Solutions instance
working-directory: convention-develocity-shared/convention-develocity-common/src/main/java/com/myorg
run: sed -i 's/develocity-samples.gradle.com/ge.solutions-team.gradle.com/g' DevelocityConventions.java
- name: Build with Gradle
working-directory: convention-develocity-shared
run: gradle build publishToMavenLocal
- name: Upload convention
uses: actions/upload-artifact@v4
with:
name: convention-develocity-shared
path: ~/.m2/repository/com/myorg

verification_shared_convention:
name: Verify Example Build for Gradle ${{ matrix.gradle-version }} with Shared Convention DV plugin
needs: [build_shared_convention]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
gradle-version: ['release-candidate', 'nightly']
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: ${{ matrix.gradle-version }}
- name: Download plugin
uses: actions/download-artifact@v5
with:
name: convention-develocity-shared
path: ~/.m2/repository/com/myorg
- name: Verify example build
id: build
working-directory: convention-develocity-shared/examples/gradle_6.9_and_later
run: gradle build
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Verify Build Scan published
if: ${{ !steps.build.outputs.build-scan-url }}
run: echo "::error ::No Build Scan published"; exit 1

samples:
name: Verification of sample ${{ matrix.name }} with Gradle ${{ matrix.gradle-version }}
runs-on: ubuntu-latest
strategy:
matrix:
gradle-version: ['release-candidate', 'nightly']
name: ['Git diffs', 'Max parallel forks', 'OS processes', 'Processor arch', 'Quality checks', 'Slow tasks', 'Test task system properties', 'Test PTS support', 'Thermal throttling']
include:
- name: 'Git diffs'
sample-file: 'capture-git-diffs/gradle-git-diffs.gradle'
- name: 'Max parallel forks'
sample-file: 'capture-max-parallel-forks/gradle-max-parallel-forks.gradle'
- name: 'OS processes'
sample-file: 'capture-os-processes/gradle-os-processes.gradle'
- name: 'Processor arch'
sample-file: 'capture-processor-arch/gradle-processor-arch.gradle'
- name: 'Quality checks'
sample-file: 'capture-quality-check-issues/gradle-quality-check-issues.gradle'
- name: 'Slow tasks'
sample-file: 'capture-slow-workunit-executions/gradle-slow-task-executions.gradle'
- name: 'Test task system properties'
sample-file: 'capture-test-execution-system-properties/gradle-test-execution-system-properties.gradle'
- name: 'Test PTS support'
sample-file: 'capture-test-pts-support/gradle-test-pts-support.gradle'
- name: 'Thermal throttling'
sample-file: 'capture-thermal-throttling/gradle-thermal-throttling.gradle'
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
gradle-version: ${{ matrix.gradle-version }}
- name: Inject data capture script into Gradle build using Groovy DSL
working-directory: common-develocity-gradle-configuration-groovy
run: |
# apply sample file
echo "apply from: file(\"../build-data-capturing-gradle-samples/${{matrix.sample-file}}\")" >> build.gradle
- name: Run Gradle build using Groovy DSL
working-directory: common-develocity-gradle-configuration-groovy
run: gradle tasks -Ddevelocity.url=https://ge.solutions-team.gradle.com
- name: Inject data capture script into Gradle build using Kotlin DSL
working-directory: common-develocity-gradle-configuration-kotlin
run: |
# apply sample file
echo "apply(from = \"../build-data-capturing-gradle-samples/${{matrix.sample-file}}.kts\")" >> build.gradle.kts
- name: Run Gradle build using Kotlin DSL
working-directory: common-develocity-gradle-configuration-kotlin
run: gradle tasks -Ddevelocity.url=https://ge.solutions-team.gradle.com