From 8a45a2d46eebd7dde81b38993fd01a8879652f33 Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Sat, 22 Aug 2026 17:41:41 +0200 Subject: [PATCH] CI: Reduce verbosity of the Pages job --- .github/workflows/pages.yml | 2 -- ci/ci-pages-notify.bash | 13 ++++--------- ci/ci-pages.bash | 28 ++++++---------------------- 3 files changed, 10 insertions(+), 33 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 81db2bc22..b75b209b0 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -52,8 +52,6 @@ jobs: GH_TOKEN: ${{ github.token }} run: | ./ci/ci-pages.bash - ls -lsha - tree -L 3 pages - name: Upload pages artifact uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5 with: diff --git a/ci/ci-pages-notify.bash b/ci/ci-pages-notify.bash index bd38b2c19..9043e7264 100755 --- a/ci/ci-pages-notify.bash +++ b/ci/ci-pages-notify.bash @@ -33,24 +33,20 @@ ARTIFACTS_ROOT=artifacts mkdir -p ${ARTIFACTS_ROOT} for RUN_ID in ${PR_RUN_IDS//,/ }; do - echo "@@@ Processing run ${RUN_ID}" - # Create workflow artifacts directory ARTIFACTS_DIR=${ARTIFACTS_ROOT}/${RUN_ID} mkdir -p ${ARTIFACTS_DIR} # Download artifact of this run, if exists - gh run download ${RUN_ID} --name pr-notification --dir ${ARTIFACTS_DIR} || true - ls -lsha ${ARTIFACTS_DIR} + gh run download ${RUN_ID} --name pr-notification --dir ${ARTIFACTS_DIR} &> /dev/null || true # Move on if no notification is required if [ ! -f ${ARTIFACTS_DIR}/pr-number.txt ]; then - echo "No notification found" continue fi - echo "Posting notification found" PR_NUMBER=$(cat ${ARTIFACTS_DIR}/pr-number.txt) + echo "@@@ Run ${RUN_ID}: notifying PR #${PR_NUMBER}" # Everything below is created and validated by the 'upload-pr-notification' # action. Move on if this artifact was not made by it, e.g. it is left over @@ -141,14 +137,13 @@ $(cat ${ARTIFACTS_DIR}/hist.txt) --> NEXTHIST_TEMPLATE - cat ${COMMENT} - # Post it. Move on if this failed, without deleting anything below, otherwise # the history held by the stale notifications would be lost. if ! jq -Rs '{body: .}' ${COMMENT} \ | gh api --method POST "repos/{owner}/{repo}/issues/${PR_NUMBER}/comments" \ --input - > ${ARTIFACTS_DIR}/posted.json; then - echo "Failed to post the notification on PR #${PR_NUMBER}" >&2 + echo "Failed to post this notification on PR #${PR_NUMBER}:" >&2 + cat ${COMMENT} >&2 continue fi echo "Posted $(jq -r '.html_url' ${ARTIFACTS_DIR}/posted.json)" diff --git a/ci/ci-pages.bash b/ci/ci-pages.bash index bd9fcfaa2..84e2de37d 100755 --- a/ci/ci-pages.bash +++ b/ci/ci-pages.bash @@ -35,13 +35,10 @@ compile_coverage_reports() { # Gather all coverage workflow runs within the time window gh run list -w coverage.yml --limit 1000 --created ">=${OLDEST}" --json "databaseId,event,status,conclusion,createdAt,number" > recentRuns.json - echo @@@ Recent runs: - jq "." recentRuns.json # Select completd runs that were not cancelled or skipped, sort by descending run number jq 'sort_by(-.number) | map(select(.status == "completed" and (.conclusion == "success" or .conclusion == "failure")))' recentRuns.json > completedRuns.json - echo @@@ Completed with success or failure: - jq "." completedRuns.json + echo "@@@ $(jq length completedRuns.json) of $(jq length recentRuns.json) runs since ${OLDEST} completed with success or failure" # Create artifacts root directory local ARTIFACTS_ROOT=artifacts-coverage @@ -64,11 +61,8 @@ compile_coverage_reports() { # For each worfklow run that was triggered by this event type for RUN_ID in $(jq ".[] | select(.event == \"${EVENT}\") |.databaseId" completedRuns.json); do - echo "@@@ Processing run ${RUN_ID}" - # Extract the info of this run jq ".[] | select(.databaseId == $RUN_ID)" completedRuns.json > workflow.json - jq "." workflow.json # Record run ID of PR job [[ $EVENT != "pull_request" ]] || PR_RUN_IDS="$PR_RUN_IDS $RUN_ID" @@ -78,15 +72,13 @@ compile_coverage_reports() { mkdir -p ${ARTIFACTS_DIR} # Download artifacts of this run, if exists - gh run download ${RUN_ID} --name coverage-report --dir ${ARTIFACTS_DIR} || true - ls -lsha ${ARTIFACTS_DIR} + gh run download ${RUN_ID} --name coverage-report --dir ${ARTIFACTS_DIR} &> /dev/null || true # Move on if no coverage report is available if [ ! -d ${ARTIFACTS_DIR}/report ]; then - echo "No coverage report found" continue fi - echo "Coverage report found" + echo "@@@ Run ${RUN_ID}: coverage report found" # Emit section header if [[ -n $EMIT_SECTION_HEADER ]]; then @@ -159,13 +151,10 @@ compile_rtlmeter_reports() { # Gather all RTLMeter workflow runs within the time window gh run list -w rtlmeter.yml --limit 1000 --created ">=${OLDEST}" --json "databaseId,event,status,conclusion,createdAt,number" > recentRuns.json - echo @@@ Recent runs: - jq "." recentRuns.json # Select completd runs that were not cancelled or skipped, sort by descending run number jq 'sort_by(-.number) | map(select(.status == "completed" and (.conclusion == "success" or .conclusion == "failure")))' recentRuns.json > completedRuns.json - echo @@@ Completed with success or failure: - jq "." completedRuns.json + echo "@@@ $(jq length completedRuns.json) of $(jq length recentRuns.json) runs since ${OLDEST} completed with success or failure" # Create artifacts root directory local ARTIFACTS_ROOT=artifacts-rtlmeter @@ -188,11 +177,8 @@ compile_rtlmeter_reports() { # For each worfklow run that was triggered by this event type for RUN_ID in $(jq ".[] | select(.event == \"${EVENT}\") |.databaseId" completedRuns.json); do - echo "@@@ Processing run ${RUN_ID}" - # Extract the info of this run jq ".[] | select(.databaseId == $RUN_ID)" completedRuns.json > workflow.json - jq "." workflow.json # Record run ID of PR job [[ $EVENT != "pull_request" ]] || PR_RUN_IDS="$PR_RUN_IDS $RUN_ID" @@ -202,15 +188,13 @@ compile_rtlmeter_reports() { mkdir -p ${ARTIFACTS_DIR} # Download artifacts of this run, if exists - gh run download ${RUN_ID} --name rtlmeter-report --dir ${ARTIFACTS_DIR} || true - ls -lsha ${ARTIFACTS_DIR} + gh run download ${RUN_ID} --name rtlmeter-report --dir ${ARTIFACTS_DIR} &> /dev/null || true # Move on if no RTLMeter report is available if [ ! -d ${ARTIFACTS_DIR}/report ]; then - echo "No RTLMeter report found" continue fi - echo "RTLMeter report found" + echo "@@@ Run ${RUN_ID}: RTLMeter report found" # Emit section header if [[ -n $EMIT_SECTION_HEADER ]]; then