From 96e86c9f33c3d231e7168ccf6fe3e952fb3a3b8c Mon Sep 17 00:00:00 2001 From: Clay Johnson Date: Tue, 8 Aug 2023 11:05:48 -0500 Subject: [PATCH 1/3] Add a workflow to run experiments for Beam --- .../workflows/run-experiments-apache-beam.yml | 77 +++++++++++++++++++ .github/workflows/run-experiments-beam.yml | 11 --- 2 files changed, 77 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/run-experiments-apache-beam.yml delete mode 100644 .github/workflows/run-experiments-beam.yml diff --git a/.github/workflows/run-experiments-apache-beam.yml b/.github/workflows/run-experiments-apache-beam.yml new file mode 100644 index 0000000..8390123 --- /dev/null +++ b/.github/workflows/run-experiments-apache-beam.yml @@ -0,0 +1,77 @@ +name: Apache - Beam + +on: + schedule: + # Every Sunday at 9.00am + - cron: "0 9 * * 0" + + workflow_dispatch: + +env: + GRADLE_ENTERPRISE_URL: "https://ge.solutions-team.gradle.com" + GIT_REPO: "https://github.com/apache/beam" + TASKS: ":javaPreCommit -PdisableSpotlessCheck=true -PdisableCheckStyle=true -x jmhTest" + +jobs: + Experiment: + + strategy: + matrix: + include: + - experimentId: 1 + - experimentId: 2 + - experimentId: 3 + + runs-on: + # This `runs-on` configuration utilize larger GitHub Actions hosted runners. This build does not successfully + # complete on the default runners. + # Using this label incurs extra costs, so please do not copy/paste this configuration. + labels: ubuntu-latest-4core + group: gradle-enterprise-oss-projects + steps: + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: "temurin" + - name: Download latest version of the validation scripts + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/download@actions-stable + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Remove Maven Settings + run: rm $HOME/.m2/settings.xml + - name: Ignore Test Failures + run: | + mkdir ~/git-hooks + echo -e 'echo "\nallprojects { tasks.withType(Test::class).configureEach { ignoreFailures = true } }" >> build.gradle.kts\n' >> ~/git-hooks/post-checkout + chmod +x ~/git-hooks/post-checkout + git config --global core.hooksPath ~/git-hooks + - name: Run experiment 1 + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-1@actions-stable + env: + GRADLE_ENTERPRISE_ACCESS_KEY: "${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}" + with: + gitRepo: ${{ env.GIT_REPO }} + tasks: ${{ env.TASKS }} + gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} + if: matrix.experimentId == 1 + - name: Run experiment 2 + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-2@actions-stable + env: + GRADLE_ENTERPRISE_ACCESS_KEY: "${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}" + with: + gitRepo: ${{ env.GIT_REPO }} + tasks: ${{ env.TASKS }} + gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} + failIfNotFullyCacheable: true # Require no issues to be found + if: matrix.experimentId == 2 + - name: Run experiment 3 + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable + env: + GRADLE_ENTERPRISE_ACCESS_KEY: "${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}" + with: + gitRepo: ${{ env.GIT_REPO }} + tasks: ${{ env.TASKS }} + gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} + failIfNotFullyCacheable: true # Require no issues to be found + if: matrix.experimentId == 3 diff --git a/.github/workflows/run-experiments-beam.yml b/.github/workflows/run-experiments-beam.yml deleted file mode 100644 index 566f55d..0000000 --- a/.github/workflows/run-experiments-beam.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Apache Beam - -on: - workflow_dispatch: - -jobs: - Experiment: - runs-on: ubuntu-latest - steps: - - name: Hello World - run: echo "Hello World" From 0e8ed387062adbce2b668d86915e325891d253b7 Mon Sep 17 00:00:00 2001 From: Clay Johnson Date: Thu, 7 Sep 2023 10:54:57 -0500 Subject: [PATCH 2/3] Remove unneeded comments about requiring no issues to be found --- .github/workflows/run-experiments-apache-beam.yml | 4 ++-- .github/workflows/run-experiments-apache-calcite.yml | 4 ++-- .github/workflows/run-experiments-apache-geode.yml | 4 ++-- .github/workflows/run-experiments-apache-groovy.yml | 4 ++-- .github/workflows/run-experiments-apache-jmeter.yml | 4 ++-- .github/workflows/run-experiments-apache-kafka.yml | 4 ++-- .github/workflows/run-experiments-apache-lucene.yml | 4 ++-- .github/workflows/run-experiments-apache-ofbiz.yml | 4 ++-- .github/workflows/run-experiments-apache-openwhisk.yml | 4 ++-- .github/workflows/run-experiments-apache-samza.yml | 4 ++-- .github/workflows/run-experiments-apache-solr.yml | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/run-experiments-apache-beam.yml b/.github/workflows/run-experiments-apache-beam.yml index 8390123..702ea19 100644 --- a/.github/workflows/run-experiments-apache-beam.yml +++ b/.github/workflows/run-experiments-apache-beam.yml @@ -63,7 +63,7 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 2 - name: Run experiment 3 uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable @@ -73,5 +73,5 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 3 diff --git a/.github/workflows/run-experiments-apache-calcite.yml b/.github/workflows/run-experiments-apache-calcite.yml index 2c09477..eec3ef1 100644 --- a/.github/workflows/run-experiments-apache-calcite.yml +++ b/.github/workflows/run-experiments-apache-calcite.yml @@ -51,7 +51,7 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 2 - name: Run experiment 3 uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable @@ -61,5 +61,5 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 3 \ No newline at end of file diff --git a/.github/workflows/run-experiments-apache-geode.yml b/.github/workflows/run-experiments-apache-geode.yml index 276cfae..a592df6 100644 --- a/.github/workflows/run-experiments-apache-geode.yml +++ b/.github/workflows/run-experiments-apache-geode.yml @@ -56,7 +56,7 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 2 - name: Run experiment 3 uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable @@ -66,5 +66,5 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 3 \ No newline at end of file diff --git a/.github/workflows/run-experiments-apache-groovy.yml b/.github/workflows/run-experiments-apache-groovy.yml index 89bd993..1649e85 100644 --- a/.github/workflows/run-experiments-apache-groovy.yml +++ b/.github/workflows/run-experiments-apache-groovy.yml @@ -50,7 +50,7 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 2 - name: Run experiment 3 uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable @@ -60,5 +60,5 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 3 \ No newline at end of file diff --git a/.github/workflows/run-experiments-apache-jmeter.yml b/.github/workflows/run-experiments-apache-jmeter.yml index 53c82fb..298b7a2 100644 --- a/.github/workflows/run-experiments-apache-jmeter.yml +++ b/.github/workflows/run-experiments-apache-jmeter.yml @@ -56,7 +56,7 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 2 - name: Run experiment 3 uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable @@ -66,5 +66,5 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 3 \ No newline at end of file diff --git a/.github/workflows/run-experiments-apache-kafka.yml b/.github/workflows/run-experiments-apache-kafka.yml index e7be37b..10aa324 100644 --- a/.github/workflows/run-experiments-apache-kafka.yml +++ b/.github/workflows/run-experiments-apache-kafka.yml @@ -56,7 +56,7 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 2 - name: Run experiment 3 uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable @@ -66,5 +66,5 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 3 \ No newline at end of file diff --git a/.github/workflows/run-experiments-apache-lucene.yml b/.github/workflows/run-experiments-apache-lucene.yml index 9747cc9..8457cee 100644 --- a/.github/workflows/run-experiments-apache-lucene.yml +++ b/.github/workflows/run-experiments-apache-lucene.yml @@ -52,7 +52,7 @@ jobs: tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} enableGradleEnterprise: true - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 2 - name: Run experiment 3 uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable @@ -63,5 +63,5 @@ jobs: tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} enableGradleEnterprise: true - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 3 \ No newline at end of file diff --git a/.github/workflows/run-experiments-apache-ofbiz.yml b/.github/workflows/run-experiments-apache-ofbiz.yml index a4e7c55..b7141c7 100644 --- a/.github/workflows/run-experiments-apache-ofbiz.yml +++ b/.github/workflows/run-experiments-apache-ofbiz.yml @@ -50,7 +50,7 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 2 - name: Run experiment 3 uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable @@ -60,5 +60,5 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 3 \ No newline at end of file diff --git a/.github/workflows/run-experiments-apache-openwhisk.yml b/.github/workflows/run-experiments-apache-openwhisk.yml index a91cef2..7110041 100644 --- a/.github/workflows/run-experiments-apache-openwhisk.yml +++ b/.github/workflows/run-experiments-apache-openwhisk.yml @@ -50,7 +50,7 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 2 - name: Run experiment 3 uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable @@ -60,5 +60,5 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 3 \ No newline at end of file diff --git a/.github/workflows/run-experiments-apache-samza.yml b/.github/workflows/run-experiments-apache-samza.yml index 81a8c81..fa84249 100644 --- a/.github/workflows/run-experiments-apache-samza.yml +++ b/.github/workflows/run-experiments-apache-samza.yml @@ -50,7 +50,7 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 2 - name: Run experiment 3 uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable @@ -60,5 +60,5 @@ jobs: gitRepo: ${{ env.GIT_REPO }} tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 3 \ No newline at end of file diff --git a/.github/workflows/run-experiments-apache-solr.yml b/.github/workflows/run-experiments-apache-solr.yml index 4d19cc9..709792e 100644 --- a/.github/workflows/run-experiments-apache-solr.yml +++ b/.github/workflows/run-experiments-apache-solr.yml @@ -52,7 +52,7 @@ jobs: tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} enableGradleEnterprise: true - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 2 - name: Run experiment 3 uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable @@ -63,5 +63,5 @@ jobs: tasks: ${{ env.TASKS }} gradleEnterpriseUrl: ${{ env.GRADLE_ENTERPRISE_URL }} enableGradleEnterprise: true - failIfNotFullyCacheable: true # Require no issues to be found + failIfNotFullyCacheable: true if: matrix.experimentId == 3 \ No newline at end of file From da2a149bfe482edf162e1111bf9e077a64028ad0 Mon Sep 17 00:00:00 2001 From: Clay Johnson Date: Thu, 7 Sep 2023 11:01:55 -0500 Subject: [PATCH 3/3] Document reason for deletion of ~/.m2/settings.xml in Beam experiment --- .github/workflows/run-experiments-apache-beam.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/run-experiments-apache-beam.yml b/.github/workflows/run-experiments-apache-beam.yml index 702ea19..c37b49a 100644 --- a/.github/workflows/run-experiments-apache-beam.yml +++ b/.github/workflows/run-experiments-apache-beam.yml @@ -39,6 +39,11 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - name: Remove Maven Settings + # Beam uses the [gradle-maven-settings-plugin](https://github.com/mark-vieira/gradle-maven-settings-plugin/) + # to read repo authentication from Maven settings and use it in their Gradle build. It seems that plugin does not + # [support encrypted credentials](https://github.com/mark-vieira/gradle-maven-settings-plugin/issues/15), + # but this is what GitHub Actions provides by default. Deleting `settings.xml` is what Beam do in their own CI + # builds on GitHub Actions: https://github.com/apache/beam/blob/ca0345b8acc7dd5ebc0506d48faa6474fe0b3ca0/.github/workflows/java_tests.yml#L89 run: rm $HOME/.m2/settings.xml - name: Ignore Test Failures run: |