Skip to content

Commit 9ba554f

Browse files
Output CI Vivado logs on failure
Having trouble diagnosing a bitstream build failure in CI. Printing the logs may help.
1 parent a8ecbde commit 9ba554f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ jobs:
8686
runs-on: [ubuntu-22.04-fpga, sonata]
8787
env:
8888
BITSTREAM_PATH: build/lowrisc_sonata_system_0/synth-vivado/lowrisc_sonata_system_0.bit
89+
SYNTH_LOG: build/lowrisc_sonata_system_0/synth-vivado/lowrisc_sonata_system_0.runs/synth_1/runme.log
90+
IMPL_LOG: build/lowrisc_sonata_system_0/synth-vivado/lowrisc_sonata_system_0.runs/impl_1/runme.log
8991
TIMING_RPT: build/lowrisc_sonata_system_0/synth-vivado/lowrisc_sonata_system_0.runs/impl_1/top_sonata_timing_summary_postroute_physopted.rpt
9092
UTILIZATION_RPT: build/lowrisc_sonata_system_0/synth-vivado/lowrisc_sonata_system_0.runs/impl_1/top_sonata_utilization_placed.rpt
9193
GS_PATH: gs://lowrisc-ci-cache/lowRISC/sonata-system/bitstream
@@ -131,6 +133,13 @@ jobs:
131133
module load xilinx/vivado
132134
nix run .#bitstream-build
133135
136+
# Only runs if there's been a failure in a previous step.
137+
- name: Print failed bitstream logs
138+
if: ${{ failure() }}
139+
run: |
140+
cat $SYNTH_LOG
141+
cat $IMPL_LOG
142+
134143
- name: Upload implementation reports
135144
uses: actions/upload-artifact@v4
136145
with:

0 commit comments

Comments
 (0)