Skip to content

Commit

Permalink
[ci] improve PR comment readability
Browse files Browse the repository at this point in the history
Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin committed Dec 11, 2024
1 parent 6882e1a commit 6d68fe9
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/pd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ jobs:
JSON_CTX: ${{ toJson(github.event.pull_request.labels.*.name) }}
T1_BRANCH: ${{ github.head_ref || github.ref_name }}
T1_CONFIG: ${{ matrix.config }}
T1_COMMIT: ${{ github.event.pull_request.head.sha }}
PD_URL: ${{ secrets.T1_INHOUSE_URL }}
run: |
# GitHub `toJson` will pretty print JSON and causing multiple line escape issue
Expand All @@ -82,11 +81,16 @@ jobs:
exit 1
fi
# Use nix provided locked T1 rev to ensure this is commit the backend script is using
_T1_INPUT_URL="github:chipsalliance/t1/${T1_BRANCH}"
T1_COMMIT=$(nix flake metadata --override-input t1 "${_T1_INPUT_URL}" --json | jq -r .locks.nodes.t1.locked.rev)
_OUTPUT_DIR="fc_result"
nix build --impure --out-link ${_OUTPUT_DIR} \
--override-input t1 "github:chipsalliance/t1/${T1_BRANCH}" \
--override-input t1 "${_T1_INPUT_URL}"\
"git+https://${GH_TOKEN}@${PD_URL}#prometheus.${T1_CONFIG}.tsn28-run-fc-rm.T1RocketTile"
# Escape the code block here to avoid bash run command substitution
_CODE_BLOCK='```'
echo "* Artifacts path: $(realpath ${_OUTPUT_DIR})" >> "$GITHUB_STEP_SUMMARY"
Expand All @@ -103,27 +107,47 @@ jobs:
Timing
------
<details>
<summary>Click to open</summary>
${_CODE_BLOCK}text
$(cat ${_OUTPUT_DIR}/reports/timing_*.rpt)
${_CODE_BLOCK}
</details>
Area
----
<details>
<summary>Click to open</summary>
${_CODE_BLOCK}text
$(cat ${_OUTPUT_DIR}/reports/area.rpt)
${_CODE_BLOCK}
</details>
Power
-----
<details>
<summary>Click to open</summary>
${_CODE_BLOCK}text
$(cat ${_OUTPUT_DIR}/reports/power.rpt)
${_CODE_BLOCK}
</details>
Logic Level
-----------
<details>
<summary>Click to open</summary>
${_CODE_BLOCK}text
$(cat ${_OUTPUT_DIR}/reports/logic_levels.rpt)
${_CODE_BLOCK}
</details>
EOF
- name: "Comment on PR"
uses: actions/github-script@v7
Expand Down

0 comments on commit 6d68fe9

Please sign in to comment.