Merge pull request #1506 from gradle/combined-prs-branch #199
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Verify Convention Develocity Gradle Plugin | |
on: | |
push: | |
branches: [ main ] | |
paths: [ 'convention-develocity-gradle-plugin/**', '.github/workflows/**' ] | |
pull_request: | |
branches: [ main ] | |
paths: [ 'convention-develocity-gradle-plugin/**', '.github/workflows/**' ] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build Convention Develocity Gradle Plugin | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- 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 | |
- name: Upload plugin | |
uses: actions/upload-artifact@v4 | |
with: | |
name: convention-develocity-gradle-plugin | |
path: ~/.m2/repository/com/myorg | |
verification: | |
name: Verify Example Build for Gradle ${{ matrix.versions.version }} | |
needs: [build] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Gradle 3 and earlier is not tested because it does not apply CCUD and overriding the server URL is not possible. | |
# Gradle 4 is not tested because it does not support publishing to authenticated servers. | |
versions: | |
- sample: '5' | |
version: '5.0' | |
- sample: '6' | |
version: '6.0.1' | |
- sample: '6.9_and_later' | |
version: '6.9.4' | |
- sample: '6.9_and_later' | |
version: '7.0.2' | |
- sample: '6.9_and_later' | |
version: '8.0.2' | |
- sample: '6.9_and_later' | |
version: 'wrapper' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
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: Verify example build | |
id: build | |
working-directory: convention-develocity-gradle-plugin/examples/gradle_${{ matrix.versions.sample }} | |
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 |