From 8d29d063790dc8ed7326dbb5c681d8f5892212d7 Mon Sep 17 00:00:00 2001 From: Jerome Prinet Date: Tue, 1 Apr 2025 18:18:29 +0200 Subject: [PATCH 1/3] Expose report unconditionally --- .../actions/gradle/experiment-1/action.yml | 28 ++++++++++++++----- .../actions/gradle/experiment-2/action.yml | 26 +++++++++++++---- .../actions/gradle/experiment-3/action.yml | 26 +++++++++++++---- .github/actions/maven/experiment-1/action.yml | 28 ++++++++++++++----- .github/actions/maven/experiment-2/action.yml | 28 ++++++++++++++----- 5 files changed, 103 insertions(+), 33 deletions(-) diff --git a/.github/actions/gradle/experiment-1/action.yml b/.github/actions/gradle/experiment-1/action.yml index b52032fd..db31d66a 100644 --- a/.github/actions/gradle/experiment-1/action.yml +++ b/.github/actions/gradle/experiment-1/action.yml @@ -98,6 +98,9 @@ runs: # Navigate into the folder containing the validation scripts cd develocity-gradle-build-validation + # Do not exit on error to allow post-actions + set +e + # Run the experiment ./01-validate-incremental-building.sh \ ${ARG_GIT_REPO:+"-r" "$ARG_GIT_REPO"} \ @@ -110,25 +113,36 @@ runs: ${ARG_DEVELOCITY_URL:+"-s" "$ARG_DEVELOCITY_URL"} \ ${ARG_DEVELOCITY_ENABLE:+"-e"} \ ${RUNNER_DEBUG:+"--debug"} + EXPERIMENT_EXIT_CODE=$? - # Set the Build Scan urls as outputs - RECEIPT_FILE=".data/01-validate-incremental-building/latest/exp1-*.receipt" + # Set step outputs BUILD_SCAN_1=$(grep -m 1 "first build" ${RECEIPT_FILE} | sed 's/.* //') BUILD_SCAN_2=$(grep -m 1 "second build" ${RECEIPT_FILE} | sed 's/.* //') echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT - cat $RECEIPT_FILE >> $GITHUB_STEP_SUMMARY + # Copy receipt to a predictable location + RECEIPT_FILE=".data/01-validate-incremental-building/latest/exp1-*.receipt" + if [ -f ${RECEIPT_FILE} ]; then + cp ${RECEIPT_FILE} ../receipt.txt + fi + + exit $EXPERIMENT_EXIT_CODE shell: bash - name: Archive receipt id: upload-artifact uses: actions/upload-artifact@v4 + if: always() with: name: experiment-1-receipt-${{ github.job }}${{ strategy.job-total > 1 && format('-{0}', strategy.job-index) || '' }} - path: develocity-gradle-build-validation/.data/01-validate-incremental-building/latest*/exp1-*.receipt - - name: Add artifact link to summary + path: receipt.txt + - name: Fill GitHub summary + if: always() run: | - echo "-------------" >> $GITHUB_STEP_SUMMARY - echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY + if [ -f "receipt.txt" ]; then + cat receipt.txt >> $GITHUB_STEP_SUMMARY + echo "-------------" >> $GITHUB_STEP_SUMMARY + echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY + fi shell: bash diff --git a/.github/actions/gradle/experiment-2/action.yml b/.github/actions/gradle/experiment-2/action.yml index 48a9a0a3..63f48e82 100644 --- a/.github/actions/gradle/experiment-2/action.yml +++ b/.github/actions/gradle/experiment-2/action.yml @@ -105,6 +105,9 @@ runs: # Navigate into the folder containing the validation scripts cd develocity-gradle-build-validation + # Do not exit on error to allow post-actions + set +e + # Run the experiment ./02-validate-local-build-caching-same-location.sh \ ${ARG_GIT_REPO:+"-r" "$ARG_GIT_REPO"} \ @@ -118,25 +121,36 @@ runs: ${ARG_DEVELOCITY_ENABLE:+"-e"} \ ${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"} \ ${RUNNER_DEBUG:+"--debug"} + EXPERIMENT_EXIT_CODE=$? # Set the Build Scan urls as outputs - RECEIPT_FILE=".data/02-validate-local-build-caching-same-location/latest/exp2-*.receipt" BUILD_SCAN_1=$(grep -m 1 "first build" ${RECEIPT_FILE} | sed 's/.* //') BUILD_SCAN_2=$(grep -m 1 "second build" ${RECEIPT_FILE} | sed 's/.* //') echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT - cat $RECEIPT_FILE >> $GITHUB_STEP_SUMMARY + # Copy receipt to a predictable location + RECEIPT_FILE=".data/02-validate-local-build-caching-same-location/latest/exp2-*.receipt" + if [ -f ${RECEIPT_FILE} ]; then + cp ${RECEIPT_FILE} ../receipt.txt + fi + + exit $EXPERIMENT_EXIT_CODE shell: bash - name: Archive receipt id: upload-artifact uses: actions/upload-artifact@v4 + if: always() with: name: experiment-2-receipt-${{ github.job }}${{ strategy.job-total > 1 && format('-{0}', strategy.job-index) || '' }} - path: develocity-gradle-build-validation/.data/02-validate-local-build-caching-same-location/latest*/exp2-*.receipt - - name: Add artifact link to summary + path: receipt.txt + - name: Fill GitHub summary + if: always() run: | - echo "-------------" >> $GITHUB_STEP_SUMMARY - echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY + if [ -f "receipt.txt" ]; then + cat receipt.txt >> $GITHUB_STEP_SUMMARY + echo "-------------" >> $GITHUB_STEP_SUMMARY + echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY + fi shell: bash diff --git a/.github/actions/gradle/experiment-3/action.yml b/.github/actions/gradle/experiment-3/action.yml index 8eb61f6d..2420d1ba 100644 --- a/.github/actions/gradle/experiment-3/action.yml +++ b/.github/actions/gradle/experiment-3/action.yml @@ -105,6 +105,9 @@ runs: # Navigate into the folder containing the validation scripts cd develocity-gradle-build-validation + # Do not exit on error to allow post-actions + set +e + # Run the experiment ./03-validate-local-build-caching-different-locations.sh \ ${ARG_GIT_REPO:+"-r" "$ARG_GIT_REPO"} \ @@ -118,25 +121,36 @@ runs: ${ARG_DEVELOCITY_ENABLE:+"-e"} \ ${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"} \ ${RUNNER_DEBUG:+"--debug"} + EXPERIMENT_EXIT_CODE=$? # Set the Build Scan urls as outputs - RECEIPT_FILE=".data/03-validate-local-build-caching-different-locations/latest/exp3-*.receipt" BUILD_SCAN_1=$(grep -m 1 "first build" ${RECEIPT_FILE} | sed 's/.* //') BUILD_SCAN_2=$(grep -m 1 "second build" ${RECEIPT_FILE} | sed 's/.* //') echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT + + # Copy receipt to a predictable location + RECEIPT_FILE=".data/03-validate-local-build-caching-different-locations/latest/exp3-*.receipt" + if [ -f ${RECEIPT_FILE} ]; then + cp ${RECEIPT_FILE} ../receipt.txt + fi - cat $RECEIPT_FILE >> $GITHUB_STEP_SUMMARY + exit $EXPERIMENT_EXIT_CODE shell: bash - name: Archive receipt id: upload-artifact uses: actions/upload-artifact@v4 + if: always() with: name: experiment-3-receipt-${{ github.job }}${{ strategy.job-total > 1 && format('-{0}', strategy.job-index) || '' }} - path: develocity-gradle-build-validation/.data/03-validate-local-build-caching-different-locations/latest*/exp3-*.receipt - - name: Add artifact link to summary + path: receipt.txt + - name: Fill GitHub summary + if: always() run: | - echo "-------------" >> $GITHUB_STEP_SUMMARY - echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY + if [ -f "receipt.txt" ]; then + cat receipt.txt >> $GITHUB_STEP_SUMMARY + echo "-------------" >> $GITHUB_STEP_SUMMARY + echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY + fi shell: bash diff --git a/.github/actions/maven/experiment-1/action.yml b/.github/actions/maven/experiment-1/action.yml index 2b6db05f..7c1499b9 100644 --- a/.github/actions/maven/experiment-1/action.yml +++ b/.github/actions/maven/experiment-1/action.yml @@ -105,6 +105,9 @@ runs: # Navigate into the folder containing the validation scripts cd develocity-maven-build-validation + # Do not exit on error to allow post-actions + set +e + # Run the experiment ./01-validate-local-build-caching-same-location.sh \ ${ARG_GIT_REPO:+"-r" "$ARG_GIT_REPO"} \ @@ -118,25 +121,36 @@ runs: ${ARG_DEVELOCITY_ENABLE:+"-e"} \ ${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"} \ ${RUNNER_DEBUG:+"--debug"} + EXPERIMENT_EXIT_CODE=$? - # Set the Build Scan urls as outputs - RECEIPT_FILE=".data/01-validate-local-build-caching-same-location/latest/exp1-*.receipt" + # Set step outputs BUILD_SCAN_1=$(grep -m 1 "first build" ${RECEIPT_FILE} | sed 's/.* //') BUILD_SCAN_2=$(grep -m 1 "second build" ${RECEIPT_FILE} | sed 's/.* //') echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT - cat $RECEIPT_FILE >> $GITHUB_STEP_SUMMARY + # Copy receipt to a predictable location + RECEIPT_FILE=".data/01-validate-local-build-caching-same-location/latest/exp1-*.receipt" + if [ -f ${RECEIPT_FILE} ]; then + cp ${RECEIPT_FILE} ../receipt.txt + fi + + exit $EXPERIMENT_EXIT_CODE shell: bash - name: Archive receipt id: upload-artifact uses: actions/upload-artifact@v4 + if: always() with: name: experiment-1-receipt-${{ github.job }}${{ strategy.job-total > 1 && format('-{0}', strategy.job-index) || '' }} - path: develocity-maven-build-validation/.data/01-validate-local-build-caching-same-location/latest*/exp1-*.receipt - - name: Add artifact link to summary + path: receipt.txt + - name: Fill GitHub summary + if: always() run: | - echo "-------------" >> $GITHUB_STEP_SUMMARY - echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY + if [ -f "receipt.txt" ]; then + cat receipt.txt >> $GITHUB_STEP_SUMMARY + echo "-------------" >> $GITHUB_STEP_SUMMARY + echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY + fi shell: bash diff --git a/.github/actions/maven/experiment-2/action.yml b/.github/actions/maven/experiment-2/action.yml index eb0d9439..88734309 100644 --- a/.github/actions/maven/experiment-2/action.yml +++ b/.github/actions/maven/experiment-2/action.yml @@ -105,6 +105,9 @@ runs: # Navigate into the folder containing the validation scripts cd develocity-maven-build-validation + # Do not exit on error to allow post-actions + set +e + # Run the experiment ./02-validate-local-build-caching-different-locations.sh \ ${ARG_GIT_REPO:+"-r" "$ARG_GIT_REPO"} \ @@ -118,25 +121,36 @@ runs: ${ARG_DEVELOCITY_ENABLE:+"-e"} \ ${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"} \ ${RUNNER_DEBUG:+"--debug"} + EXPERIMENT_EXIT_CODE=$? - # Set the Build Scan urls as outputs - RECEIPT_FILE=".data/02-validate-local-build-caching-different-locations/latest/exp2-*.receipt" + # Set step outputs BUILD_SCAN_1=$(grep -m 1 "first build" ${RECEIPT_FILE} | sed 's/.* //') BUILD_SCAN_2=$(grep -m 1 "second build" ${RECEIPT_FILE} | sed 's/.* //') echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT - cat $RECEIPT_FILE >> $GITHUB_STEP_SUMMARY + # Copy receipt to a predictable location + RECEIPT_FILE=".data/02-validate-local-build-caching-different-locations/latest/exp2-*.receipt" + if [ -f ${RECEIPT_FILE} ]; then + cp ${RECEIPT_FILE} ../receipt.txt + fi + + exit $EXPERIMENT_EXIT_CODE shell: bash - name: Archive receipt id: upload-artifact uses: actions/upload-artifact@v4 + if: always() with: name: experiment-2-receipt-${{ github.job }}${{ strategy.job-total > 1 && format('-{0}', strategy.job-index) || '' }} - path: develocity-maven-build-validation/.data/02-validate-local-build-caching-different-locations/latest*/exp2-*.receipt - - name: Add artifact link to summary + path: receipt.txt + - name: Fill GitHub summary + if: always() run: | - echo "-------------" >> $GITHUB_STEP_SUMMARY - echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY + if [ -f "receipt.txt" ]; then + cat receipt.txt >> $GITHUB_STEP_SUMMARY + echo "-------------" >> $GITHUB_STEP_SUMMARY + echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY + fi shell: bash From f62bf347a82f21c5179faeb3eaa873732d874575 Mon Sep 17 00:00:00 2001 From: Jerome Prinet Date: Thu, 10 Apr 2025 11:43:59 +0200 Subject: [PATCH 2/3] Align comments --- .github/actions/gradle/experiment-1/action.yml | 2 +- .github/actions/maven/experiment-1/action.yml | 2 +- .github/actions/maven/experiment-2/action.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/gradle/experiment-1/action.yml b/.github/actions/gradle/experiment-1/action.yml index db31d66a..b89b320f 100644 --- a/.github/actions/gradle/experiment-1/action.yml +++ b/.github/actions/gradle/experiment-1/action.yml @@ -115,7 +115,7 @@ runs: ${RUNNER_DEBUG:+"--debug"} EXPERIMENT_EXIT_CODE=$? - # Set step outputs + # Set the Build Scan urls as outputs BUILD_SCAN_1=$(grep -m 1 "first build" ${RECEIPT_FILE} | sed 's/.* //') BUILD_SCAN_2=$(grep -m 1 "second build" ${RECEIPT_FILE} | sed 's/.* //') diff --git a/.github/actions/maven/experiment-1/action.yml b/.github/actions/maven/experiment-1/action.yml index 7c1499b9..64cc5e9b 100644 --- a/.github/actions/maven/experiment-1/action.yml +++ b/.github/actions/maven/experiment-1/action.yml @@ -123,7 +123,7 @@ runs: ${RUNNER_DEBUG:+"--debug"} EXPERIMENT_EXIT_CODE=$? - # Set step outputs + # Set the Build Scan urls as outputs BUILD_SCAN_1=$(grep -m 1 "first build" ${RECEIPT_FILE} | sed 's/.* //') BUILD_SCAN_2=$(grep -m 1 "second build" ${RECEIPT_FILE} | sed 's/.* //') diff --git a/.github/actions/maven/experiment-2/action.yml b/.github/actions/maven/experiment-2/action.yml index 88734309..9016f7ff 100644 --- a/.github/actions/maven/experiment-2/action.yml +++ b/.github/actions/maven/experiment-2/action.yml @@ -123,7 +123,7 @@ runs: ${RUNNER_DEBUG:+"--debug"} EXPERIMENT_EXIT_CODE=$? - # Set step outputs + # Set the Build Scan urls as outputs BUILD_SCAN_1=$(grep -m 1 "first build" ${RECEIPT_FILE} | sed 's/.* //') BUILD_SCAN_2=$(grep -m 1 "second build" ${RECEIPT_FILE} | sed 's/.* //') From 1674631b1254c3e4e35533229dceb979b32c4423 Mon Sep 17 00:00:00 2001 From: Jerome Prinet Date: Wed, 16 Apr 2025 09:44:07 +0200 Subject: [PATCH 3/3] CR follow-up: inline RECEIPT_FILE path instead of copy --- .github/actions/gradle/experiment-1/action.yml | 13 ++++--------- .github/actions/gradle/experiment-2/action.yml | 13 ++++--------- .github/actions/gradle/experiment-3/action.yml | 13 ++++--------- .github/actions/maven/experiment-1/action.yml | 13 ++++--------- .github/actions/maven/experiment-2/action.yml | 13 ++++--------- 5 files changed, 20 insertions(+), 45 deletions(-) diff --git a/.github/actions/gradle/experiment-1/action.yml b/.github/actions/gradle/experiment-1/action.yml index b89b320f..c4d85634 100644 --- a/.github/actions/gradle/experiment-1/action.yml +++ b/.github/actions/gradle/experiment-1/action.yml @@ -122,12 +122,6 @@ runs: echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT - # Copy receipt to a predictable location - RECEIPT_FILE=".data/01-validate-incremental-building/latest/exp1-*.receipt" - if [ -f ${RECEIPT_FILE} ]; then - cp ${RECEIPT_FILE} ../receipt.txt - fi - exit $EXPERIMENT_EXIT_CODE shell: bash - name: Archive receipt @@ -136,12 +130,13 @@ runs: if: always() with: name: experiment-1-receipt-${{ github.job }}${{ strategy.job-total > 1 && format('-{0}', strategy.job-index) || '' }} - path: receipt.txt + path: develocity-gradle-build-validation/.data/01-validate-incremental-building/latest/exp1-*.receipt - name: Fill GitHub summary if: always() run: | - if [ -f "receipt.txt" ]; then - cat receipt.txt >> $GITHUB_STEP_SUMMARY + RECEIPT_FILE="develocity-gradle-build-validation/.data/01-validate-incremental-building/latest/exp1-*.receipt" + if [ -f ${RECEIPT_FILE} ]; then + cat ${RECEIPT_FILE} >> $GITHUB_STEP_SUMMARY echo "-------------" >> $GITHUB_STEP_SUMMARY echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY fi diff --git a/.github/actions/gradle/experiment-2/action.yml b/.github/actions/gradle/experiment-2/action.yml index 63f48e82..cfd71721 100644 --- a/.github/actions/gradle/experiment-2/action.yml +++ b/.github/actions/gradle/experiment-2/action.yml @@ -130,12 +130,6 @@ runs: echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT - # Copy receipt to a predictable location - RECEIPT_FILE=".data/02-validate-local-build-caching-same-location/latest/exp2-*.receipt" - if [ -f ${RECEIPT_FILE} ]; then - cp ${RECEIPT_FILE} ../receipt.txt - fi - exit $EXPERIMENT_EXIT_CODE shell: bash - name: Archive receipt @@ -144,12 +138,13 @@ runs: if: always() with: name: experiment-2-receipt-${{ github.job }}${{ strategy.job-total > 1 && format('-{0}', strategy.job-index) || '' }} - path: receipt.txt + path: develocity-gradle-build-validation/.data/02-validate-local-build-caching-same-location/latest/exp2-*.receipt - name: Fill GitHub summary if: always() run: | - if [ -f "receipt.txt" ]; then - cat receipt.txt >> $GITHUB_STEP_SUMMARY + RECEIPT_FILE="develocity-gradle-build-validation/.data/02-validate-local-build-caching-same-location/latest/exp2-*.receipt" + if [ -f ${RECEIPT_FILE} ]; then + cat ${RECEIPT_FILE} >> $GITHUB_STEP_SUMMARY echo "-------------" >> $GITHUB_STEP_SUMMARY echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY fi diff --git a/.github/actions/gradle/experiment-3/action.yml b/.github/actions/gradle/experiment-3/action.yml index 2420d1ba..ff39cdcd 100644 --- a/.github/actions/gradle/experiment-3/action.yml +++ b/.github/actions/gradle/experiment-3/action.yml @@ -129,12 +129,6 @@ runs: echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT - - # Copy receipt to a predictable location - RECEIPT_FILE=".data/03-validate-local-build-caching-different-locations/latest/exp3-*.receipt" - if [ -f ${RECEIPT_FILE} ]; then - cp ${RECEIPT_FILE} ../receipt.txt - fi exit $EXPERIMENT_EXIT_CODE shell: bash @@ -144,12 +138,13 @@ runs: if: always() with: name: experiment-3-receipt-${{ github.job }}${{ strategy.job-total > 1 && format('-{0}', strategy.job-index) || '' }} - path: receipt.txt + path: develocity-gradle-build-validation/.data/03-validate-local-build-caching-different-locations/latest/exp3-*.receipt - name: Fill GitHub summary if: always() run: | - if [ -f "receipt.txt" ]; then - cat receipt.txt >> $GITHUB_STEP_SUMMARY + RECEIPT_FILE="develocity-gradle-build-validation/.data/03-validate-local-build-caching-different-locations/latest/exp3-*.receipt" + if [ -f ${RECEIPT_FILE} ]; then + cat ${RECEIPT_FILE} >> $GITHUB_STEP_SUMMARY echo "-------------" >> $GITHUB_STEP_SUMMARY echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY fi diff --git a/.github/actions/maven/experiment-1/action.yml b/.github/actions/maven/experiment-1/action.yml index 64cc5e9b..9cc960f9 100644 --- a/.github/actions/maven/experiment-1/action.yml +++ b/.github/actions/maven/experiment-1/action.yml @@ -130,12 +130,6 @@ runs: echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT - # Copy receipt to a predictable location - RECEIPT_FILE=".data/01-validate-local-build-caching-same-location/latest/exp1-*.receipt" - if [ -f ${RECEIPT_FILE} ]; then - cp ${RECEIPT_FILE} ../receipt.txt - fi - exit $EXPERIMENT_EXIT_CODE shell: bash - name: Archive receipt @@ -144,12 +138,13 @@ runs: if: always() with: name: experiment-1-receipt-${{ github.job }}${{ strategy.job-total > 1 && format('-{0}', strategy.job-index) || '' }} - path: receipt.txt + path: develocity-maven-build-validation/.data/01-validate-local-build-caching-same-location/latest/exp1-*.receipt - name: Fill GitHub summary if: always() run: | - if [ -f "receipt.txt" ]; then - cat receipt.txt >> $GITHUB_STEP_SUMMARY + RECEIPT_FILE="develocity-maven-build-validation/.data/01-validate-local-build-caching-same-location/latest/exp1-*.receipt" + if [ -f ${RECEIPT_FILE} ]; then + cat ${RECEIPT_FILE} >> $GITHUB_STEP_SUMMARY echo "-------------" >> $GITHUB_STEP_SUMMARY echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY fi diff --git a/.github/actions/maven/experiment-2/action.yml b/.github/actions/maven/experiment-2/action.yml index 9016f7ff..bfd92404 100644 --- a/.github/actions/maven/experiment-2/action.yml +++ b/.github/actions/maven/experiment-2/action.yml @@ -130,12 +130,6 @@ runs: echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT - # Copy receipt to a predictable location - RECEIPT_FILE=".data/02-validate-local-build-caching-different-locations/latest/exp2-*.receipt" - if [ -f ${RECEIPT_FILE} ]; then - cp ${RECEIPT_FILE} ../receipt.txt - fi - exit $EXPERIMENT_EXIT_CODE shell: bash - name: Archive receipt @@ -144,12 +138,13 @@ runs: if: always() with: name: experiment-2-receipt-${{ github.job }}${{ strategy.job-total > 1 && format('-{0}', strategy.job-index) || '' }} - path: receipt.txt + path: develocity-maven-build-validation/.data/02-validate-local-build-caching-different-locations/latest/exp2-*.receipt - name: Fill GitHub summary if: always() run: | - if [ -f "receipt.txt" ]; then - cat receipt.txt >> $GITHUB_STEP_SUMMARY + RECEIPT_FILE="develocity-maven-build-validation/.data/02-validate-local-build-caching-different-locations/latest/exp2-*.receipt" + if [ -f ${RECEIPT_FILE} ]; then + cat ${RECEIPT_FILE} >> $GITHUB_STEP_SUMMARY echo "-------------" >> $GITHUB_STEP_SUMMARY echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY fi