This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch feature/disable-reproducibility
in repository https://gitbox.apache.org/repos/asf/logging-parent.git

commit 5989ff7b0f973d84b76bbb6a4fc32e9899f179ab
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Wed Jun 19 13:56:37 2024 +0200

    Selectively disable reproducibility check on build
    
    We add a `reproducibility-check-enabled` option to the reusable build
    that will allow us to turn off the reproducibility check on certain
    builds.
    
    While the reproducibility check might detect some problems in a release
    build, IMHO it only increases the build time in most builds.
    
    Reproducibility problems are usually rare and are mostly due to
    the introduction of additional plugins.
    Also note that some kinds of reproducibility problems can only be
    detected by running the build on a **different** machine.
    We already encountered problems that only depended on the absolute path
    of the folder, where the build runs.
---
 .github/workflows/build-reusable.yaml | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/build-reusable.yaml 
b/.github/workflows/build-reusable.yaml
index c772a36..b6a01c9 100644
--- a/.github/workflows/build-reusable.yaml
+++ b/.github/workflows/build-reusable.yaml
@@ -28,6 +28,10 @@ on:
         description: Flag indicating if Maven `site` goal should be run
         default: false
         type: boolean
+      reproducibility-check-enabled:
+        description: Runs a reproducibility check on the build
+        default: true
+        type: boolean
     secrets:
       GE_ACCESS_TOKEN:
         description: Access token to Gradle Enterprise
@@ -106,19 +110,10 @@ jobs:
             --show-version --batch-mode --errors --no-transfer-progress \
             site
 
-      # We upload tests results if the build fails.
-      - name: Upload test results
-        if: failure() && steps.build.conclusion == 'failure'
-        uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 
  # 4.3.3
-        with:
-          name: 
surefire-${{matrix.os}}-${{github.run_number}}-${{github.run_attempt}}
-          path: |
-            **/target/surefire-reports
-            **/target/logs
-
       # `clean verify artifact:compare` is required to generate the build 
reproducibility report.
       # For details, see: 
https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility
       - name: Verify build reproducibility
+        if: inputs.reproducibility-check-enabled
         id: reproducibility
         shell: bash
         run: |
@@ -129,7 +124,7 @@ jobs:
 
       # Upload reproducibility results if the build fails.
       - name: Upload reproducibility results
-        if: failure() && steps.reproducibility.conclusion == 'failure'
+        if: inputs.reproducibility-check-enabled && failure() && 
steps.reproducibility.conclusion == 'failure'
         uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 
  # 4.3.3
         with:
           name: 
reproducibility-${{matrix.os}}-${{github.run_number}}-${{github.run_attempt}}

Reply via email to